Subversion Repositories eFlore/Archives.herbiers

Rev

Rev 6 | Rev 12 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 8
Line 19... Line 19...
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: herbier.php,v 1.3 2006-10-30 18:57:17 jp_milcent Exp $
24
// CVS : $Id: herbier.php,v 1.4 2006-10-31 10:31:36 jp_milcent Exp $
25
/**
25
/**
26
* Application Herbier
26
* Application Herbier
27
*
27
*
28
* Cette application permet de consulter et d'administrer des collection botanique comprise dans le modèle
28
* Cette application permet de consulter et d'administrer des collection botanique comprise dans le modèle
29
* d'Herbier.
29
* d'Herbier.
Line 36... Line 36...
36
//Auteur original :
36
//Auteur original :
37
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
37
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
38
//Autres auteurs :
38
//Autres auteurs :
39
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
39
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
40
*@copyright     Tela-Botanica 2000-2005
40
*@copyright     Tela-Botanica 2000-2005
41
*@version       $Revision: 1.3 $ $Date: 2006-10-30 18:57:17 $
41
*@version       $Revision: 1.4 $ $Date: 2006-10-31 10:31:36 $
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
43
*/
43
*/
Line 44... Line 44...
44
 
44
 
45
// +------------------------------------------------------------------------------------------------------+
45
// +------------------------------------------------------------------------------------------------------+
Line 64... Line 64...
64
require_once HB_CHEMIN_BIBLIO.'hb_commun.fonct.php';
64
require_once HB_CHEMIN_BIBLIO.'hb_commun.fonct.php';
65
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
65
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
66
require_once HB_CHEMIN_API_PEAR.'DB.php';
66
require_once HB_CHEMIN_API_PEAR.'DB.php';
67
/** Inclusion de la classe PEAR de gestion des URL. */
67
/** Inclusion de la classe PEAR de gestion des URL. */
68
require_once HB_CHEMIN_API_PEAR.'Net'.GEN_SEP.'URL.php';
68
require_once HB_CHEMIN_API_PEAR.'Net'.GEN_SEP.'URL.php';
-
 
69
// Création de l'objet URL si nous hors de Papyrus
-
 
70
if (!defined('PAP_VERSION')) {
-
 
71
	$GLOBALS['_GEN_commun']['url'] = new Net_URL('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
-
 
72
}
69
/** Inclusion du fichier de configuration des url de BiblioBota.*/
73
/** Inclusion du fichier de configuration des url de BiblioBota.*/
70
require_once HB_CHEMIN_CONFIG.'hb_config_url.inc.php';
74
require_once HB_CHEMIN_CONFIG.'hb_config_url.inc.php';
Line 71... Line 75...
71
 
75
 
72
/** Definition de la variable globale stokant la connexion à la base de données. */
76
/** Definition de la variable globale stokant la connexion à la base de données. */
73
$GLOBALS['_HERBIER_']['bdd'] =& DB::connect(HB_DSN);
77
$GLOBALS['_HERBIER_']['bdd'] =& DB::connect(HB_DSN);
74
if (DB::isError($GLOBALS['_HERBIER_']['bdd'])) {
78
if (DB::isError($GLOBALS['_HERBIER_']['bdd'])) {
75
    die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), null, $GLOBALS['_HERBIER_']['bdd']->getMessage()));
79
    die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), null, $GLOBALS['_HERBIER_']['bdd']->getMessage()));
Line 76... Line 80...
76
}
80
}
-
 
81
 
77
 
82
// Stockage des styles de l'application si nous sommes dans Papyrus
-
 
83
if (defined('PAP_VERSION')) {
Line 78... Line 84...
78
// Stockage des styles de l'application
84
	GEN_stockerStyleExterne('herbier', HB_CHEMIN_STYLES.'herbier.css');
79
GEN_stockerStyleExterne('herbier', HB_CHEMIN_STYLES.'herbier.css');
85
}
80
 
86
 
81
// Appel du fichier de traduction des textes de l'application Herbier
87
// Appel du fichier de traduction des textes de l'application Herbier
Line 145... Line 151...
145
    // +------------------------------------------------------------------------------------------------------+
151
    // +------------------------------------------------------------------------------------------------------+
146
    // Initialisation des variables
152
    // Initialisation des variables
147
    $sortie = '';
153
    $sortie = '';
148
    if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
154
    if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
149
        // Nous incluons l'application demandée :
155
        // Nous incluons l'application demandée :
150
        $chemin_application = HB_CHEMIN_APPLI.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.menu.php';
156
        $chemin_application = HB_CHEMIN_MODULE.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.menu.php';
151
        if (file_exists($chemin_application)) {
157
        if (file_exists($chemin_application)) {
152
            include_once $chemin_application;
158
            include_once $chemin_application;
153
        }
159
        }
154
    }
160
    }
Line 194... Line 200...
194
    // +------------------------------------------------------------------------------------------------------+
200
    // +------------------------------------------------------------------------------------------------------+
195
    // Initialisation des variables
201
    // Initialisation des variables
196
    $sortie = '';
202
    $sortie = '';
197
    if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
203
    if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
198
        // Nous incluons l'application demandée :
204
        // Nous incluons l'application demandée :
199
        $chemin_application = HB_CHEMIN_APPLI.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.php';
205
        $chemin_application = HB_CHEMIN_MODULE.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.php';
200
        if (file_exists($chemin_application)) {
206
        if (file_exists($chemin_application)) {
201
            include_once $chemin_application;
207
            include_once $chemin_application;
202
        } else {
208
        } else {
203
            $sortie = '<p class="pap_erreur">'.'Application inexistantes!'.'</p>';
209
            $sortie = 	'<p class="pap_erreur">'.
-
 
210
						'Application inexistantes!'.'<br />'.
-
 
211
						'Fichier : '.$chemin_application.
-
 
212
						'</p>';
204
        }
213
        }
205
    } elseif (HB_ARGUMENT_AUTH == 1) {
214
    } elseif (HB_ARGUMENT_AUTH == 1) {
206
        return GEN_afficherInfoIdentification($GLOBALS['_HERBIER_']['url']->getURL());
215
        return GEN_afficherInfoIdentification($GLOBALS['_HERBIER_']['url']->getURL());
207
    } else {
216
    } else {
208
        $sortie =   '<p class="pap_erreur">'.
217
        $sortie =   '<p class="pap_erreur">'.
Line 223... Line 232...
223
 
232
 
224
 
233
 
225
/* +--Fin du code ----------------------------------------------------------------------------------------+
234
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
235
*
-
 
236
* $Log: not supported by cvs2svn $
-
 
237
* Revision 1.3  2006/10/30 18:57:17  jp_milcent
226
*
238
* Début gestion des flux rss.
227
* $Log: not supported by cvs2svn $
239
*
228
* Revision 1.2  2006/09/22 09:19:28  jp_milcent
240
* Revision 1.2  2006/09/22 09:19:28  jp_milcent
229
* Utilisation de mysql_connect et mysql_select_db suite à disfonctionnement.
241
* Utilisation de mysql_connect et mysql_select_db suite à disfonctionnement.
230
* Amélioration de la gestion des chemins des fichiers inclus.
242
* Amélioration de la gestion des chemins des fichiers inclus.