Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 127 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3                                                                                      |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation.                                                            |
// |                                                                                                      |
// | Foobar is free software; you can redistribute it and/or modify                                       |
// | it under the terms of the GNU General Public License as published by                                 |
// | the Free Software Foundation; either version 2 of the License, or                                    |
// | (at your option) any later version.                                                                  |
// |                                                                                                      |
// | Foobar is distributed in the hope that it will be useful,                                            |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
// | GNU General Public License for more details.                                                         |
// |                                                                                                      |
// | You should have received a copy of the GNU General Public License                                    |
// | along with Foobar; if not, write to the Free Software                                                |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: eflore.php,v 1.8 2005-02-15 12:59:58 jpm Exp $
/**
* Application de consultation des données d'eFlore.
*
* Moteur de recherche aboutissant à une page contenant la fiche d'un nom.
* Plusieurs onglets sont alors disponiblent, chacun affichant des infos spécifiques
* - nomenclature et taxinomie
* - chorologie
* - illustration
* - ...
*
*@package eFlore
//Auteur original :
*@author        Linda ANGAMA <linda_angama@yahoo.fr>
//Autres auteurs :
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright     Tela-Botanica 2000-2004
*@version       $Revision: 1.8 $ $Date: 2005-02-15 12:59:58 $
// +------------------------------------------------------------------------------------------------------+
*/

// +------------------------------------------------------------------------------------------------------+
// |                                            ENTÊTE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier config de l'application eflore. */
require_once GEN_CHEMIN_CLIENT.'eflore/configuration/eflore_config.inc.php';
/** Inclusion du fichier de langue de l'application eflore. */
require_once GEN_CHEMIN_CLIENT.'eflore/langues/eflore_langue_'.EFLORE_LANGUE.'.inc.php';

/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
require_once 'DB.php';
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
require_once 'HTML/QuickForm.php';
/** Inclusion de la bibliothèque PEAR de gestion des URL.*/
require_once 'Net/URL.php';

// Ajout d'une feuille de style propre à eFlore.
GEN_stockerStyleExterne('eflore', EFLORE_CHEMIN_STYLE.'eflore.css');

// Attribution à la variable de session des recherches effectuées
if (isset($_REQUEST['eflore_form_nomenclature']) || isset($_REQUEST['eflore_form_taxonomie'])) {
    $_SESSION['_EFLORE_']['rechercher'] = $_REQUEST;
}

// +------------------------------------------------------------------------------------------------------+
// |                                            CORPS du PROGRAMME                                        |
// +------------------------------------------------------------------------------------------------------+

function afficherContenuNavigation()
{
    $sortie  = '';
    return $sortie;
}

function afficherContenuTete()
{
    // Transférer tout ceci dans la fonction afficherContenuNavigation().
    $sortie  = '';
    if (isset($_GET[EFLORE_LG_URL_NN])) {
        $GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $_GET[EFLORE_LG_URL_NN]);
        $GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, $_GET[EFLORE_LG_URL_ACTION]);
        $sortie .= '<ul class="menu_n3">';
        $GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
        $sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_PRINCIPAL.'</a></li>';
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
        $GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_ILLUSTRATION);
        $sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_ILLUSTRATION.'</a></li>';
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
        $sortie .= '</ul>';
    }
    return $sortie;
}

function afficherContenuCorps()
{
    // +--------------------------------------------------------------------------------------------------+
    // Initialisation
    /** Definition de la variable globale d'eFlore contenant la connexion à la base de données.*/
    $GLOBALS['_EFLORE_']['bdd']= DB::connect(EFLORE_DSN);
    // Allias temporaire
    $GLOBALS['db_eflore']= $GLOBALS['_EFLORE_']['bdd'];
    $sortie = '';
    
    // +--------------------------------------------------------------------------------------------------+
    // Gestion des actions
    if (isset($_REQUEST[EFLORE_LG_URL_ACTION])) {
        switch ($_REQUEST[EFLORE_LG_URL_ACTION]) {
            case EFLORE_LG_URL_ACTION_RECH_NOM :
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
                break;
            case EFLORE_LG_URL_ACTION_RECH_TAX :
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
                break;
            case EFLORE_LG_URL_ACTION_FICHE :
                include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
                break;
            default:
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
        }
    } else {
        include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
    }
    // +--------------------------------------------------------------------------------------------------+
    // Gestion des statistiques
    // A faire...
    
    // +--------------------------------------------------------------------------------------------------+
    // Gestion des onglets à transférer dans le fichier fiche!
    /** Inclusion des fonctions de l'application eflore. */
    /*
    require_once EFLORE_CHEMIN_BIBLIO.'eflore.fonct.php';
    if (!isset($_GET[EFLORE_LG_URL_ONGLET])) {
        $sortie = '';
    } else if ($_GET[EFLORE_LG_URL_ONGLET] == EFLORE_LG_URL_ONGLET_PHOTO) {
        if(!isset($_GET['soum'])) {
            if (isset($_GET['modif'])) {
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo_modif.inc.php';
            } else {
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo.inc.php';
            }
        } else {
            include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
        }
        $GLOBALS['_EFLORE_']['bdd']->disconnect();
        $sortie = $res;
    }
    */
    return $sortie;
}

function afficherContenuPied()
{
    $sortie  = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'</p>';
    return $sortie;
}

// +------------------------------------------------------------------------------------------------------+
// |                                            PIED du PROGRAMME                                         |
// +------------------------------------------------------------------------------------------------------+


/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7  2005/01/28 19:47:55  jpm
* Ajout de la recherche pour les taxons.
*
* Revision 1.6  2005/01/03 19:44:40  jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.5  2004/12/23 20:05:17  jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>