Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.volley92.asso.fr
/
htdocs
/
admin174
/
connected
/
pages
/
/srv/data/web/vhosts/www.volley92.asso.fr/htdocs/admin174/connected/pages/pages-list.php
<h1>Pages </h1> <a href="pages-ajout" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> Ajouter</a> <hr> <?php $stmt=$db_client->prepare("SELECT * FROM page_list ORDER BY created_at DESC"); $stmt->execute(); $rows=$stmt->fetchAll(); $stmt=$db_client->prepare("SELECT * FROM sous_category ORDER BY title ASC"); // on prépare notre requête $stmt->execute(); $s_cats=$stmt->fetchAll(); ?> <table class='table table-default'> <thead> <tr> <th>Titre du sous menu </th> <th>Titre de la page</th> <th>Crée le</th> <th>Contenu</th> <th>Editer/Supprimer</th> </tr> </thead> <tbody> <?php foreach($rows as $row):?> <tr> <td> <?php foreach($s_cats as $s_cat):?> <?php if($s_cat->id == $row->category_id):?> <?=$s_cat->title?> <?php endif;?> <?php endforeach;?> </td> <td><?=$row->title?></td> <td><?=date("d/m/Y",strtotime($row->created_at))?></td> <td> <a data-toggle='modal' href='#desc<?=$row->id?>' class='btn btn-xs btn-info' title='Contenu de la page'> <span class='fa fa-file fa-fw'></span> </a> </td> <td> <a href='pages-edition-<?=$row->id?>' class='btn btn-xs btn-warning' title='Editer la page'> <span class='fa fa-edit fa-fw'></span> </a> <a data-toggle='modal' href='#suppr<?=$row->id?>' class='btn btn-xs btn-danger' title='Supprimer la page'> <span class='fa fa-times fa-fw'></span> </a> </td> </tr> <?php endforeach;?> </tbody> </table> <?php $stmt=$db_client->prepare("SELECT * FROM page_list ORDER BY created_at DESC"); $stmt->execute(); $rows=$stmt->fetchAll(); if(!empty($rows)){ foreach($rows as $row): ?> <!-- Modal de suppression --> <div class='modal fade' id="suppr<?=$row->id?>"> <div class='modal-dialog'> <div class='modal-content'> <div class='modal-header'> <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> <h4 class='modal-title'>Suppression de la page</h4> </div> <div class='modal-body'> Confirmez-vous la suppression de la page <b><?=$row->title?></b> ? </div> <div class='modal-footer'> <form method='post' action='pages-suppression'> <input type='hidden' name='id' value='<?=$row->id?>'> <a class='btn btn-default' data-dismiss='modal'>Annuler</a> <button type='submit' name='formRemove' class='btn btn-danger'>Supprimer</button> </form> </div> </div> </div> </div> <!-- Modal de détail --> <div class="modal fade" id="desc<?=$row->id?>"> <div class='modal-dialog'> <div class='modal-content'> <div class='modal-header'> <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> <h4 class='modal-title'>Contenu de la page</h4> </div> <div class='modal-body'> Crée le... <?= date("d/m/Y",strtotime($row->created_at))?><br><br> <b>Titre de la page: </b><?=$row->title?><br> <br> <?=$row->content?> <?=$row->map?><br><br> </div> <div class='modal-footer'> <a class='btn btn-default' data-dismiss='modal'>Ok</a> </div> </div> </div> </div> <?php endforeach;} ?>