Initial commit for newdesigngestionnaire project
This commit is contained in:
43
Controleur/ControleurAdmin.php
Executable file
43
Controleur/ControleurAdmin.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
require_once 'ControleurSecurise.php';
|
||||
require_once 'Modele/Billet.php';
|
||||
require_once 'Modele/Commentaire.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
/**
|
||||
* Contrôleur des actions d'administration
|
||||
*
|
||||
* @author Baptiste Pesquet
|
||||
*/
|
||||
class ControleurAdmin extends ControleurSecurise
|
||||
{
|
||||
private $menuvue;
|
||||
private $billet;
|
||||
private $commentaire;
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Admin");
|
||||
|
||||
$this->billet = new Billet();
|
||||
$this->commentaire = new Commentaire();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$nbBillets = $this->billet->getNombreBillets();
|
||||
$nbCommentaires = $this->commentaire->getNombreCommentaires();
|
||||
$login = $this->requete->getSession()->getAttribut("login");
|
||||
|
||||
$chemin = $this->menuvue->getChemin('Admin');
|
||||
|
||||
$this->genererVue(array('nbBillets' => $nbBillets, 'nbCommentaires' => $nbCommentaires, 'login' => $login,
|
||||
'chemin' => $chemin));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user