echo "<option value=\"" . $key . "\" selected>" . $value . "</option>"; } else { echo "<option value=\"" . $key . "\">" . $value . "</option>"; } } ?> </select></div> <div class="box-footer"> <input type="submit" value="Modifier" class="btn btn-primary"> </div> </form></div> </div> <?php $plevel = getAllLevel(1); $category = getAllCategorie(1); //debug($plevel); if ($pSujet > 0) { $result = getSujetSessionById($pSujet); $rowsujet = mysqli_fetch_array($result); $niveau = $rowsujet['session_niveau']; $categorie = $rowsujet['session_categorie']; ?> </section> <section class="col-lg-7 connectedSortable"> <form method="post" action="index.php?a=35&s=3&sujetsession=<?php echo $pSujet; ?>
<?php echo "<select name=\"niveau\" class=\"form-control\" >"; $result = getAllLevel(0); $nb = mysqli_num_rows($result); for ($i = 1; $i <= $nb; $i++) { $row = mysqli_fetch_array($result); echo "<option value=\"" . $row["id_level"] . "\">" . $row["nom_level"] . "</option>"; } echo "</select>"; ?> </div> <div class="form-group"><label>Catégorie</label> <?php echo "<select name=\"categorie\" class=\"form-control\" >"; $result = getAllCategorie(0); $nb = mysqli_num_rows($result); for ($i = 1; $i <= $nb; $i++) { $row = mysqli_fetch_array($result); echo "<option value=\"" . $row["id_atelier_categorie"] . "\">" . $row["label_categorie"] . "</option>"; } echo "</select>"; ?> </div> </div><!-- box content --> <div class="box-footer"> <input type="submit" name="submit_atelier" value="Créer l'atelier" class="btn btn-primary"></div></footer>
echo getError(0); } else { header("Location:index.php?a=7"); } } break; } ?> <div class="row"> <div class="col-lg-4"> <!-- liste des categories existantantes pour modification--> <div class="box box-success"><div class="box-header"><h3 class="box-title">Catégories d'atelier ou session</h3></div> <div class="box-body no-padding"> <table class="table"> <?php $categories = getAllCategorie(1); $nbcat = count($categories); //debug($nbcat); if ($nbcat > 0) { foreach ($categories as $key => $value) { //debug($i); ?> <form action="index.php?a=7&act=2&idcat=<?php echo $key; ?> " method="post" class="form"> <tr> <td><input type="hidden" name="submitcat" ><input class="form-control" type="text" name="categorie" value="<?php echo $value; ?> " onchange="this.value = this.value.charAt(0).toUpperCase() + this.value.substr(1).toLowerCase();"></td>