29 lines
835 B
PHP
Executable File
29 lines
835 B
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Police.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
|
|
class ControleurTextecp extends Controleur {
|
|
private $menuvue;
|
|
private $textecp;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Textecp");
|
|
|
|
$this->textecp = new Police();
|
|
}
|
|
public function index() {
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
$textecp = $this->textecp->getTextecp($idPolice);
|
|
$this->genererVue(array('textecp' => $textecp));
|
|
}
|
|
|
|
public function enregistrer() {
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
$texteCp = $this->requete->getParametreFormulaire("texteCp");
|
|
$this->textecp->enregistrertexteCp($texteCp, $idPolice);
|
|
$this->rediriger("Fichepolice");
|
|
}
|
|
|
|
} |