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

39 lines
991 B
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Adherent.php';
require_once 'Modele/Police.php';
class ControleurAjaxfiltreadherentparcollege extends Controleur
{
private $adherent;
private $police;
public function __construct()
{
$this->adherent = new Adherent();
$this->police = new Police();
}
public function index()
{
$idCollegePolice = $this->requete->getParametreFormulaire("idCollegePolice");
$_SESSION["idCollegePolice"] = $idCollegePolice;
$idPolice = $_SESSION['idPolice_C'];
$collegesPolice = $this->police->getListeCollegePolice($idPolice);
//var_dump();
if($idCollegePolice > "0"){
$adherents = $this->adherent->getlisteassuresparcollege($idPolice, $idCollegePolice);
}else{
$adherents = $this->adherent->getlisteassuresexo($idPolice);
}
$this->genererVueAjax(array('adherents' => $adherents, 'collegesPolice' => $collegesPolice));
}
}