Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
<div class="main">
<div class="main-inner">
<div class="container">
<div class="row">
<div class="span12">
<?php
if(isset($_GET['acao'])){
$acao = $_GET['acao'];
if($acao=='welcome'){
echo
'<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">x</button><strong>Olá, Usuário!</strong> Seja Bem Vindo!<strong>Paróquia Santa Teresa DÀvila</strong>
</div>';
}
}
?>
</div>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Olá, Usuário!</strong> Seja Bem vindo!
</div>
</div>
<div class="span12">
<div id="target-1" class="widget">
<div class="widget-content">
<h1>Apresentação</h1>
<p>O <strong>Paróquia Santa Teresa D'Àvila</strong> teste texto,teste texto,teste texto,teste texto,teste texto,teste texto,teste texto,teste texto, '<strong>teste texto,</strong>', teste texto,teste texto,teste texto, <br>
</div> <!-- /widget-content -->
</div> <!-- /widget -->
</div><!-- span 12 -->
</div><!-- row -->
<div class="widget widget-table action-table">
<div class="widget-header"> <i class="icon-th-list"></i>
<h3>Últimos Posts</h3>
</div>
<!-- /widget-header -->
<div class="widget-content">
<table class="table table-striped table-bordered">
<thead>
<tr>
<td> Nº</td>
<th> Título da Postagem </th>
<th> Data</th>
<th> Descrição</th>
<th class="td-actions"> </th>
</tr>
</thead>
<tbody>
<?php
include("../functions/limita-texto.php");
$select = "SELECT * from tb_postagens ORDER BY id DESC LIMIT 5";
$contagem =1;
try{
$result = $conexao->prepare($select);
$result->execute();
$contar = $result->rowCount();
if($contar>0){
while($mostra=$result->FETCH(PDO::FETCH_OBJ)){
?>
<tr>
<td><?php echo $contagem++;?></td>
<td> <?php echo $mostrar->titulo;?> </td>
<td> <?php echo $mostrar->data;?> </td>
<td> <?php echo limitar-texto($mostrar->descricao, $limite=200)?> </td>
<td class="td-actions"><a href="home.php?acao=edit_postagens&id=<?php echo $mostrar->id;?>" class="btn btn-small btn-success"><i class="btn-icon-only icon-edit"> </i></a><a href="javascript:;" class="btn btn-danger btn-small"><i class="btn-icon-only icon-remove"> </i></a></td>
</tr>
<?php
}
}else{
echo '<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">x</button>,<strong>Aviso! </strong> não há postagens no banco de dados.</div>';
}
}catch(PDOException $e){
echo $e;
}
?>
</tbody>
</table>
</div>
<!-- /widget-content -->
</div>
<!-- /widget -->
</div>
<!-- /span6 -->
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /main-inner -->
</div>
<!-- /main -->
Carregando comentários...