Subversion Repositories Applications.papyrus

Rev

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

Rev Author Line No. Line
470 alexandre_ 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
// +------------------------------------------------------------------------------------------------------+
1298 neiluj 22
// CVS : $Id: bottin.config.inc.php,v 1.16 2007-04-11 08:30:12 neiluj Exp $
470 alexandre_ 23
/**
24
* Fichier de configuration de l'application d'inscription/annuaire
25
*
26
* A éditer de façon spécifique à chaque déploiement
27
*
28
*@package ins_annuaire
29
//Auteur original :
30
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
31
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
32
//Autres auteurs :
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
1298 neiluj 35
*@version       $Revision: 1.16 $ $Date: 2007-04-11 08:30:12 $
470 alexandre_ 36
// +------------------------------------------------------------------------------------------------------+
37
*/
38
//================================= CONSTANTES DB ==================================
1298 neiluj 39
/** Nom de la table Annuaire */
40
define ('INS_ANNUAIRE', 'annuaire');
41
/** Nom de la table des départements */
42
define ('INS_TABLE_DPT', 'gen_departement');
43
/** Nom de la table des pays */
44
define ('INS_TABLE_PAYS', 'gen_i18n_pays');
45
/** Champs identifiant */
46
define ('INS_CHAMPS_ID', 'a_id');
47
/** Champs adresse mail */
48
define ('INS_CHAMPS_MAIL', 'a_mail');
49
/** Champs nom */
50
define ('INS_CHAMPS_NOM', 'a_nom');
51
/** Champs prénom */
52
define ('INS_CHAMPS_PRENOM', 'a_prenom');
53
/** Champs description */
54
define ('INS_CHAMPS_DESCRIPTION','a_description');
55
/** Champs mot de passe */
56
define ('INS_CHAMPS_PASSE', 'a_mot_de_passe');
57
/** Champs identifiant pays */
58
define ('INS_CHAMPS_PAYS', 'a_ce_pays');
59
/** Champs code postal */
60
define ('INS_CHAMPS_CODE_POSTAL', 'a_code_postal');
61
/** Champs département */
62
define ('INS_CHAMPS_DEPARTEMENT', 'a_numero_dpt');
63
/** Champs adresse 1 */
64
define ('INS_CHAMPS_ADRESSE_1', 'a_adresse1');
65
/** Champs adresse 2 */
66
define ('INS_CHAMPS_ADRESSE_2', 'a_adresse2');
67
/** Champs ville */
68
define ('INS_CHAMPS_VILLE', 'a_ville');
69
/** Champs date de l'inscription */
70
define ('INS_CHAMPS_DATE_INSCRIPTION', 'a_date_inscription');
71
/** Champs pour désigner si c'est l'inscription d'une structure */
72
define ('INS_CHAMPS_EST_STRUCTURE', 'a_est_structure');
73
/** Champs sigle de la structure */
74
define ('INS_CHAMPS_SIGLE_STRUCTURE', 'a_sigle_structure');
75
/** Champs numéro de téléphone */
76
define ('INS_CHAMPS_TELEPHONE', 'a_telephone');
77
/** Champs numéro de fax */
78
define ('INS_CHAMPS_FAX', 'a_fax');
79
/** Champs d'appartenance à une structure */
80
define ('INS_CHAMPS_STRUCTURE', 'a_ce_structure');
81
/** Champs identifiant du pays de la table des pays*/
82
define ('INS_CHAMPS_ID_PAYS', 'gip_id_pays');
83
/** Champs nom du pays de la table des pays*/
84
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit');
85
/** Champs qui contient la localisation */
86
define ('INS_CHAMPS_I18N_PAYS', ' gip_id_i18n') ;
87
/** Champs identifiant du département de la table des departement*/
88
define ('INS_CHAMPS_ID_DEPARTEMENT','gd_id_departement');
89
/** Champs nom du département de la table des departement*/
90
define ('INS_CHAMPS_NOM_DEPARTEMENT','gd_nom');
91
/** Champs pour l'abonnement à une liste, laisser vide si vous ne souhaitez pas d'inscription' */
92
define ('INS_CHAMPS_LETTRE', 'a_lettre');
93
/** Champs de la date d'inscription */
94
define ('INS_CHAMPS_DATE', 'a_date_inscription');
95
/** Champs du site Internet*/
96
define ('INS_CHAMPS_SITE_INTERNET', 'a_site_internet');
97
/** Champs pour la vue sur carto*/
98
define ('INS_CHAMPS_VISIBLE', 'a_voir_sur_carto');
99
/** Champs pour la vue sur carto*/
100
define ('INS_CHAMPS_NUM_AGREMENT', 'a_num_agrement_fpc');
101
/** Champs pour le logo*/
102
define ('INS_CHAMPS_LOGO', 'a_logo');
470 alexandre_ 103
 
1298 neiluj 104
 
105
if (INS_CHAMPS_LETTRE != '') {
106
	/** adresse d'inscription à la newsletter */
107
	define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@domaine.org');
108
	/** adresse de désinscription à la newsletter */
109
	define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@domaine.org');
110
}
111
 
