a
This commit is contained in:
19
Controleur/ControleurMouvementassure.php
Normal file
19
Controleur/ControleurMouvementassure.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Reponseententeprealable.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
class ControleurMouvementassure extends Controleur {
|
||||
private $menuvue;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue('Mouvementassure');
|
||||
|
||||
$this->reponseententeprealable = (new Reponseententeprealable())->getListe();
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$this->genererVue(array('reponseententeprealable' => $this->reponseententeprealable));
|
||||
}
|
||||
}
|
||||
65
Controleur/ControleurRecherche.php
Normal file
65
Controleur/ControleurRecherche.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Beneficiaire.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
class ControleurRecherche extends Controleur {
|
||||
private $beneficiaire;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Recherche");
|
||||
|
||||
$this->beneficiaire = new Beneficiaire();
|
||||
|
||||
$_SESSION['modeDevis'] = "0";
|
||||
|
||||
$_SESSION['okId'] = "-1";
|
||||
$_SESSION['okId_face'] = "-1";
|
||||
}
|
||||
|
||||
public function index($numeroBeneficiaire="", $numeroAdherent="", $nomBeneficiaire="",
|
||||
$prenomsBeneficiaire="", $telephonePortable="", $email="")
|
||||
{
|
||||
$this->beneficiaire->getModeBiometrie();
|
||||
|
||||
if (isset($_POST['numeroBeneficiaire']))
|
||||
{
|
||||
$numeroBeneficiaire=trim($_POST['numeroBeneficiaire']);
|
||||
$numeroAdherent=trim($_POST['numeroAdherent']);
|
||||
$nomBeneficiaire=trim($_POST['nomBeneficiaire']);
|
||||
$prenomsBeneficiaire=trim($_POST['prenomsBeneficiaire']);
|
||||
$telephonePortable=trim($_POST['telephonePortable']);
|
||||
$email=trim($_POST['email']);
|
||||
|
||||
if ($numeroBeneficiaire<=" " && $numeroAdherent<=" " && $numeroBeneficiaire<=" " &&
|
||||
$nomBeneficiaire<=" " && $prenomsBeneficiaire<=" " && $telephonePortable<=" " && $email<=" ")
|
||||
{
|
||||
$beneficiaires = $this->beneficiaire->getBeneficiaireVide();
|
||||
} else
|
||||
if ($numeroBeneficiaire>" ")
|
||||
{
|
||||
$beneficiaires = $this->beneficiaire->getBeneficiaire($numeroBeneficiaire);
|
||||
} else
|
||||
if ($numeroAdherent>" ")
|
||||
{
|
||||
$beneficiaires = $this->beneficiaire->getBeneficiairesAdh($numeroAdherent);
|
||||
} else
|
||||
{
|
||||
$beneficiaires = $this->beneficiaire->getBeneficiaires($nomBeneficiaire, $prenomsBeneficiaire, $telephonePortable, $email);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$beneficiaires = $this->beneficiaire->getBeneficiaireVide();
|
||||
}
|
||||
|
||||
if ($beneficiaires->rowCount() == 1)
|
||||
{
|
||||
$beneficiaire = $beneficiaires->fetch();
|
||||
$this->rediriger("Fichebeneficiaire", $beneficiaire['id']);
|
||||
} else
|
||||
{
|
||||
$this->genererVue(array('beneficiaires' => $beneficiaires));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user