43 lines
1.0 KiB
PHP
Executable File
43 lines
1.0 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Client.php';
|
|
require_once 'Modele/Police.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
|
|
class ControleurFicheclient extends Controleur {
|
|
private $menuvue;
|
|
private $client;
|
|
private $police;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Ficheclient");
|
|
|
|
$this->client = new Client();
|
|
$this->police = new Police();
|
|
|
|
$_SESSION['modeDevis'] = "0";
|
|
}
|
|
public function index() {
|
|
$id = $_SESSION['idClientAjax'];
|
|
|
|
$this->client->getContexteClientId($id);
|
|
$client = $this->client->getClientId($id);
|
|
$polices = $this->police->getPolicesId($id);
|
|
|
|
$this->genererVue(array('client' => $client, 'polices' => $polices));
|
|
}
|
|
|
|
public function supprimer() {
|
|
$id = $_SESSION['idClientAjax'];
|
|
|
|
if($this->client->supprimer($id))
|
|
{
|
|
$this->rediriger("Listeclients");
|
|
}
|
|
else
|
|
{
|
|
$this->rediriger("Ficheclient");
|
|
}
|
|
}
|
|
} |