<?php $db = new Mypdo(); $managerMeth = new MethodeManager($db); $managerChap = new ChapitreManager($db); if (!isset($_SESSION['nomMethode'])) { if (isset($_GET['nomMethode'])) { $_SESSION['nomMethode'] = $_GET['nomMethode']; } } $_SESSION['numMethode'] = $managerMeth->getNumMethodeParNom($_SESSION['nomMethode']); if (!empty($_POST["TailleCubeSelect"])) { $_SESSION["TailleCubeSelect"] = $_POST["TailleCubeSelect"]; } else { $_SESSION['TailleCubeSelect'] = $managerMeth->getCubTailleMethodeParNum($_SESSION['numMethode']); } $list = $managerChap->getAllChapitreParMethode($_SESSION['numMethode']); $NbrChapitreParMethode = sizeof($list); if (empty($_POST['titreChap']) && empty($_POST['descriptionChap'])) { ?> <h1> ajout d'un chapitre pour la méthode : <?php echo $_SESSION['nomMethode']; ?> </h1> <p> <?php $descriptionMeth = $managerMeth->getDescriptionMethodeParNum($_SESSION['numMethode']); echo $descriptionMeth; ?>