| 12 | jpm | 1 | <?php
 | 
        
           |  |  | 2 | // declare(encoding='UTF-8');
 | 
        
           |  |  | 3 | /**
 | 
        
           |  |  | 4 |  * Mon exemple d'application.
 | 
        
           |  |  | 5 |  * Fichier contenant les fonctions nécessaire pour l'insertion de l'application dans Papyrus.
 | 
        
           |  |  | 6 |  *
 | 
        
           |  |  | 7 |  * @category	PHP 5.2
 | 
        
           |  |  | 8 |  * @package		eflore-consultation
 | 
        
           |  |  | 9 |  * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
 | 
        
           |  |  | 10 |  * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
 | 
        
           |  |  | 11 |  * @copyright	2011 Tela-Botanica
 | 
        
           |  |  | 12 |  * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
 | 
        
           |  |  | 13 |  * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
 | 
        
           |  |  | 14 |  * @version		$Id$
 | 
        
           |  |  | 15 |  */
 | 
        
           |  |  | 16 |   | 
        
           | 1073 | aurelien | 17 | // Gestion des paramêtres passés par Papyrus
 | 
        
           |  |  | 18 | if (isset($GLOBALS['_GEN_commun']['info_application']->referentiel)) {
 | 
        
           |  |  | 19 | 	$_GET['referentiel'] = $GLOBALS['_GEN_commun']['info_application']->referentiel;
 | 
        
           |  |  | 20 | }
 | 
        
           |  |  | 21 |   | 
        
           | 12 | jpm | 22 | if (isset($GLOBALS['_GEN_commun']['info_application']->module) && !isset($_GET['module'])) {
 | 
        
           |  |  | 23 | 		$_GET['module'] = $GLOBALS['_GEN_commun']['info_application']->module;
 | 
        
           |  |  | 24 | }
 | 
        
           |  |  | 25 |   | 
        
           |  |  | 26 | /** Inclusion du fichier principal de l'application*/
 | 
        
           |  |  | 27 | require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'eflore.php';
 | 
        
           |  |  | 28 |   | 
        
           |  |  | 29 | // Définition des feuilles de style de l'application pour Papyrus
 | 
        
           | 111 | aurelien | 30 | // TODO: il y a surement mieux à faire pour obtenir l'url des fichiers
 | 
        
           |  |  | 31 | $chemin = $chemin = 'http://localhost/'.basename(dirname(__FILE__)).DS.'presentations'.DS;
 | 
        
           | 12 | jpm | 32 | GEN_stockerStyleExterne('eflore', $chemin.'styles'.DS.'eflore.css');
 | 
        
           | 111 | aurelien | 33 | GEN_stockerStyleExterne('jquery-ui', $chemin.'styles'.DS.'jquery-ui-1.8.16'.DS.'ui-lightness'.DS.'jquery-ui-1.8.16.custom.css');
 | 
        
           | 268 | aurelien | 34 | GEN_stockerStyleExterne('fancybox', $chemin.'styles'.DS.'fancybox'.DS.'jquery.fancybox-1.3.4.css');
 | 
        
           | 12 | jpm | 35 |   | 
        
           |  |  | 36 | // Définition des fichiers JS de l'application pour Papyrus
 | 
        
           | 111 | aurelien | 37 | GEN_stockerFichierScript('jquery-1.7', $chemin.'scripts'.DS.'jquery-1.7.js');
 | 
        
           |  |  | 38 | GEN_stockerFichierScript('jquery-ui-1.8.16', $chemin.'scripts'.DS.'jquery-ui-1.8.16.custom.min.js');
 | 
        
           | 268 | aurelien | 39 | GEN_stockerFichierScript('fancybox', $chemin.'scripts'.DS.'jquery.fancybox-1.3.4.pack.js');
 | 
        
           | 122 | aurelien | 40 | GEN_stockerFichierScript('autocompletion', $chemin.'scripts'.DS.'recherche.js');
 | 
        
           | 296 | aurelien | 41 | GEN_stockerFichierScript('cookie', $chemin.'scripts'.DS.'jquery.cookie.js');
 | 
        
           | 12 | jpm | 42 |   | 
        
           |  |  | 43 | // +--------------------------------------------------------------------------------------------------+
 | 
        
           |  |  | 44 | // Remplacement de méta tags fournit par Papyrus par ceux créés dans l'appli
 | 
        
           |  |  | 45 | if (AppControleur::getMetaTitre() != '') {
 | 
        
           |  |  | 46 | 	$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = AppControleur::getMetaTitre();
 | 
        
           |  |  | 47 | }
 | 
        
           |  |  | 48 | if (AppControleur::getMetaDescription() != '') {
 | 
        
           |  |  | 49 | 	GEN_modifierMetaName('description', AppControleur::getMetaDescription());
 | 
        
           |  |  | 50 | }
 | 
        
           |  |  | 51 | if (AppControleur::getMetaTags() != '') {
 | 
        
           |  |  | 52 | 	GEN_modifierMetaName('keywords', AppControleur::getMetaTags());
 | 
        
           |  |  | 53 | }
 | 
        
           |  |  | 54 |   | 
        
           |  |  | 55 | // +--------------------------------------------------------------------------------------------------+
 | 
        
           |  |  | 56 | // Fonctions d'affichage dans Papyrus
 | 
        
           |  |  | 57 | /**
 | 
        
           |  |  | 58 |  * Fonction d'affichage de Papyrus, pour le corps de page.
 | 
        
           |  |  | 59 |  */
 | 
        
           |  |  | 60 | function afficherContenuCorps() {
 | 
        
           |  |  | 61 | 	return AppControleur::getContenuCorps();
 | 
        
           |  |  | 62 | }
 | 
        
           |  |  | 63 |   | 
        
           |  |  | 64 | function afficherContenuTete() {
 | 
        
           |  |  | 65 | 	return AppControleur::getContenuTete();
 | 
        
           |  |  | 66 | }
 | 
        
           |  |  | 67 |   | 
        
           |  |  | 68 | function afficherContenuPied() {
 | 
        
           |  |  | 69 | 	return AppControleur::getContenuPied();
 | 
        
           |  |  | 70 | }
 | 
        
           |  |  | 71 |   | 
        
           |  |  | 72 | function afficherContenuNavigation() {
 | 
        
           |  |  | 73 | 	return AppControleur::getContenuNavigation();
 | 
        
           |  |  | 74 | }
 | 
        
           |  |  | 75 |   | 
        
           |  |  | 76 | function afficherContenuMenu() {
 | 
        
           |  |  | 77 | 	return AppControleur::getContenuMenu();
 | 
        
           |  |  | 78 | }
 | 
        
           |  |  | 79 | ?>
 |