39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Collegepolice_d.php';
|
|
require_once 'Modele/Police_d.php';
|
|
|
|
class ControleurAjaxlistecolleged extends Controleur {
|
|
private $police;
|
|
private $college;
|
|
|
|
public function __construct() {
|
|
$this->police = new Police_d();
|
|
$this->college = new Collegepolice_d();
|
|
}
|
|
|
|
public function index() {
|
|
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
|
|
|
$police = $this->police->getPoliceId($idPolice);
|
|
|
|
$numeroOptionTarif = $this->requete->getParametreFormulaire("numeroOptionTarif");
|
|
$_SESSION['numeroOptionTarif'] = $numeroOptionTarif;
|
|
|
|
$colleges = $this->college->getCollegesPolice($idPolice, $numeroOptionTarif);
|
|
|
|
$totalcollege = $this->college->getTotaldcollege($idPolice, $numeroOptionTarif);
|
|
|
|
$this->genererVueAjax(array('police' => $police, 'colleges' => $colleges, 'totalcollege' => $totalcollege));
|
|
}
|
|
|
|
public function supprimeroption()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
|
|
|
$numeroOptionTarif = $this->requete->getParametreFormulaire("numeroOptionTarif");
|
|
|
|
$this->college->supprimeroption($idPolice, $numeroOptionTarif);
|
|
// $this->rediriger("Fichedevis");
|
|
}
|
|
} |