Rev 289 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php// declare(encoding='UTF-8');/*** Classe Controleur du module Accueil.* Affichage les infos sur l'ensemble des référentiels disponibles.** @package Referentiel* @category Php5.2* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>* @copyright 2010 Tela-Botanica* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL* @version SVN: $Id$*/class Accueil extends AppliControleur {private $referentiel = null;private $referentielDao = null;public function __construct() {parent::__construct();// Récupération de paramêtresif (isset($_GET['ref'])) { // code du projet courrant$this->referentiel = strtolower(strip_tags($_GET['ref']));}// Chargement des DAO nécessaires$this->referentielDao = new ReferentielDao();}//+----------------------------------------------------------------------------------------------------------------+// Méthodes/*** Fonction d'affichage par défaut*/public function executerActionParDefaut() {return $this->afficherAccueil();}/*** Affiche la liste des référentiels*/public function afficherAccueil() {$donnees = array();$this->initialiserModulePrincipal();$infos = $this->referentielDao->getReferentielsDispo();if ($infos != false) {$referentiel = array();foreach ($infos as $info) {$referentiel['nom'] = $info;$referentiel['titre'] = $this->referentielDao->getNom($info);$referentiel['url'] = $this->obtenirUrlMenuConsultation($info);$referentiel['date'] = $this->referentielDao->getDateMiseAJour($info);$donnees['referentiels'][] = $referentiel;}} else {$this->addMessage("Aucun référentiel n'est disponible.");}$donnees['messages'] = $this->getMessages();$this->traiterEsperluette($donnees);$this->setSortie(self::RENDU_CORPS, $this->getVue('accueil', $donnees), false);$this->construireFilAriane();}}?>