production/Controleur/ControleurPagetmadherentgarantieprestataire.php
2025-12-02 11:29:44 +00:00

57 lines
2.0 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Adherent.php';
class ControleurPagetmadherentgarantieprestataire extends Controleur
{
private $menuvue;
private $ad;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Pagetmadherentgarantieprestataire');
$this->ad = new Adherent();
}
public function index()
{
$idAdherent = isset($_SESSION['idAdherent_C'])? $_SESSION['idAdherent_C']:"0";
if($idAdherent > "0")
{
$adh = $this->ad->trouverAdherentId($idAdherent);
$_SESSION['numeroAdherent_C'] = $adh['numero'];
$_SESSION['adherent_C'] = $adh['adherent'];
$_SESSION['nomPolice_C'] = $adh['nomPolice'];
$_SESSION['nomCollege_C'] = $adh['nomCollege'];
$_SESSION['codeLienParente_C'] = $adh['codeLienParente'];
}
$numeroAdherent = (isset($_SESSION['numeroAdherent_C']) && $idAdherent > "0")? $_SESSION['numeroAdherent_C']:"";
$adherent = (isset($_SESSION['adherent_C']) && $idAdherent > "0")? $_SESSION['adherent_C']:"";
$nomPolice = (isset($_SESSION['nomPolice_C']) && $idAdherent > "0")? $_SESSION['nomPolice_C']:"";
$nomCollege = (isset($_SESSION['nomCollege_C']) && $idAdherent > "0")? $_SESSION['nomCollege_C']:"";
$codeLienParente = (isset($_SESSION['codeLienParente_C']) && $idAdherent > "0")? $_SESSION['codeLienParente_C']:"";
$tmadherent = $this->ad->getTmadherentgarantieprestataire();
$garanties = $this->ad->getgarantie();
$chemin = $this->menuvue->getChemin('Pagetmadherentgarantieprestataire');
$this->genererVue(array(
'idAdherent' => $idAdherent,
'numeroAdherent' => $numeroAdherent,
'adherent' => $adherent,
'nomPolice' => $nomPolice,
'nomCollege' => $nomCollege,
'codeLienParente' => $codeLienParente,
'tmadherent' => $tmadherent,
'garanties' => $garanties ,'chemin' => $chemin
));
}
}