470 alexandre_ 112
//teste si l'on est dans l'application Papyrus
113
if (!defined('PAP_VERSION')) { //pas dans Papyrus
114
	//================================ BASE DE DONNEES =================================
115
	define ('INS_PROTOCOLE', 'mysql') ;
116
	define ('INS_UTILISATEUR', '') ;
117
	define ('INS_MOT_DE_PASSE_DB', '') ;
118
	define ('INS_HOTE', 'localhost') ;
119
	define ('INS_BASE', '') ;
120
	define ('INS_TYPE_ENCODAGE','MD5');
121
 
122
	// Formation du dsn
123
	$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
124
 
603 florian 125
	include_once PAP_CHEMIN_RACINE.'api/pear/DB.php'; //appel de la librairie DB de PEAR
470 alexandre_ 126
	/** Variable globale contenant l'objet d'accès à la base de donnée */
127
	$GLOBALS['ins_db'] =& DB::connect($dsn);
128
 
129
	//=============================== AUTHENTIFICATION =================================
603 florian 130
	include_once PAP_CHEMIN_RACINE.'api/pear/Auth.php'; //appel de la librairie Auth de PEAR
470 alexandre_ 131
	/** Nom de la session PHP */
132
	define ('INS_NOM_SESSION','Educ-Envir.org');
133
	/** Durée de la session PHP */
134
	define ('INS_DUREE_SESSION',3600*12);
135
	/** Tableau des parametres de l'authentification */
136
	$params = array(
137
		 'dsn' => $dsn,
668 alexandre_ 138
	     'table' => INS_ANNUAIRE,
470 alexandre_ 139
		 'usernamecol' => INS_CHAMPS_MAIL,
140
		 'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
141
	);
142
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
143
	$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
144
	$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
145
	$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
146
	$GLOBALS['AUTH']->setShowLogin(false);
147
 
148
	//==================================== LES URLS ====================================
603 florian 149
	include_once PAP_CHEMIN_RACINE.'api/pear/Net_URL.php'; //appel de la librairie Net_URL de PEAR
470 alexandre_ 150
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
151
	$GLOBALS['ins_url'] = new Net_URL('http://localhost/');
152
 
153
	//===================================== CHEMINS ====================================
154
	/** Chemin de l'application (mettre un / à la fin) */
155
	define ('INS_CHEMIN_APPLI', '/');
156
 
157
	//===================================== LANGUES ====================================
158
	/** Choix de la langue par défaut de l'application */
159
	define ('INS_LANGUE_DEFAUT', 'fr');
160
	include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
161
 
162
 
163
} else { //dans Papyrus
164
	//================================ BASE DE DONNEES =================================
165
	/** Variable globale contenant l'objet d'accès à la base de données de l'application, un objet DB*/
603 florian 166
	$GLOBALS['ins_db'] =& $GLOBALS['_GEN_commun']['pear_db'];
470 alexandre_ 167
 
168
	//=========================AUTHENTIFICATION=================================
169
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
483 alexandre_ 170
	$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth'];
470 alexandre_ 171
 
172
	//==================================== LES URLS ====================================
173
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
174
	$GLOBALS['ins_url'] =& $GLOBALS['_GEN_commun']['url'];
175
 
176
	//===================================== CHEMINS ====================================
177
	/** Chemin de l'application (mettre un / à la fin) */
178
	define ('INS_CHEMIN_APPLI', 'client/bottin/');
179
 
180
	//===================================== LANGUES ====================================
181
	/** Choix de la langue par défaut de l'application */
182
	define ('INS_LANGUE_DEFAUT', $GLOBALS['_GEN_commun']['i18n']) ;
603 florian 183
	include_once INS_CHEMIN_APPLI.'langues/bottin.langue_'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
470 alexandre_ 184
}
185
 
483 alexandre_ 186
 
603 florian 187
/** Définir la présence d'un formulaire d'inscription de structure (mettre à 1 pour oui, 0 pour non */
188
define ('INS_FORMULAIRE_STRUCTURE', 1);
483 alexandre_ 189
 
833 florian 190
/** Définir la présence d'un formulaire d'inscription de structure (mettre à 1 pour oui, 0 pour non */
191
define ('INS_URL_BAZAR', 'http://localhost/papyrus/papyrus.php?menu=16');
192
 
193
 
603 florian 194
/** Définir la nécessité d'envoyer un message de confirmation d'inscription (mettre à 1 pour oui, 0 pour non */
195
define ('INS_MAIL_VALIDATION_INSCRIPTION', 0);
196
 
197
/** Adresse de messagerie de l'administrateur, pour suivre les inscriptions */
198
define ('INS_MAIL_ADMIN_APRES_INSCRIPTION', 'nom@domaine.ext');
199
 
779 alexandre_ 200
$GLOBALS['mail_admin'] = array ('nom@domaine.ext') ;   // Liste des personne recevant le mail
201
 
