Файловый менеджер - Редактировать - /home/asmplong/www/news.php
Назад
<?php include('inc.top.php'); ?> <div class="solutions mt-5"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="row"> <?php if(isset($_GET['actu_id'])) { ?> <div class="col-lg-8 col-md-12 actualites"> <?php echo $content; // affichage de la liste des photos $rep = opendir('img/'.$id_actu); while ($fichier = readdir($rep)) { if ($fichier != '.' && $fichier != '..' && $fichier != 'mini' && $fichier != 'Thumbs.db') { // on stocke le nom des photos dans un tableau $tab_photos[] = $fichier; } } $nb_photos = @count($tab_photos); closedir ($rep); if ($nb_photos != 0) { $i = 1; echo '<div class="row p-4"> <a href="img/'.$id_actu.'/'.$photo.'" data-toggle="lightbox" data-gallery="gallery" class="link-gallery d-none"><img src="img/'.$id_actu.'/mini/'.$photo.'" alt="" class="img-gallery" /></a> '; foreach($tab_photos as $nom_photo) { echo '<div class="col-md-4 text-center p-2"><a href="img/'.$id_actu.'/'.$nom_photo.'" data-toggle="lightbox" data-gallery="gallery" class="link-gallery"><img src="img/'.$id_actu.'/mini/'.$nom_photo.'" alt="" class="img-gallery" /></a></div>'; $i++; } echo '</div>'; } } else { if(isset($_SESSION['member_email'])) { $req_actu = mysqli_query($connect,"SELECT *, YEAR(date) AS year FROM ".$db_prefixe."actu WHERE statut='1' ORDER BY date DESC"); } else { $req_actu = mysqli_query($connect,"SELECT *, YEAR(date) AS year FROM ".$db_prefixe."actu WHERE categ='1' AND statut='1' ORDER BY date DESC"); } $row_actu = mysqli_num_rows($req_actu); echo '<div class="col-lg-12 col-md-12 actualites"> <h1>Les actualités des '.$site_name.'</h1> <p>Consultez les actualités de l\'ASM, venez partager nos activités tout au long de l\'année, Vidéos, Photos, Biologie, Plongées et évènements du club comme nos Barbecues, nos soirées Vidéos et autres activités toujours axées vers notre passion et la convivialité.</p><div class="row">'; while($data_actu = mysqli_fetch_array($req_actu)) { if($data_actu['year'] <= '2017') { $id_actu = $data_actu['id']; $title = utf8_encode(ucfirst($data_actu['titre'])); $categ = $tab_categ_news[$data_actu['categ']]; $categ_clean = $tab_categ_news_clean[$data_actu['categ']]; $desc = utf8_encode($data_actu['description']); $date = $data_actu['date_event']; $photo = $data_actu['photo']; } else { $id_actu = $data_actu['id']; $title = ucfirst($data_actu['titre']); $categ = $tab_categ_news[$data_actu['categ']]; $categ_clean = $tab_categ_news_clean[$data_actu['categ']]; $desc = $data_actu['description']; $date = $data_actu['date_event']; $photo = $data_actu['photo']; } echo '<div class="col-xl-3 col-lg-4 col-md-6">'; echo '<div class="li_actu">'; if($photo != "") { ?> <a href="<?php echo $categ_clean; ?>/<?php echo Clean($title).'_'.$id_actu.'.html'; ?>" title="<?php echo $title; ?>" class="actu_img fx-zoom"><img src="img/<?php echo $id_actu; ?>/mini/<?php echo $photo; ?>" alt="<?php echo $title; ?>" /></a> <?php } else { ?> <a href="<?php echo $categ_clean; ?>/<?php echo Clean($title).'_'.$id_actu.'.html'; ?>" title="<?php echo $title; ?>" class="actu_img fx-zoom"><img src="assets/img/actu_none.gif" alt="<?php echo $title; ?>" class=/></a> <?php } echo '<div><span class="actu_categ">'.$categ.'</span><h3><a href="'.$categ_clean.'/'.Clean($title).'_'.$id_actu.'.html" title="'.$title.'">'.$title.'</a></h3> <p>'.$desc.'</p></div></div></div>'; } } ?> </div> <?php if(isset($_GET['actu_id'])) { if(isset($_SESSION['member_email'])) { $req_actu = mysqli_query($connect,"SELECT *, YEAR(date) AS year FROM ".$db_prefixe."actu WHERE statut='1' ORDER BY date DESC LIMIT 6"); } else { $req_actu = mysqli_query($connect,"SELECT *, YEAR(date) AS year FROM ".$db_prefixe."actu WHERE categ='1' AND statut='1' AND id != '".$_GET['actu_id']."' ORDER BY date DESC LIMIT 6"); } $row_actu = mysqli_num_rows($req_actu); ?> <div class="col-lg-4 col-md-12 actu-home"> <p class="h5"><?php echo $categ; ?></p> <?php while($data_actu = mysqli_fetch_array($req_actu)) { if($data_actu['year'] <= '2017') { $id_actu = $data_actu['id']; $title = utf8_encode(ucfirst($data_actu['titre'])); $categ = $tab_categ_news[$data_actu['categ']]; $categ_clean = $tab_categ_news_clean[$data_actu['categ']]; $desc = utf8_encode($data_actu['description']); $date = $data_actu['date_event']; $photo = $data_actu['photo']; } else { $id_actu = $data_actu['id']; $title = ucfirst($data_actu['titre']); $categ = $tab_categ_news[$data_actu['categ']]; $categ_clean = $tab_categ_news_clean[$data_actu['categ']]; $desc = $data_actu['description']; $date = $data_actu['date_event']; $photo = $data_actu['photo']; } echo '<div class="row actu-resume">'; if($photo != "") { ?> <div class="col-sm-4 p-0"> <a href="actualites/<?php echo Clean($title).'_'.$id_actu.'.html'; ?>" title="<?php echo $title; ?>" class="actu_img fx-zoom"><img src="img/<?php echo $id_actu; ?>/mini/<?php echo $photo; ?>" alt="<?php echo $title; ?>" class="img-fluid" /></a> </div> <?php } else { ?> <div class="col-sm-4 p-0"> <a href="actualites/<?php echo Clean($title).'_'.$id_actu.'.html'; ?>" title="<?php echo $title; ?>" class="actu_img fx-zoom"><img src="assets/img/actu_none.gif" alt="<?php echo $title; ?>" class="img-fluid" /></a> </div> <?php } echo '<div class="col-sm-8"><h3><a href="actualites/'.Clean($title).'_'.$id_actu.'.html" title="'.$title.'">'.$title.'</a></h3> <p>'.$desc.'</p><a href="" title=""></a></div></div>'; } ?> </div> </div> <div class="row"> <div class="col-lg-12 col-md-12 text-center mt-4"> <p><a href="actualites.html" title="Toutes les actualités <?= $site_name ?>" class="btn btn-rose">Retour à la liste des actualités</a></p> <?php } ?> </div> </div> </div> </div> </div> <!-- //END DIV CONTAINER --> </div> <?php include('inc.foot.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка