Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 58 → Rev 59

/trunk/eflore.php
1,25 → 1,27
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | This file is part of eFlore-consultation. |
// | |
// | This library is distributed in the hope that it will be useful, |
// | 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 |
// | Lesser General Public License for more details. |
// | 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 Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | 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.4 2004-08-17 11:15:07 linda Exp $
// CVS : $Id: eflore.php,v 1.5 2004-12-23 20:05:17 jpm Exp $
/**
* Application de consultation des données d'eFlore.
*
36,7 → 38,7
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2004-08-17 11:15:07 $
*@version $Revision: 1.5 $ $Date: 2004-12-23 20:05:17 $
// +------------------------------------------------------------------------------------------------------+
*/
 
43,68 → 45,101
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
/** <br> Inclusion du fichier config de l'application eflore. */
/** 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';
require_once GEN_CHEMIN_CLIENT.'eflore/bibliotheque/fonctions/eflore.fonct.php';
 
/** <br> Inclusion de la classe PEAR d'abstraction de base de donnée. */
/** 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';
 
/** Definition de la variable globale db_eflore.*/
$GLOBALS['db_eflore']= DB::connect(EFLORE_DSN);
// Ajout d'une feuille de style propre à eFlore.
GEN_stockerStyleExterne('eflore', EFLORE_CHEMIN_STYLE.'eflore.css');
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici le code du programme*/
 
function afficherContenuNavigation()
{
$sortie = '';
return $sortie;
}
 
function afficherContenuTete()
{
$sortie = '<p><a href="#">Nomenclature </a><a href="papyrus.php?site=3&menu=39&onglet=photo">Illustration</a></p>';
// Transférer tout ceci dans la fonction afficherContenuNavigation().
$sortie = '';
$sortie .= '<ul class="menu_n3">';
$GLOBALS['_EFLORE_']['objet_pear_url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['objet_pear_url']->getURL().'">'.EFLORE_LG_ONGLET_PRINCIPAL.'</a></li>';
$GLOBALS['_EFLORE_']['objet_pear_url']->removeQueryString(EFLORE_LG_URL_ONGLET);
$GLOBALS['_EFLORE_']['objet_pear_url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_PHOTO);
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['objet_pear_url']->getURL().'">'.EFLORE_LG_ONGLET_ILLUSTRATION.'</a></li>';
$GLOBALS['_EFLORE_']['objet_pear_url']->removeQueryString(EFLORE_LG_URL_ONGLET);
$sortie .= '</ul>';
return $sortie;
}
 
function afficherContenuCorps()
{
if (!isset($_GET['onglet']))
{
$sortie = "";
// +--------------------------------------------------------------------------------------------------+
// 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($_GET[EFLORE_LG_URL_ACTION])) {
switch ($_GET[EFLORE_LG_URL_ACTION]) {
case 'nomenclature':
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
break;
case 'taxonomique':
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomique.inc.php';
break;
case 'fiche':
include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
break;
}
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
}
elseif($_GET['onglet']=='photo')
{
if(!isset($_GET['soum']))
{
if (isset($_GET['modif'])){
include_once GEN_CHEMIN_CLIENT.'eflore/eflore_modif.inc.php';
$sortie=$res;
// +--------------------------------------------------------------------------------------------------+
// 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 GEN_CHEMIN_CLIENT.'eflore/eflore_photo.inc.php';
$sortie=$res;
}
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
}
else
{
include_once GEN_CHEMIN_CLIENT.'eflore/eflore_soum.inc.php';
$sortie=$res;
}
 
$GLOBALS['db_eflore']->disconnect();
$sortie=$res;
$GLOBALS['_EFLORE_']['bdd']->disconnect();
$sortie = $res;
}
*/
return $sortie;
}
 
function afficherContenuPied()
{
$sortie = '<p>Application eFlore. 2004</p>';
$sortie = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'</p>';
return $sortie;
}
 
111,12 → 146,11
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Partie non obligatoire*/
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log $
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/