603 florian 202
/** Sujet du message envoyé pour l'inscription */
203
define ('INS_MAIL_ADMIN_APRES_INSCRIPTION_SUJET', '[nom] Inscription');
204
 
205
/** L'inscription génère t'elle l'inscription à un Spip? Mettre à 1 pour oui , et 0 pour non */
206
define ('INS_UTILISE_SPIP', 0);
207
if (INS_UTILISE_SPIP) {
208
	/** Chemin d'accès au Spip */
209
	define ('INS_CHEMIN_SPIP', '');
210
}
211
 
212
/** L'inscription génère t'elle l'inscription à un Wikini? Mettre à 1 pour oui , et 0 pour non */
213
define ('INS_UTILISE_WIKINI', 1);
214
if (INS_UTILISE_WIKINI) {
215
	/** Le nom du champs contenant le nom wikini dans l'annuaire */
216
	define ('INS_CHAMPS_NOM_WIKINI', 'a_nom_wikini');
807 alexandre_ 217
 
218
	/** Le nom Wiki est il genere automatiquement */
219
	define ('INS_NOM_WIKINI_GENERE', 1) ;
603 florian 220
}
221
 
222
/** L'inscription utilise t'elle le module projet? Mettre à 1 pour oui , et 0 pour non */
223
define ('INS_UTILISE_MODULE_PROJET', 1) ;
224
if (INS_UTILISE_MODULE_PROJET) {
225
    define ('INS_CHEMIN_PROJET', 'client/projet/') ;
226
}
227
 
483 alexandre_ 228
/**
229
//==================================== PARAMETRAGE =================================
230
* Pour gérer la réécriture d'url de l'inscription
231
* Cela nécessite une ligne dans le fichier .htaccess, par exemple
232
* RewriteRule ^ins([0-9a-z]*)$ papyrus.php?menu=22&id=$1 [L]
233
* Cela sert à racourcir l'URL de confirmation d'inscription
234
//==================================================================================
235
*/
236
 
237
define ('INS_UTILISE_REECRITURE_URL', 1) ;      // mettre à 1 si on souhaite utiliser la réécriture
238
 
239
if (INS_UTILISE_REECRITURE_URL) {
779 alexandre_ 240
    define ('INS_URL_PREFIXE', 'ins_') ;         // Indique le préfixe de l'url http://www.mondomaine.org/prefix____
483 alexandre_ 241
}
242
 
470 alexandre_ 243
/* +--Fin du code ----------------------------------------------------------------------------------------+
244
*
245
* $Log: not supported by cvs2svn $
1088 florian 246
* Revision 1.14  2006/12/01 13:23:17  florian
247
* integration annuaire backoffice
248
*
1081 florian 249
* Revision 1.13  2006/09/20 14:56:41  alexandre_tb
250
* correction de la valeur par défaut INS_CHAMPS_I18N_PAYS
251
*
953 alexandre_ 252
* Revision 1.12  2006/09/12 15:44:18  alexandre_tb
253
* suppression du $GLOBALS['mail_admin'] en double
254
*
927 alexandre_ 255
* Revision 1.11  2006/09/12 15:40:33  alexandre_tb
256
* modification des valeurs par défaut
257
* utilisation de gen_i18n_pays pour la table des pays
258
*
926 alexandre_ 259
* Revision 1.10  2006/06/29 07:47:22  alexandre_tb
260
* ajout du tableau mail_admin
261
*
872 alexandre_ 262
* Revision 1.9  2006/04/28 12:44:05  florian
263
* integration bazar
264
*
833 florian 265
* Revision 1.8  2006/04/10 09:51:28  alexandre_tb
266
* ajout de la constante INS_NOM_WIKINI_GENERE.
267
*
807 alexandre_ 268
* Revision 1.7  2006/04/04 12:23:05  florian
269
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
270
*
805 florian 271
* Revision 1.6  2006/03/15 11:04:27  alexandre_tb
272
* ajout du tableau mail_admin qui contient la liste des administrateurs qui recevront un double du mail d'inscription
273
*
779 alexandre_ 274
* Revision 1.5  2005/12/19 13:16:38  alexandre_tb
275
* généricité du fichier de config
276
*
671 alexandre_ 277
* Revision 1.4  2005/12/19 11:06:01  alexandre_tb
278
* modification dans la table annuaire
279
*
668 alexandre_ 280
* Revision 1.3  2005/11/17 18:48:02  florian
281
* corrections bugs + amélioration de l'application d'inscription
282
*
603 florian 283
* Revision 1.2  2005/09/29 13:56:48  alexandre_tb
284
* En cours de production. Reste à gérer les news letters et d'autres choses.
285
*
483 alexandre_ 286
* Revision 1.1  2005/09/27 13:56:18  alexandre_tb
287
* version initiale, les autres fichiers de configurations devraient progressivement disparaitre.
288
*
470 alexandre_ 289
* +-- Fin du code ----------------------------------------------------------------------------------------+
290
*/
291
?>