diff --git a/Controleur/ControleurRecherche.php b/Controleur/ControleurRecherche.php index a9efaad..d09b4df 100755 --- a/Controleur/ControleurRecherche.php +++ b/Controleur/ControleurRecherche.php @@ -66,9 +66,27 @@ class ControleurRecherche extends Controleur { $_SESSION['p_dEntente_C'] = isset($_SESSION['p_dEntente_C']) ? $_SESSION['p_dEntente_C'] : $_SESSION['p_debutMois_C'] ; $_SESSION['etatEntente'] = isset($_SESSION['etatEntente']) ? $_SESSION['etatEntente'] : '2'; - if (isset($_POST['numeroBeneficiaire'])) { + $csrf_token = trim($this->requete->getParametreFormulaire("csrf_token")); + + if (!Csrf::validateToken($csrf_token)) { + $_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.'; + + header('Location: ' . $_SERVER['HTTP_REFERER']); + exit; + } + + $numeroBeneficiaire = trim($this->requete->getParametreFormulaire("numeroBeneficiaire")); + $numeroBonConsultation = trim($this->requete->getParametreFormulaire("numeroBonConsultation")); + $numeroBonOrdonnance = trim($this->requete->getParametreFormulaire("numeroBonOrdonnance")); + $numeroBonHospitalisation = trim($this->requete->getParametreFormulaire("numeroBonHospitalisation")); + $numeroBonOptique = trim($this->requete->getParametreFormulaire("numeroBonOptique")); + $numeroBonExamen = trim($this->requete->getParametreFormulaire("numeroBonExamen")); + $numeroBonKine = trim($this->requete->getParametreFormulaire("numeroBonKine")); + $numeroBonSeance = trim($this->requete->getParametreFormulaire("numeroBonSeance")); + + /* $numeroBeneficiaire=trim($_POST['numeroBeneficiaire']); $numeroBonConsultation=trim($_POST['numeroBonConsultation']); $numeroBonOrdonnance=trim($_POST['numeroBonOrdonnance']); @@ -77,7 +95,8 @@ class ControleurRecherche extends Controleur { $numeroBonExamen=trim($_POST['numeroBonExamen']); $numeroBonKine=trim($_POST['numeroBonKine']); $numeroBonSeance=trim($_POST['numeroBonSeance']); - + */ + if ($numeroBonConsultation=="0") { $numeroBonConsultation="";