Mini Shell
Direktori : /home/emypro/www/ |
|
Current File : /home/emypro/www/noticias.php |
<?php include('header.php') ?>
<?php
$noticias = new Noticia();
// READ
$paginate = new Paginate($noticias->total(), $noticias->limit);
$noticias = $noticias->paginate($paginate->page(), 'created');
?>
<div class="blue-wrapper">
<b>Notícias</b>
</div>
<div id="pages" class="container">
<div id="posts-list">
<div class="container">
<?php if(!$noticias): ?>
<h4 class="text-center">Nenhuma notícia até o momento.</h4>
<?php else: ?>
<?php foreach(array_chunk($noticias, 2) as $row): ?>
<div class="row">
<?php foreach($row as $noticia): ?>
<div class="col-sm-6">
<a href="<?= URL_APP ?>noticia/<?= Helper::slugify($noticia->title) .'/'. $noticia->id ?>">
<div class="thumbnail">
<img src="<?= URL_IMG .'noticias/'. $noticia->image ?>" class="img-responsive" alt="">
<div class="caption">
<h4><?= $noticia->title ?></h4>
</div>
</div>
</a>
</div>
<?php endforeach ?>
</div>
<?php endforeach ?>
<div class="row">
<div class="col-lg-12 text-center">
<?= $paginate->render() ?>
</div>
</div>
<?php endif ?>
</div>
</div>
</div>
<?php include('footer.php') ?>
Zerion Mini Shell 1.0