| 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 |   | 
        
           | 1098 | raphael | 29 | $chemin = '/eflore/consultation/';
 | 
        
           |  |  | 30 | $chemin_commun = 'http://www.tela-botanica.org/commun/';
 | 
        
           | 12 | jpm | 31 | // Définition des feuilles de style de l'application pour Papyrus
 | 
        
           | 111 | aurelien | 32 | // TODO: il y a surement mieux à faire pour obtenir l'url des fichiers
 | 
        
           | 1246 | aurelien | 33 | GEN_stockerStyleExterne('jquery-ui', $chemin_commun.'jquery/jquery-ui/1.10.2/css/ui-lightness/jquery-ui-1.10.2.custom.css');
 | 
        
           | 1098 | raphael | 34 | GEN_stockerStyleExterne('fancybox', $chemin_commun.'jquery/fancybox/1.3.4/jquery.fancybox-1.3.4.css');
 | 
        
           |  |  | 35 | GEN_stockerStyleExterne('eflore', $chemin.'/presentations/styles/eflore.css');
 | 
        
           | 12 | jpm | 36 |   | 
        
           | 1199 | mathias | 37 | // OpenSearch dynamique
 | 
        
           |  |  | 38 | $referentiel = 'bdtfx';
 | 
        
           |  |  | 39 | if (isset($_GET['referentiel'])) $referentiel = $_GET['referentiel'];
 | 
        
           | 1202 | mathias | 40 | $titreOpenSearch = 'eFlore ' . strtoupper($referentiel) . ' : noms scientifiques';
 | 
        
           |  |  | 41 | $cheminOpenSearch = Config::get('base_url_application') . 'configurations/RechercheOpenSearch/OpenSearch' . ucfirst($referentiel) . '.xml';
 | 
        
           | 1200 | mathias | 42 | GEN_stockerStyleExterne('opensearch-description', $cheminOpenSearch, $titreOpenSearch, 'search', 'application/opensearchdescription+xml', '');
 | 
        
           | 1199 | mathias | 43 |   | 
        
           | 12 | jpm | 44 | // Définition des fichiers JS de l'application pour Papyrus
 | 
        
           | 1098 | raphael | 45 | GEN_stockerFichierScript('jquery-1.7', $chemin_commun.'jquery/1.7.1'.DS.'jquery-1.7.1.js');
 | 
        
           | 1287 | mathias | 46 | GEN_stockerFichierScript('jquery-ui-1.10.2', $chemin_commun.'jquery/jquery-ui/1.10.2/js'.DS.'jquery-ui-1.10.2.custom.min.js');
 | 
        
           | 1098 | raphael | 47 | GEN_stockerFichierScript('fancybox', $chemin_commun.'/jquery/fancybox/1.3.4'.DS.'jquery.fancybox-1.3.4.pack.js');
 | 
        
           |  |  | 48 | GEN_stockerFichierScript('cookie', $chemin_commun.'jquery/cookie/1.0/jquery.cookie.min.js');
 | 
        
           |  |  | 49 | GEN_stockerFichierScript('eflore-general', $chemin.'presentations/scripts'.DS.'eflore.js');
 | 
        
           |  |  | 50 | GEN_stockerFichierScript('autocompletion', $chemin.'presentations/scripts'.DS.'recherche.js');
 | 
        
           |  |  | 51 | GEN_stockerFichierScript('eflore-synthese', $chemin.'presentations/scripts'.DS.'fiche-synthese.js');
 | 
        
           | 12 | jpm | 52 |   | 
        
           |  |  | 53 | // +--------------------------------------------------------------------------------------------------+
 | 
        
           |  |  | 54 | // Remplacement de méta tags fournit par Papyrus par ceux créés dans l'appli
 | 
        
           |  |  | 55 | if (AppControleur::getMetaTitre() != '') {
 | 
        
           |  |  | 56 | 	$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = AppControleur::getMetaTitre();
 | 
        
           |  |  | 57 | }
 | 
        
           |  |  | 58 | if (AppControleur::getMetaDescription() != '') {
 | 
        
           |  |  | 59 | 	GEN_modifierMetaName('description', AppControleur::getMetaDescription());
 | 
        
           |  |  | 60 | }
 | 
        
           |  |  | 61 | if (AppControleur::getMetaTags() != '') {
 | 
        
           |  |  | 62 | 	GEN_modifierMetaName('keywords', AppControleur::getMetaTags());
 | 
        
           |  |  | 63 | }
 | 
        
           |  |  | 64 |   | 
        
           |  |  | 65 | // +--------------------------------------------------------------------------------------------------+
 | 
        
           |  |  | 66 | // Fonctions d'affichage dans Papyrus
 | 
        
           |  |  | 67 | /**
 | 
        
           |  |  | 68 |  * Fonction d'affichage de Papyrus, pour le corps de page.
 | 
        
           |  |  | 69 |  */
 | 
        
           |  |  | 70 | function afficherContenuCorps() {
 | 
        
           |  |  | 71 | 	return AppControleur::getContenuCorps();
 | 
        
           |  |  | 72 | }
 | 
        
           |  |  | 73 |   | 
        
           |  |  | 74 | function afficherContenuTete() {
 | 
        
           |  |  | 75 | 	return AppControleur::getContenuTete();
 | 
        
           |  |  | 76 | }
 | 
        
           |  |  | 77 |   | 
        
           |  |  | 78 | function afficherContenuPied() {
 | 
        
           |  |  | 79 | 	return AppControleur::getContenuPied();
 | 
        
           |  |  | 80 | }
 | 
        
           |  |  | 81 |   | 
        
           |  |  | 82 | function afficherContenuNavigation() {
 | 
        
           |  |  | 83 | 	return AppControleur::getContenuNavigation();
 | 
        
           |  |  | 84 | }
 | 
        
           |  |  | 85 |   | 
        
           |  |  | 86 | function afficherContenuMenu() {
 | 
        
           | 1228 | jpm | 87 | 	//Retour du menu vide dans le cas de l'affichage dans Papyrus
 | 
        
           |  |  | 88 | 	// AppControleur::getContenuMenu()
 | 
        
           |  |  | 89 | 	return '';
 | 
        
           | 12 | jpm | 90 | }
 | 
        
           |  |  | 91 | ?>
 |