Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 60 | Rev 148 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60 Rev 127
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.6 2005-01-03 19:44:40 jpm Exp $
24
// CVS : $Id: eflore.php,v 1.7 2005-01-28 19:47:55 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.6 $ $Date: 2005-01-03 19:44:40 $
41
*@version       $Revision: 1.7 $ $Date: 2005-01-28 19:47:55 $
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
 
-
 
63
// Attribution à la variable de session des recherches effectuées
-
 
64
if (isset($_POST['eflore_form_nomenclature']) || isset($_POST['eflore_form_taxonomie'])) {
-
 
65
    $_SESSION['_EFLORE_']['rechercher'] = $_POST;
-
 
66
}
62
 
67
 
63
// +------------------------------------------------------------------------------------------------------+
68
// +------------------------------------------------------------------------------------------------------+
64
// |                                            CORPS du PROGRAMME                                        |
69
// |                                            CORPS du PROGRAMME                                        |
65
// +------------------------------------------------------------------------------------------------------+
70
// +------------------------------------------------------------------------------------------------------+
66
 
71
 
67
function afficherContenuNavigation()
72
function afficherContenuNavigation()
68
{
73
{
69
    $sortie  = '';
74
    $sortie  = '';
70
    return $sortie;
75
    return $sortie;
71
}
76
}
72
 
77
 
73
function afficherContenuTete()
78
function afficherContenuTete()
74
{
79
{
75
    // Transférer tout ceci dans la fonction afficherContenuNavigation().
80
    // Transférer tout ceci dans la fonction afficherContenuNavigation().
76
    $sortie  = '';
81
    $sortie  = '';
77
    if (isset($_GET[EFLORE_LG_URL_NN])) {
82
    if (isset($_GET[EFLORE_LG_URL_NN])) {
78
        $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]);
79
        $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]);
80
        $sortie .= '<ul class="menu_n3">';
85
        $sortie .= '<ul class="menu_n3">';
81
        $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);
82
        $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>';
83
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
88
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
84
        $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);
85
        $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>';
86
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
91
        $GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
87
        $sortie .= '</ul>';
92
        $sortie .= '</ul>';
88
    }
93
    }
89
    return $sortie;
94
    return $sortie;
90
}
95
}
91
 
96
 
