Viewing file: noticias_imprensa.php (2.82 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include "load_ipanel.php";
$noticiaCtrl = new NoticiaCtrl();
$pag = $_GET['page'];
$maximo = 15;
if(empty($pag)){
$pag = 1;
}
$start = ($pag - 1) * $maximo;
$ttNoticias = $noticiaCtrl->getNoticiasImprensa(10000, 0, true);
$ttPaginas = ceil($ttNoticias/ $maximo);
$noticiasImprensa = $noticiaCtrl->getNoticiasImprensa($maximo, $start);
?>
<!DOCTYPE HTML>
<html lang="pt-br">
<?php include "mod_head.php" ?>
<body class="homepage">
<div id="page-wrapper">
<!-- Bot�o para abrir o login -->
<?php include "mod_login.php" ?>
<?php include "mod_menu.php" ?>
<div id="banner-wrapper">
<div id="banner" class="container">
<div class="row">
<h2 class="titulo_page">IMPRENSA</h2>
</div>
</div>
</div>
<div class="wrapper-style1 wrapper-featured">
<div class="container">
<div class="row">
<div class="12u">
<?php
foreach($noticiasImprensa as $noticia){
echo "<div class=\"lista_noticias\">";
if(!empty($noticia['imagem']) && file_exists("ipanel/uploads/noticias/".$noticia['id']."/".$noticia['imagem'])) {
echo "<a href=\"noticia/imprensa/".$noticia['id']."\" style=\"text-decoration: none;\"><img class=\"image-lista-noticias\" src=\"".$noticiaCtrl->showImage($noticia, "Capa")."\"></a>";
}
echo "<p>(".$data->convertDateSQLToDateBR($noticia['notdata']).") - <a href=\"noticia/imprensa/".$noticia['id']."\" style=\"text-decoration: none;\"><strong>".$noticia['titulo']."</strong></a></p>";
echo "<p>".$noticia['gravata']."</p>";
echo "<button class=\"new_button\" onclick=\"document.location='noticia/imprensa/".$noticia['id']."'\">VEJA +</button>";
echo "</div>";
}
?>
</div>
<?php
if($ttPaginas > 1){
for($i = 1; $i <= $ttPaginas; $i++){
echo "<a href=\"imprensa/page/".$i."\">".$i."</a> ";
}
}
?>
</div>
</div>
</div>
<!-- Banners -->
<?php include "mod_banners.php" ?>
<?php include "mod_footer.php" ?>
</div>
</body>
</html>
<?php include "scripts.php" ?>
|