Subversion Repositories Applications.bazar

Rev

Rev 2 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 florian 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
3 florian 22
// CVS : $Id: baz_config.inc.php,v 1.2 2005-02-22 15:34:17 florian Exp $
2 florian 23
/**
24
* Fichier de configuration du bazar
25
*
26
* A éditer de façon spécifique à chaque déploiement
27
*
28
*@package bazar
29
//Auteur original :
30
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
31
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
32
//Autres auteurs :
33
*@copyright     Tela-Botanica 2000-2004
3 florian 34
*@version       $Revision: 1.2 $ $Date: 2005-02-22 15:34:17 $
2 florian 35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
//=================================== INTEGRATION ==================================
38
// Constante pour indiquer si l'application est 'standalone' ou intégrée dans Papyrus
39
//==================================================================================
3 florian 40
define ('BAZ_DANS_PAPYRUS', '1'); //0 pour non, 1 pour oui
2 florian 41
 
42
//================================ BASE DE DONNEES =================================
43
// Constantes et variables globales d'accès à la base de donnée
44
//==================================================================================
3 florian 45
if (BAZ_DANS_PAPYRUS) {
46
	$GLOBALS['_BAZAR_']['db'] = &$_GEN_commun['pear_db'] ;
47
}
48
else {
49
	define ('BAZ_PROTOCOLE', 'mysql') ;
50
	define ('BAZ_UTILISATEUR', 'root') ;
51
	define ('BAZ_MOT_DE_PASSE_DB', '') ;
52
	define ('BAZ_HOTE', 'localhost') ;
53
	define ('BAZ_BASE', 'test') ;
54
	define ('BAZ_TYPE_ENCODAGE','MD5');
55
	define ('BAZ_NOM_SESSION','Educ-Envir.org'); //Nom de la session PHP
56
	define ('BAZ_DUREE_SESSION',3600*12); //Durée de la session PHP
57
	// Formation du dsn
58
	$dsn = BAZ_PROTOCOLE.'://'.BAZ_UTILISATEUR.':'.BAZ_MOT_DE_PASSE_DB.'@'.BAZ_HOTE.'/'.BAZ_BASE ;
59
	// Connection à la base de donnée
60
	include_once 'DB.php';
61
	$GLOBALS['_BAZAR_']['db'] = & DB::connect($dsn) ;
62
}
2 florian 63
 
64
 
65
//=================================== INSCRIPTION ==================================
66
// Constantes d'accès à la base de donnée
67
//==================================================================================
68
 
69
 
3 florian 70
if (BAZ_DANS_PAPYRUS) {
71
	define ('BAZ_ANNUAIRE','gen_annuaire');
72
	define ('BAZ_CHAMPS_ID','ga_id_utilisateur'); //Champs index sur la table annuaire
73
	define ('BAZ_CHAMPS_NOM','ga_nom'); //Champs nom sur la table annuaire
74
}
75
else {
76
	define ('BAZ_ANNUAIRE','gen_annuaire'); //Nom de la table annuaire utilisée
77
	define ('BAZ_CHAMPS_ID','ga_id_utilisateur'); //Champs index sur la table annuaire
78
	define ('BAZ_CHAMPS_NOM','ga_nom'); //Champs nom sur la table annuaire
79
	define ('BAZ_CHAMPS_PRENOM','ga_prenom'); //Champs prenom sur la table annuaire
80
	define ('BAZ_CHAMPS_PASSE','ga_motpasse'); //Champs index sur la table annuaire
81
	define ('BAZ_CHAMPS_MAIL', 'ga_mail') ; //Nom du champs mail
82
	define ('BAZ_CHAMPS_LOGIN', 'ga_identifiant') ;  //Champs servant pour l'identification
83
	define ('BAZ_CHEMIN_DOSSIER_INSCRIPTION','/home/florian/Documents/CVS/applications_web/php/inscription/');
84
}
2 florian 85
 
3 florian 86
 
2 florian 87
//=========================== LES URLS ET CHEMINS ==================================
88
//Constantes et variables globales liées à l'utilisation des url et chemins
89
//==================================================================================
90
 
91
//Variable globale d'un tableau contenant par ex. l'url de base de l'application et l'objet Base de données
92
if (BAZ_DANS_PAPYRUS) {
93
	$GLOBALS['_BAZAR_']['url'] = $GLOBALS['_GEN_commun']['url'];
3 florian 94
	//BAZ_CHEMIN_APPLI : chemin vers l'application bazar METTRE UN SLASH (/) A LA FIN!!!!
95
	define('BAZ_CHEMIN_APPLI',PAP_CHEMIN_RACINE.'client/bazar/');
2 florian 96
}
97
else {
98
	include_once 'Net/URL.php';
99
	$GLOBALS['_BAZAR_']['url'] = & new Net_URL('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
3 florian 100
	//BAZ_CHEMIN_APPLI : chemin vers l'application bazar METTRE UN SLASH (/) A LA FIN!!!!
101
	define('BAZ_CHEMIN_APPLI',$_SERVER['DOCUMENT_ROOT'].'/bazar/');
2 florian 102
}
103
 
104
 
105
 
3 florian 106
 
2 florian 107
//==================================== LES FLUX RSS==================================
108
// Constantes liées aux flux RSS
109
//==================================================================================
110
 
111
define('BAZ_CREER_FICHIERS_XML',1);      //0=ne cree pas le fichier XML dans rss/; 1=cree le fichier XML dans rss/
112
define('BAZ_RSS_NOMSITE','Educ-Envir.org');    //Nom du site indiqué dans les flux rss
113
define('BAZ_RSS_ADRESSESITE','http://www.educ-envir.org');   //Adresse Internet du site indiqué dans les flux rss
114
define('BAZ_RSS_DESCRIPTIONSITE','Educ-Envir.org, pour mutualiser l\'information en éducation à l\'environnement.');    //Description du site indiqué dans les flux rss
115
define('BAZ_RSS_LOGOSITE','logo.gif');     //Logo du site indiqué dans les flux rss
116
define('BAZ_RSS_MANAGINGEDITOR', 'florian@ecole-et-nature.org') ;     //Managing editor du site
117
define('BAZ_RSS_WEBMASTER', 'florian@ecole-et-nature.org') ;     //Mail Webmaster du site
118
define('BAZ_RSS_CATEGORIE', 'Education &acute; l\'environnement'); //catégorie du flux RSS
119
 
120
 
121
//==================================== LES LANGUES ==================================
122
// Constantes liées à l'utilisation des langues
123
//==================================================================================
124
 
125
define ('BAZ_LANGUE_PAR_DEFAUT', 'fr') ; //Indique un code langue par défaut
126
define ('BAZ_VAR_URL_LANGUE', 'lang') ; //Nom de la variable GET qui sera passée dans l'URL (Laisser vide pour les sites monolingues)
127
//code pour l'inclusion des langues NE PAS MODIFIER
128
if (BAZ_VAR_URL_LANGUE != '' && isset (${BAZ_VAR_URL_LANGUE})) {
129
    include_once BAZ_CHEMIN_APPLI.'langues/baz_langue_'.${BAZ_VAR_URL_LANGUE}.'.inc.php';
130
} else {
131
    include_once BAZ_CHEMIN_APPLI.'langues/baz_langue_'.BAZ_LANGUE_PAR_DEFAUT.'.inc.php';
132
}
133
 
134
 
135
//==================================== PARAMETRAGE =================================
136
// Pour régler certaines fonctionnalité de l'application
137
//==================================================================================
138
 
139
define ('BAZ_ETAT_VALIDATION',0);
140
//Valeur par défaut d'état de la fiche annonce après saisie
3 florian 141
//Mettre 0 pour 'en attente de validation d'un administrateur'
142
//Mettre 1 pour 'directement validée en ligne'
2 florian 143
 
144
define ('BAZ_TAILLE_MAX_FICHIER',1000*1024);
145
//Valeur maximale en octets pour la taille d'un fichier joint à télécharger
146
 
147
/* +--Fin du code ----------------------------------------------------------------------------------------+
148
*
3 florian 149
* $Log: not supported by cvs2svn $
150
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
151
* Import initial de Bazar
2 florian 152
*
3 florian 153
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
154
* Import initial
155
*
156
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
157
* import de la nouvelle version
158
*
2 florian 159
* Revision 1.5  2004/07/08 12:15:32  florian
160
* ajout constantes pour flux RSS
161
*
162
* Revision 1.4  2004/07/06 16:21:54  florian
163
* débuggage modification + MAJ flux RSS
164
*
165
* Revision 1.3  2004/07/02 14:50:47  florian
166
* ajout configuration de l'etat de l'annonce (visible,masquée,...)
167
*
168
* Revision 1.2  2004/07/01 10:13:30  florian
169
* modif Florian
170
*
171
* Revision 1.1  2004/06/23 09:58:32  alex
172
* version initiale
173
*
174
* Revision 1.1  2004/06/18 09:00:41  alex
175
* version initiale
176
*
177
*
178
* +-- Fin du code ----------------------------------------------------------------------------------------+
179
*/
180
?>