41 lines
954 B
PHP
Executable File
41 lines
954 B
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
require_once 'Modele/Etatcp.php';
|
|
require_once 'Modele/Police.php';
|
|
|
|
class ControleurContrat extends Controleur
|
|
{
|
|
private $etat;
|
|
private $police;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Contrat");
|
|
|
|
$this->etat = new Etatcp();
|
|
$this->police = new Police();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
|
|
$idPolice = $_SESSION['idPolice_C'] ;
|
|
$prestationPossible = $this->police->prestationPossible($idPolice);
|
|
|
|
$estAgence = $this->police->estAgence($idPolice);
|
|
|
|
/*
|
|
if($prestationPossible!="1")
|
|
{
|
|
$this->rediriger("Fichepolice");
|
|
exit();
|
|
}
|
|
*/
|
|
|
|
$etats = $this->etat->getEtatcp() ;
|
|
|
|
$this->genererVue(array('etats' => $etats, 'prestationPossible' => $prestationPossible, 'estAgence' => $estAgence));
|
|
}
|
|
} |