64 lines
1.6 KiB
PHP
64 lines
1.6 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Police_d.php';
|
|
require_once 'Modele/Collegepolice_d.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
|
|
class ControleurFichedevis extends Controleur
|
|
{
|
|
private $police;
|
|
private $college;
|
|
|
|
private $menuvue;
|
|
public function __construct()
|
|
{
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Fichedevis");
|
|
|
|
$this->police = new Police_d();
|
|
$this->college = new Collegepolice_d();
|
|
|
|
$_SESSION['modeDevis'] = "1";
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
|
|
|
$this->police->getContextePoliceId($idPolice);
|
|
$police = $this->police->getPoliceId($idPolice);
|
|
|
|
$numeroOptionTarif = $_SESSION['numeroOptionTarif'];
|
|
|
|
$optionstarif = $this->college->getoptionstarif($idPolice);
|
|
|
|
$colleges = $this->college->getCollegesPolice($idPolice, $numeroOptionTarif);
|
|
|
|
$totalcollege = $this->college->getTotaldcollege($idPolice, $numeroOptionTarif);
|
|
|
|
$this->genererVue(array('police' => $police, 'colleges' => $colleges, 'totalcollege' => $totalcollege,
|
|
'optionstarif' => $optionstarif));
|
|
}
|
|
|
|
public function supprimer()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
|
|
|
if($this->police->supprimer($idPolice))
|
|
{
|
|
$this->rediriger("Ficheprospect");
|
|
}
|
|
else
|
|
{
|
|
$this->rediriger("Fichedevis");
|
|
}
|
|
}
|
|
|
|
public function supprimerCollege()
|
|
{
|
|
$idCollege = $this->requete->getParametre("id");
|
|
|
|
$this->college->supprimer($idCollege);
|
|
$this->rediriger("Fichedevis");
|
|
}
|
|
} |