?> Hs</time> </hgroup> </header> <!--CONTEUDO--> <div class="htmlchars"> <?php echo $post_content; ?> <!--GALERIA--> <?php $ReadGb = new WsPostsGallery(); $ReadGb->setPost_id($post_id); $ReadGb->Query("WHERE #post_id# ORDER BY gallery_date DESC"); if ($ReadGb->getResult()) { ?> <section class="gallery"> <hgroup> <h3> GALERIA: <p class="tagline">Veja fotos em <mark><?php echo $post_title; ?> </mark></p> </h3> </hgroup> <ul> <?php
<?php $delGb = filter_input(INPUT_GET, 'gbdel', FILTER_VALIDATE_INT); if ($delGb) { require_once '_models/AdminPost.class.php'; $DellGallery = new AdminPost(); $DellGallery->gbRemove($delGb); WSErro($DellGallery->getError()[0], $DellGallery->getError()[1]); } ?> <ul class="gallery"> <?php $gbi = 0; $Gallery = new WsPostsGallery(); $Gallery->setPost_id($postid); $Gallery->Query("WHERE #post_id#"); if ($Gallery->getResult()) { foreach ($Gallery->getResult() as $gb) { $gbi++; ?> <li<?php if ($gbi % 5 == 0) { echo ' class="right"'; } ?> > <div class="img thumb_small"> <?php echo Check::Image('../uploads/' . $gb->gallery_image, $gbi, 146, 100); ?> </div>
private function deletaGallery() { $ReadGallery = new WsPostsGallery(); $ReadGallery->setPost_id($this->Post); $ReadGallery->Query("WHERE #post_id#"); if ($ReadGallery->getResult()) { foreach ($ReadGallery->getResult() as $gbdel) { $this->deletaImagem('../uploads/' . $gbdel->gallery_image); } } $ReadGallery->setPost_id($this->Post); $ReadGallery->delete("post_id = :post_id"); }