92
function afficherContenuCorps()
97
function afficherContenuCorps()
93
{
98
{
94
    // +--------------------------------------------------------------------------------------------------+
99
    // +--------------------------------------------------------------------------------------------------+
95
    // Initialisation
100
    // Initialisation
96
    /** 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.*/
97
    $GLOBALS['_EFLORE_']['bdd']= DB::connect(EFLORE_DSN);
102
    $GLOBALS['_EFLORE_']['bdd']= DB::connect(EFLORE_DSN);
98
    // Allias temporaire
103
    // Allias temporaire
99
    $GLOBALS['db_eflore']= $GLOBALS['_EFLORE_']['bdd'];
104
    $GLOBALS['db_eflore']= $GLOBALS['_EFLORE_']['bdd'];
100
    $sortie = '';
105
    $sortie = '';
101
    
106
    
102
    // +--------------------------------------------------------------------------------------------------+
107
    // +--------------------------------------------------------------------------------------------------+
103
    // Gestion des actions
108
    // Gestion des actions
104
    if (isset($_REQUEST[EFLORE_LG_URL_ACTION])) {
109
    if (isset($_REQUEST[EFLORE_LG_URL_ACTION])) {
105
        switch ($_REQUEST[EFLORE_LG_URL_ACTION]) {
110
        switch ($_REQUEST[EFLORE_LG_URL_ACTION]) {
106
            case EFLORE_LG_URL_ACTION_RECH_NOM :
111
            case EFLORE_LG_URL_ACTION_RECH_NOM :
107
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
112
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
108
                break;
113
                break;
109
            case EFLORE_LG_URL_ACTION_RECH_TAX :
114
            case EFLORE_LG_URL_ACTION_RECH_TAX :
110
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomique.inc.php';
115
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
111
                break;
116
                break;
112
            case EFLORE_LG_URL_ACTION_FICHE :
117
            case EFLORE_LG_URL_ACTION_FICHE :
113
                include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
118
                include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
114
                break;
119
                break;
115
            default:
120
            default:
116
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
121
                include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
117
        }
122
        }
118
    } else {
123
    } else {
119
        include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
124
        include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
120
    }
125
    }
-
 
126
    // +--------------------------------------------------------------------------------------------------+
-
 
127
    // Gestion des statistiques
-
 
128
    // A faire...
121
    
129
    
122
    // +--------------------------------------------------------------------------------------------------+
130
    // +--------------------------------------------------------------------------------------------------+
123
    // Gestion des onglets à transférer dans le fichier fiche!
131
    // Gestion des onglets à transférer dans le fichier fiche!
124
    /** Inclusion des fonctions de l'application eflore. */
132
    /** Inclusion des fonctions de l'application eflore. */
125
    /*
133
    /*
126
    require_once EFLORE_CHEMIN_BIBLIO.'eflore.fonct.php';
134
    require_once EFLORE_CHEMIN_BIBLIO.'eflore.fonct.php';
127
    if (!isset($_GET[EFLORE_LG_URL_ONGLET])) {
135
    if (!isset($_GET[EFLORE_LG_URL_ONGLET])) {
128
        $sortie = '';
136
        $sortie = '';
129
    } 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) {
130
        if(!isset($_GET['soum'])) {
138
        if(!isset($_GET['soum'])) {
131
            if (isset($_GET['modif'])) {
139
            if (isset($_GET['modif'])) {
132
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo_modif.inc.php';
140
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo_modif.inc.php';
133
            } else {
141
            } else {
134
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo.inc.php';
142
                include_once EFLORE_CHEMIN_APPLI.'eflore_photo.inc.php';
135
            }
143
            }
136
        } else {
144
        } else {
137
            include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
145
            include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
138
        }
146
        }
139
        $GLOBALS['_EFLORE_']['bdd']->disconnect();
147
        $GLOBALS['_EFLORE_']['bdd']->disconnect();
140
        $sortie = $res;
148
        $sortie = $res;
141
    }
149
    }
142
    */
150
    */
143
    return $sortie;
151
    return $sortie;
144
}
152
}
145
 
153
 
146
function afficherContenuPied()
154
function afficherContenuPied()
147
{
155
{
148
    $sortie  = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'</p>';
156
    $sortie  = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'</p>';
149
    return $sortie;
157
    return $sortie;
150
}
158
}
151
 
159
 
152
// +------------------------------------------------------------------------------------------------------+
160
// +------------------------------------------------------------------------------------------------------+
153
// |                                            PIED du PROGRAMME                                         |
161
// |                                            PIED du PROGRAMME                                         |
154
// +------------------------------------------------------------------------------------------------------+
162
// +------------------------------------------------------------------------------------------------------+
155
 
163
 
156
 
164
 
157
/* +--Fin du code ----------------------------------------------------------------------------------------+
165
/* +--Fin du code ----------------------------------------------------------------------------------------+
158
*
166
*
159
* $Log: not supported by cvs2svn $
167
* $Log: not supported by cvs2svn $
-
 
168
* Revision 1.6  2005/01/03 19:44:40  jpm
-
 
169
* Ajout de la gestion de l'action "fiche".
-
 
170
*
160
* Revision 1.5  2004/12/23 20:05:17  jpm
171
* Revision 1.5  2004/12/23 20:05:17  jpm
161
* Début prise en maine eflore-consultation.
172
* Début prise en maine eflore-consultation.
162
*
173
*
163
*
174
*
164
* +-- Fin du code ----------------------------------------------------------------------------------------+
175
* +-- Fin du code ----------------------------------------------------------------------------------------+
165
*/
176
*/
166
?>
177
?>