73 lines
2.5 KiB
PHP
Executable File
73 lines
2.5 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Adherent.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
require_once 'Modele/Garantieadherent.php';
|
|
|
|
class ControleurRemplaceradherentcons extends Controleur {
|
|
private $menuvue;
|
|
private $adherent;
|
|
private $garantieadherent;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue('Remplaceradherentcons');
|
|
|
|
$this->adherent = new Adherent();
|
|
$this->garantieadherent = new Garantieadherent();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
|
|
$idAdherent_sortant = $_SESSION['idAdherent_C'];
|
|
|
|
$adherent_sortant = $this->adherent->getAdherentIdConso($idAdherent_sortant);
|
|
|
|
$remplacementadherent = $this->adherent->getremplacementadherent($idAdherent_sortant);
|
|
|
|
$idRemplacementadherent = $remplacementadherent['idRemplacementadherent'];
|
|
|
|
$idAdherent_entrant = $adherent_sortant['idRemplacant'];
|
|
|
|
$adherent_entrant = $this->adherent->getAdherentIdConso($idAdherent_entrant);
|
|
|
|
$garantieadherents = $this->adherent->getgarantieremplacementadherent($idAdherent_sortant);
|
|
|
|
$beneficiaires = $this->adherent->getbeneficiaireremplacementadherent($idRemplacementadherent);
|
|
|
|
$this->genererVue(array('adherent_sortant' => $adherent_sortant, 'remplacementadherent' => $remplacementadherent,
|
|
'adherent_entrant' => $adherent_entrant, 'garantieadherents' => $garantieadherents, 'beneficiaires' => $beneficiaires));
|
|
}
|
|
|
|
public function remplacant()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
|
|
$idAdherent_entrant = $_SESSION['idAdherent_C'];
|
|
$adherent_entrant = $this->adherent->getAdherentIdConso($idAdherent_entrant);
|
|
|
|
$idAdherent_sortant = $adherent_entrant['idRemplace'];
|
|
$adherent_sortant = $this->adherent->getAdherentIdConso($idAdherent_sortant);
|
|
|
|
$remplacementadherent = $this->adherent->getremplacementadherent($idAdherent_sortant);
|
|
$idRemplacementadherent = $remplacementadherent['idRemplacementadherent'];
|
|
|
|
$garantieadherents = $this->adherent->getgarantieremplacementadherent($idAdherent_sortant);
|
|
|
|
$beneficiaires = $this->adherent->getbeneficiaireremplacementadherent($idRemplacementadherent);
|
|
|
|
$this->genererVue(array('adherent_sortant' => $adherent_sortant, 'remplacementadherent' => $remplacementadherent,
|
|
'adherent_entrant' => $adherent_entrant, 'garantieadherents' => $garantieadherents, 'beneficiaires' => $beneficiaires));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|