Initial commit for newdesigngestionnaire project
This commit is contained in:
48
Controleur/ControleurCompta.php
Executable file
48
Controleur/ControleurCompta.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Client.php';
|
||||
require_once 'Modele/Police.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
|
||||
class ControleurCompta extends Controleur {
|
||||
private $menuvue;
|
||||
private $client;
|
||||
private $police;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Compta");
|
||||
|
||||
$this->client = new Client();
|
||||
$this->police = new Police();
|
||||
|
||||
$_SESSION['modeDevis'] = "0";
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idClient = $this->requete->getParametreFormulaire("id");
|
||||
$idClient = ($idClient<=" " ? "0" : $idClient);
|
||||
$this->client->getContexteClientId($idClient);
|
||||
$client = $this->client->getClientId($idClient);
|
||||
|
||||
$polices = $this->police->getPolicesId($idClient);
|
||||
|
||||
$this->genererVue(array('client' => $client, 'polices' => $polices));
|
||||
}
|
||||
|
||||
public function changercompte()
|
||||
{
|
||||
$numeroClient = $this->requete->getParametre("numeroClient");
|
||||
$idClient = $this->client->getIdClient($numeroClient);
|
||||
$this->rediriger("Compta", $idClient);
|
||||
}
|
||||
|
||||
public function changercomptepop()
|
||||
{
|
||||
$numeroClient = $this->requete->getParametre("numeroClientpop");
|
||||
$idClient = $this->client->getIdClient($numeroClientpop);
|
||||
$this->rediriger("Compta", $idClient);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user