/** * Récupère le planning où l'inscription est passé en paramètre * @param Inscription $inscription * @return Planning * @throws \Exception */ public static function getPlanningByInscription(Inscription $inscription) { try { $conn = Main::bdd(); $reqPrepare = $conn->prepare("SELECT * FROM planning WHERE idInscription = ?"); $reqPrepare->execute(array($inscription->getId())); $tab = $reqPrepare->fetch(); $seance = MSeance::getSeance($tab['idSeance']); $planning = new Planning($seance, $inscription); return $planning; } catch (\PDOException $e) { throw new \Exception("L'inscription " . $inscription->getId() . " n'est pas dans le planning"); } }
Main::setFlashMessage("La suppression de la séance a été faite", "valid"); echo '<script>document.location.href ="?uc=admin&action=voirInscriptionCL"</script>'; } catch (\Exception $e) { Main::setFlashMessage($e->getMessage(), "error"); } break; case 'PlanningPDFCL': try { if (isset($_GET['seance'])) { $seance = MSeance::getSeance($_GET['seance']); $listPlanSeance = MPlanning::getPlanningBySeance($seance); $_SESSION['idSeance'] = $_GET['seance']; $_SESSION['planning'] = $listPlanSeance; } if (isset($_POST['valider'])) { $seance = MSeance::getSeance($_SESSION['idSeance']); $listPlanSeance = MPlanning::getPlanningBySeance($seance); $spectacle = MSpectacle::getSpectacleById($seance->getSpectacle()->getId()); // get the HTML ob_start(); ?> <style type="text/css"> table{ text-align: center; vertical-align: middle; line-height: 6px; font-family: helvetica; font-size: 12pt; width: 100%; border-collapse: collapse;