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/sous-menu-edit.php
<?php $idCategory = $_GET['id']; $stmt=$db_client->prepare("SELECT * FROM category WHERE id=? AND id_company=?"); // on prépare notre requête $stmt->execute(array($idCategory,$conf_id_company)); $row = $stmt->fetch(); if(empty($row)) header('Location: categorie'); $title = $row->title; if(!empty($_POST)){ $title = $_POST['title']; $menu = $_POST['menu']; $created_at = $_POST['created_at']; $update_at = $_POST['update_at']; if(!empty($title)){ $stmt=$db_client->prepare("UPDATE category SET title=?,menu=?, updated_at= NOW() WHERE id=?"); // on prépare notre requête $stmt->execute(array($title,$menu,$idCategory)); header("Location: categorie"); }else { echo "<div class='alert alert-danger'><button type='button' class='close' data-dismiss='alert'>×</button>Le champ titre ne peut pas être vide.</div>"; } } ?> <h1>Édition d'un sous menu <small>(<a href="categorie">retour</a>)</small></h1> <form role="form" method="post" action="#" enctype="multipart/form-data"> <div class="form-group"> <label for="title">Titre</label> <input id="title" class='form-control' type="text" name="title" value="<?=$title?>"> </div> <div class="form-group"> <input type="checkbox" class="form-check-input" id="menu" name="menu" value="1"> <label class="form-check-label" for="menu">Menu</label> </div> <div class="form-group"> <input type="checkbox" class="form-check-input" id="ss-menu" name="menu" value="2"> <label class="form-check-label" for="ss-menu">Sous-menu</label> </div> <div class='text-center'> <a href="actualites" class="btn btn-default">Annuler</a> <button type='submit' name='submitUpdate' class='btn btn-success'>Modifier</button> </div> </form>