2 |
linda |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
59 |
jpm |
4 |
// | PHP version 4.3 |
|
2 |
linda |
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
59 |
jpm |
8 |
// | This file is part of eFlore-consultation. |
|
2 |
linda |
9 |
// | |
|
59 |
jpm |
10 |
// | Foobar is free software; you can redistribute it and/or modify |
|
|
|
11 |
// | it under the terms of the GNU General Public License as published by |
|
|
|
12 |
// | the Free Software Foundation; either version 2 of the License, or |
|
|
|
13 |
// | (at your option) any later version. |
|
|
|
14 |
// | |
|
|
|
15 |
// | Foobar is distributed in the hope that it will be useful, |
|
2 |
linda |
16 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
59 |
jpm |
17 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
18 |
// | GNU General Public License for more details. |
|
2 |
linda |
19 |
// | |
|
59 |
jpm |
20 |
// | You should have received a copy of the GNU General Public License |
|
|
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
2 |
linda |
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
173 |
jpm |
24 |
// CVS : $Id: eflore.php,v 1.9 2005-06-30 15:24:26 jpm Exp $
|
2 |
linda |
25 |
/**
|
|
|
26 |
* Application de consultation des données d'eFlore.
|
|
|
27 |
*
|
|
|
28 |
* Moteur de recherche aboutissant à une page contenant la fiche d'un nom.
|
|
|
29 |
* Plusieurs onglets sont alors disponiblent, chacun affichant des infos spécifiques
|
|
|
30 |
* - nomenclature et taxinomie
|
|
|
31 |
* - chorologie
|
|
|
32 |
* - illustration
|
|
|
33 |
* - ...
|
|
|
34 |
*
|
|
|
35 |
*@package eFlore
|
|
|
36 |
//Auteur original :
|
|
|
37 |
*@author Linda ANGAMA <linda_angama@yahoo.fr>
|
|
|
38 |
//Autres auteurs :
|
|
|
39 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
40 |
*@copyright Tela-Botanica 2000-2004
|
173 |
jpm |
41 |
*@version $Revision: 1.9 $ $Date: 2005-06-30 15:24:26 $
|
2 |
linda |
42 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
43 |
*/
|
|
|
44 |
|
|
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
46 |
// | ENTÊTE du PROGRAMME |
|
|
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
59 |
jpm |
48 |
/** Inclusion du fichier config de l'application eflore. */
|
6 |
linda |
49 |
require_once GEN_CHEMIN_CLIENT.'eflore/configuration/eflore_config.inc.php';
|
59 |
jpm |
50 |
/** Inclusion du fichier de langue de l'application eflore. */
|
18 |
linda |
51 |
require_once GEN_CHEMIN_CLIENT.'eflore/langues/eflore_langue_'.EFLORE_LANGUE.'.inc.php';
|
|
|
52 |
|
59 |
jpm |
53 |
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
|
2 |
linda |
54 |
require_once 'DB.php';
|
|
|
55 |
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
|
|
|
56 |
require_once 'HTML/QuickForm.php';
|
59 |
jpm |
57 |
/** Inclusion de la bibliothèque PEAR de gestion des URL.*/
|
|
|
58 |
require_once 'Net/URL.php';
|
2 |
linda |
59 |
|
59 |
jpm |
60 |
// Ajout d'une feuille de style propre à eFlore.
|
|
|
61 |
GEN_stockerStyleExterne('eflore', EFLORE_CHEMIN_STYLE.'eflore.css');
|
10 |
linda |
62 |
|
127 |
jpm |
63 |
// Attribution à la variable de session des recherches effectuées
|
148 |
jpm |
64 |
if (isset($_REQUEST['eflore_form_nomenclature']) || isset($_REQUEST['eflore_form_taxonomie'])) {
|
|
|
65 |
$_SESSION['_EFLORE_']['rechercher'] = $_REQUEST;
|
127 |
jpm |
66 |
}
|
|
|
67 |
|
2 |
linda |
68 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
69 |
// | CORPS du PROGRAMME |
|
|
|
70 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
71 |
|
59 |
jpm |
72 |
function afficherContenuNavigation()
|
|
|
73 |
{
|
|
|
74 |
$sortie = '';
|
|
|
75 |
return $sortie;
|
|
|
76 |
}
|
|
|
77 |
|
2 |
linda |
78 |
function afficherContenuTete()
|
|
|
79 |
{
|
59 |
jpm |
80 |
// Transférer tout ceci dans la fonction afficherContenuNavigation().
|
|
|
81 |
$sortie = '';
|
60 |
jpm |
82 |
if (isset($_GET[EFLORE_LG_URL_NN])) {
|
|
|
83 |
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $_GET[EFLORE_LG_URL_NN]);
|
|
|
84 |
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, $_GET[EFLORE_LG_URL_ACTION]);
|
|
|
85 |
$sortie .= '<ul class="menu_n3">';
|
|
|
86 |
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
|
|
|
87 |
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_PRINCIPAL.'</a></li>';
|
|
|
88 |
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
|
|
|
89 |
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_ILLUSTRATION);
|
|
|
90 |
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_ILLUSTRATION.'</a></li>';
|
|
|
91 |
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
|
|
|
92 |
$sortie .= '</ul>';
|
|
|
93 |
}
|
2 |
linda |
94 |
return $sortie;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
function afficherContenuCorps()
|
|
|
98 |
{
|
59 |
jpm |
99 |
// +--------------------------------------------------------------------------------------------------+
|
|
|
100 |
// Initialisation
|
|
|
101 |
/** Definition de la variable globale d'eFlore contenant la connexion à la base de données.*/
|
173 |
jpm |
102 |
//$GLOBALS['_EFLORE_']['bdd']= DB::connect(EFLORE_DSN);
|
59 |
jpm |
103 |
// Allias temporaire
|
173 |
jpm |
104 |
//$GLOBALS['db_eflore']= $GLOBALS['_EFLORE_']['bdd'];
|
59 |
jpm |
105 |
$sortie = '';
|
|
|
106 |
|
|
|
107 |
// +--------------------------------------------------------------------------------------------------+
|
|
|
108 |
// Gestion des actions
|
60 |
jpm |
109 |
if (isset($_REQUEST[EFLORE_LG_URL_ACTION])) {
|
|
|
110 |
switch ($_REQUEST[EFLORE_LG_URL_ACTION]) {
|
|
|
111 |
case EFLORE_LG_URL_ACTION_RECH_NOM :
|
59 |
jpm |
112 |
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
|
|
|
113 |
break;
|
60 |
jpm |
114 |
case EFLORE_LG_URL_ACTION_RECH_TAX :
|
127 |
jpm |
115 |
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
|
59 |
jpm |
116 |
break;
|
60 |
jpm |
117 |
case EFLORE_LG_URL_ACTION_FICHE :
|
59 |
jpm |
118 |
include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
|
|
|
119 |
break;
|
60 |
jpm |
120 |
default:
|
|
|
121 |
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
|
59 |
jpm |
122 |
}
|
|
|
123 |
} else {
|
|
|
124 |
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
|
6 |
linda |
125 |
}
|
127 |
jpm |
126 |
// +--------------------------------------------------------------------------------------------------+
|
|
|
127 |
// Gestion des statistiques
|
|
|
128 |
// A faire...
|
59 |
jpm |
129 |
|
|
|
130 |
// +--------------------------------------------------------------------------------------------------+
|
|
|
131 |
// Gestion des onglets à transférer dans le fichier fiche!
|
|
|
132 |
/** Inclusion des fonctions de l'application eflore. */
|
|
|
133 |
/*
|
|
|
134 |
require_once EFLORE_CHEMIN_BIBLIO.'eflore.fonct.php';
|
|
|
135 |
if (!isset($_GET[EFLORE_LG_URL_ONGLET])) {
|
|
|
136 |
$sortie = '';
|
|
|
137 |
} else if ($_GET[EFLORE_LG_URL_ONGLET] == EFLORE_LG_URL_ONGLET_PHOTO) {
|
|
|
138 |
if(!isset($_GET['soum'])) {
|
|
|
139 |
if (isset($_GET['modif'])) {
|
|
|
140 |
include_once EFLORE_CHEMIN_APPLI.'eflore_photo_modif.inc.php';
|
|
|
141 |
} else {
|
|
|
142 |
include_once EFLORE_CHEMIN_APPLI.'eflore_photo.inc.php';
|
18 |
linda |
143 |
}
|
59 |
jpm |
144 |
} else {
|
|
|
145 |
include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
|
18 |
linda |
146 |
}
|
59 |
jpm |
147 |
$GLOBALS['_EFLORE_']['bdd']->disconnect();
|
|
|
148 |
$sortie = $res;
|
6 |
linda |
149 |
}
|
59 |
jpm |
150 |
*/
|
2 |
linda |
151 |
return $sortie;
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
function afficherContenuPied()
|
|
|
155 |
{
|
173 |
jpm |
156 |
$sortie = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'<a href="mailto:'.EFLORE_LG_PIED_MAIL.'">'.EFLORE_LG_PIED_MAIL.'</a>'.EFLORE_LG_POINT.'</p>';
|
2 |
linda |
157 |
return $sortie;
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
161 |
// | PIED du PROGRAMME |
|
|
|
162 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
166 |
*
|
59 |
jpm |
167 |
* $Log: not supported by cvs2svn $
|
173 |
jpm |
168 |
* Revision 1.8 2005/02/15 12:59:58 jpm
|
|
|
169 |
* Récupération d'info depuis _REQUEST au lieu de _POST.
|
|
|
170 |
*
|
148 |
jpm |
171 |
* Revision 1.7 2005/01/28 19:47:55 jpm
|
|
|
172 |
* Ajout de la recherche pour les taxons.
|
|
|
173 |
*
|
127 |
jpm |
174 |
* Revision 1.6 2005/01/03 19:44:40 jpm
|
|
|
175 |
* Ajout de la gestion de l'action "fiche".
|
|
|
176 |
*
|
60 |
jpm |
177 |
* Revision 1.5 2004/12/23 20:05:17 jpm
|
|
|
178 |
* Début prise en maine eflore-consultation.
|
2 |
linda |
179 |
*
|
60 |
jpm |
180 |
*
|
2 |
linda |
181 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
182 |
*/
|
|
|
183 |
?>
|