prestation/Controleur/ControleurFicheprospect.php
2025-12-05 10:42:46 +00:00

46 lines
1.1 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Client_d.php';
require_once 'Modele/Police_d.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurFicheprospect extends Controleur {
private $menuvue;
private $client;
private $police;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue("Ficheprospect");
$this->client = new Client_d();
$this->police = new police_d();
$_SESSION['modeDevis'] = "1";
}
public function index()
{
$id = $_SESSION['idClient_d_Ajax'];
$this->client->getContexteClientId($id);
$client = $this->client->getClientId($id);
$polices = $this->police->getPolicesId($id);
$_SESSION['numeroOptionTarif'] = "1";
$this->genererVue(array('client' => $client, 'polices' => $polices));
}
public function supprimer() {
$id = $_SESSION['idClient_d_Ajax'];
if($this->client->supprimer($id))
{
$this->rediriger("Listeprospects");
}
else
{
$this->rediriger("Ficheprospect");
}
}
}