Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 148 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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