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

58 lines
1.8 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Police.php';
require_once 'Modele/College_temp.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Ouinon.php';
class ControleurFicherenouvellement extends Controleur {
private $menuvue;
private $avenant;
private $college_temp;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue("Ficherenouvellement");
$this->avenant = new Police();
$this->college_temp = new College_temp();
$this->ouinonajustement = (new Ouinon())->getListe();
}
public function index() {
$user = $_SESSION['login'];
$idPolice = $_SESSION['idPolice_C'];
$dateEcheance = $_SESSION['dateEcheance_C'];
$dateAvenant = $_SESSION['dateAvenant_C'];
$dateEcheanceRen = $_SESSION['dateEcheanceRen_C'];
$this->avenant->initrerenouvellement($idPolice);
$emission = $this->avenant->getEmissionTemp($idPolice);
$avenant = $this->avenant->getAvenantTemp($idPolice);
$sppolice = $this->avenant->getRapportSpPolice($idPolice, $dateEcheance);
// $colleges = $this->college_temp->getCollegeTempPoliceRen($idPolice, $user) ;
$colleges = $this->college_temp->getCollegeLienParenteTempPoliceRen($idPolice, $user) ;
$chemin = $this->menuvue->getChemin('Ficherenouvellement');
$this->genererVue(array
(
'colleges' => $colleges,
'emission' => $emission,
'avenant' => $avenant,
'sppolice' => $sppolice,
'chemin' => $chemin,
'ouinonajustement' => $this->ouinonajustement
));
}
public function enregistrerrenouvellement()
{
$this->avenant->enregistrerrenouvellement();
// $this->rediriger("Fichepolice");
$this->rediriger("Collegepolice");
}
}