prestation/Controleur/ControleurPrestations.php
2025-12-05 10:42:46 +00:00

58 lines
1.9 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Beneficiaire.php';
require_once 'Modele/Police.php';
require_once 'Modele/Garantieadherent.php';
require_once 'Modele/Pbeneficiaire.php';
require_once 'Modele/Lienparente.php';
require_once 'Modele/Naturepiece.php';
require_once 'Modele/Sexe.php';
class ControleurPrestations extends Controleur {
private $menuvue;
private $beneficiaire;
private $garantieadherent;
private $pbeneficiaire;
private $lienparente;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Prestations');
$this->beneficiaire = new Beneficiaire();
$this->police = new Police();
$this->garantieadherent = new Garantieadherent();
$this->pbeneficiaire = new Pbeneficiaire();
$this->liensubstitut = (new Lienparente())->getListeSubstitut();
$this->naturepiece = (new Naturepiece())->getListe();
$this->sexe = (new Sexe())->getListe();
$_SESSION['modeDevis'] = "0";
}
public function index()
{
$id = $this->requete->getParametre("id");
$idBeneficiaire = $id;
$this->beneficiaire->getContexteBeneficiaireId($id);
$idPolice = $_SESSION['idPolice_C'];
$this->police->getContextePoliceId($idPolice);
$beneficiaire = $this->pbeneficiaire->getContexteBeneficiaireIdPrest($idBeneficiaire);
$idAdherent = $_SESSION['idAdherent_C'];
// $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent);
$garantieadherents = $this->garantieadherent->getGarantieBeneficiaire($idBeneficiaire);
// A enlever après
$_SESSION['lienServeur'] = $_SESSION['lienProduction_C'];
$this->genererVue(array('beneficiaire' => $beneficiaire, 'garantieadherents' => $garantieadherents,
'liensubstitut' => $this->liensubstitut, 'naturepiece' => $this->naturepiece, 'sexe' => $this->sexe));
}
}