if (isset($lParam["fonction"])) { include_once CHEMIN_CLASSES_CONTROLEURS . MOD_COMMANDE . "/ReservationCommandeControleur.php"; $lControleur = new ReservationCommandeControleur(); switch ($lParam["fonction"]) { case "detailMarche": echo $lControleur->getReservation($lParam)->exportToJson(); $lLogger->log("Affichage de la vue ReservationCommande par : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs break; case "detailProduit": echo $lControleur->getDetailProduit($lParam)->exportToJson(); $lLogger->log("Affichage du détail produit dans ReservationCommande par l'Adhérent : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs break; case "reservationMarche": echo $lControleur->enregistrerReservation($lParam)->exportToJson(); $lLogger->log("Réalisation d'une réservation de commande par : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs break; default: $lLogger->log("Demande d'accés à ReservationCommande sans identifiant commande par : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs header('location:./index.php'); break; } } else { $lLogger->log("Demande d'accés à ReservationCommande sans identifiant commande par : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs header('location:./index.php'); } }
case "reservationMarcheRetourForm": if (isset($_GET["id_marche"])) { header('location:./index.php?m=MarcheHTML&v=ReservationCommande&fonction=detailMarche&id_marche=' . $_GET["id_marche"]); } break; case "reservationMarche": if (isset($_GET["id_marche"])) { header('location:./index.php?m=MarcheHTML&v=ReservationCommande&fonction=reservationMarcheAction&id_marche=' . $_GET["id_marche"]); } break; case "reservationMarcheAction": if (isset($_SESSION['id-produit']) && isset($_GET["id_marche"])) { $lParam = array("detailReservation" => array()); if (is_array($_SESSION['id-produit'])) { $lParam = $_SESSION['id-produit']; $lPage = $lControleur->enregistrerReservation($lParam); if ($lPage->getValid()) { $lLogger->log("Ajout d'une reservation par l'Adhérent : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs // Retour à Ma réservation avec le message de confirmation include_once CHEMIN_CLASSES_VR . "VRerreur.php"; include_once CHEMIN_CLASSES_VR . "TemplateVR.php"; $lVr = new TemplateVR(); $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_338_CODE); $lErreur->setMessage(MessagesErreurs::ERR_338_MSG); $lVr->getLog()->addErreur($lErreur); $_SESSION['msg'] = $lVr->exportToArray(); header('location:./index.php?m=MarcheHTML&v=AfficherReservation&fonction=afficher&id_marche=' . $_GET["id_marche"]);