Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

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