diff --git a/Controleur/ControleurRechercheparcarte.php b/Controleur/ControleurRechercheparcarte.php index 57cdf2c..2e11aea 100755 --- a/Controleur/ControleurRechercheparcarte.php +++ b/Controleur/ControleurRechercheparcarte.php @@ -27,7 +27,7 @@ class ControleurRechercheparcarte extends Controleur { } - public function index($donneesCarte="") + public function index($donneesCarte="", $msgErreur=null) { $this->beneficiaire->getModeBiometrie(); @@ -45,7 +45,7 @@ class ControleurRechercheparcarte 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['donneesCarte'])) + if(isset($_POST['donneesCarte'])) { // IS1 => Inter-Sante V1 $donneesCarte = $_POST['donneesCarte']; // ex: "IS1|ebene|ESI6936000602" @@ -55,7 +55,8 @@ class ControleurRechercheparcarte extends Controleur { // exit(); if (count($parts) !== 3 || $parts[0] !== 'IS1') { - die("Carte invalide"); + // die("Carte invalide"); + $msgErreur = 'Carte invalide / Invalid card'; } $codeEntite = $parts[1]; @@ -75,8 +76,9 @@ class ControleurRechercheparcarte extends Controleur { if($codeEntite<=" " || $numeroBeneficiaireCarte<=" ") { - $this->rediriger("Rechercheparcarte"); - exit(); + // $this->rediriger("Rechercheparcarte"); + // exit(); + $msgErreur = 'Carte invalide / Invalid card'; } else { @@ -90,13 +92,15 @@ class ControleurRechercheparcarte extends Controleur { if($nbLignes==0) { - $this->rediriger("Recherche"); - exit(); + // $this->rediriger("Recherche"); + // exit(); + + $msgErreur = 'Carte introuvable / Card not found'; } else { $beneficiaire = $beneficiaires->fetch(); - + /* var_dump( array( @@ -112,9 +116,8 @@ class ControleurRechercheparcarte extends Controleur { $this->rediriger("Fichebeneficiaire"); } - } } - $this->genererVue(); - } + $this->genererVue(array('msgErreur' => $msgErreur)); + } } \ No newline at end of file diff --git a/Vue/Ajaxinfosbonseance/index.php b/Vue/Ajaxinfosbonseance/index.php index 5b719ef..27fdf00 100755 --- a/Vue/Ajaxinfosbonseance/index.php +++ b/Vue/Ajaxinfosbonseance/index.php @@ -22,7 +22,7 @@ - +

diff --git a/Vue/Rechercheparcarte/index.php b/Vue/Rechercheparcarte/index.php index 15fd38e..3babdff 100755 --- a/Vue/Rechercheparcarte/index.php +++ b/Vue/Rechercheparcarte/index.php @@ -5,4 +5,11 @@
"> " > -
\ No newline at end of file + + + + +
+

+
+ \ No newline at end of file