Subversion Repositories Applications.papyrus

Rev

Rev 926 | 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
// +------------------------------------------------------------------------------------------------------+
927 alexandre_ 22
// CVS : $Id: bottin.config.inc.php,v 1.12 2006-09-12 15:44:18 alexandre_tb 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
927 alexandre_ 35
*@version       $Revision: 1.12 $ $Date: 2006-09-12 15:44:18 $
470 alexandre_ 36
// +------------------------------------------------------------------------------------------------------+
37
*/
38
//================================= CONSTANTES DB ==================================
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 */
926 alexandre_ 44
define ('INS_TABLE_PAYS', 'gen_i18n_pays');
470 alexandre_ 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');
805 florian 53
/** Champs description */
54
define ('INS_CHAMPS_DESCRIPTION','a_description');
470 alexandre_ 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*/
926 alexandre_ 82
define ('INS_CHAMPS_ID_PAYS', 'gip_id_pays');
470 alexandre_ 83
/** Champs nom du pays de la table des pays*/
926 alexandre_ 84
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit');
668 alexandre_ 85
/** Champs qui contient la localisation */
926 alexandre_ 86
define ('INS_CHAMPS_I18N_PAYS', 'gip_nom_pays_traduit') ;
470 alexandre_ 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');
483 alexandre_ 91
/** Champs pour l'abonnement à une liste, laisser vide si vous ne souhaitez pas d'inscription' */
603 florian 92
define ('INS_CHAMPS_LETTRE', 'a_lettre');
470 alexandre_ 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
 
483 alexandre_ 102
if (INS_CHAMPS_LETTRE != '') {
103
	/** adresse d'inscription à la newsletter */
671 alexandre_ 104
	define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@domaine.org');
483 alexandre_ 105
	/** adresse de désinscription à la newsletter */
671 alexandre_ 106
	define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@domaine.org');
483 alexandre_ 107
}
470 alexandre_ 108
 
109
//teste si l'on est dans l'application Papyrus
110
if (!defined('PAP_VERSION')) { //pas dans Papyrus
111
	//================================ BASE DE DONNEES =================================
112
	define ('INS_PROTOCOLE', 'mysql') ;
113
	define ('INS_UTILISATEUR', '') ;
114
	define ('INS_MOT_DE_PASSE_DB', '') ;
115
	define ('INS_HOTE', 'localhost') ;
116
	define ('INS_BASE', '') ;
117
	define ('INS_TYPE_ENCODAGE','MD5');
118
 
119
	// Formation du dsn
120
	$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
121
 
603 florian 122
	include_once PAP_CHEMIN_RACINE.'api/pear/DB.php'; //appel de la librairie DB de PEAR
470 alexandre_ 123
	/** Variable globale contenant l'objet d'accès à la base de donnée */
124
	$GLOBALS['ins_db'] =& DB::connect($dsn);
125
 
126
	//=============================== AUTHENTIFICATION =================================
603 florian 127
	include_once PAP_CHEMIN_RACINE.'api/pear/Auth.php'; //appel de la librairie Auth de PEAR
470 alexandre_ 128
	/** Nom de la session PHP */
129
	define ('INS_NOM_SESSION','Educ-Envir.org');
130
	/** Durée de la session PHP */
131
	define ('INS_DUREE_SESSION',3600*12);
132
	/** Tableau des parametres de l'authentification */
133
	$params = array(
134
		 'dsn' => $dsn,
668 alexandre_ 135
	     'table' => INS_ANNUAIRE,
470 alexandre_ 136
		 'usernamecol' => INS_CHAMPS_MAIL,
137
		 'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
138
	);
139
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
140
	$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
141
	$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
142
	$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
143
	$GLOBALS['AUTH']->setShowLogin(false);
144
 
145
	//==================================== LES URLS ====================================
603 florian 146
	include_once PAP_CHEMIN_RACINE.'api/pear/Net_URL.php'; //appel de la librairie Net_URL de PEAR
470 alexandre_ 147
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
148
	$GLOBALS['ins_url'] = new Net_URL('http://localhost/');
149
 
150
	//===================================== CHEMINS ====================================
151
	/** Chemin de l'application (mettre un / à la fin) */
152
	define ('INS_CHEMIN_APPLI', '/');
153
 
154
	//===================================== LANGUES ====================================
155
	/** Choix de la langue par défaut de l'application */
156
	define ('INS_LANGUE_DEFAUT', 'fr');
157
	include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
158
 
159
 
160
} else { //dans Papyrus
161
	//================================ BASE DE DONNEES =================================
162
	/** Variable globale contenant l'objet d'accès à la base de données de l'application, un objet DB*/
603 florian 163
	$GLOBALS['ins_db'] =& $GLOBALS['_GEN_commun']['pear_db'];
470 alexandre_ 164
 
165
	//=========================AUTHENTIFICATION=================================
166
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
483 alexandre_ 167
	$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth'];
470 alexandre_ 168
 
169
	//==================================== LES URLS ====================================
170
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
171
	$GLOBALS['ins_url'] =& $GLOBALS['_GEN_commun']['url'];
172
 
173
	//===================================== CHEMINS ====================================
174
	/** Chemin de l'application (mettre un / à la fin) */
175
	define ('INS_CHEMIN_APPLI', 'client/bottin/');
176
 
177
	//===================================== LANGUES ====================================
178
	/** Choix de la langue par défaut de l'application */
179
	define ('INS_LANGUE_DEFAUT', $GLOBALS['_GEN_commun']['i18n']) ;
603 florian 180
	include_once INS_CHEMIN_APPLI.'langues/bottin.langue_'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
470 alexandre_ 181
}
182
 
483 alexandre_ 183
 
603 florian 184
/** Définir la présence d'un formulaire d'inscription de structure (mettre à 1 pour oui, 0 pour non */
185
define ('INS_FORMULAIRE_STRUCTURE', 1);
483 alexandre_ 186
 
833 florian 187
/** Définir la présence d'un formulaire d'inscription de structure (mettre à 1 pour oui, 0 pour non */
188
define ('INS_URL_BAZAR', 'http://localhost/papyrus/papyrus.php?menu=16');
189
 
190
 
603 florian 191
/** Définir la nécessité d'envoyer un message de confirmation d'inscription (mettre à 1 pour oui, 0 pour non */
192
define ('INS_MAIL_VALIDATION_INSCRIPTION', 0);
193
 
194
/** Adresse de messagerie de l'administrateur, pour suivre les inscriptions */
195
define ('INS_MAIL_ADMIN_APRES_INSCRIPTION', 'nom@domaine.ext');
196
 
779 alexandre_ 197
$GLOBALS['mail_admin'] = array ('nom@domaine.ext') ;   // Liste des personne recevant le mail
198
 
603 florian 199
/** Sujet du message envoyé pour l'inscription */
200
define ('INS_MAIL_ADMIN_APRES_INSCRIPTION_SUJET', '[nom] Inscription');
201
 
202
/** L'inscription génère t'elle l'inscription à un Spip? Mettre à 1 pour oui , et 0 pour non */
203
define ('INS_UTILISE_SPIP', 0);
204
if (INS_UTILISE_SPIP) {
205
	/** Chemin d'accès au Spip */
206
	define ('INS_CHEMIN_SPIP', '');
207
}
208
 
209
/** L'inscription génère t'elle l'inscription à un Wikini? Mettre à 1 pour oui , et 0 pour non */
210
define ('INS_UTILISE_WIKINI', 1);
211
if (INS_UTILISE_WIKINI) {
212
	/** Le nom du champs contenant le nom wikini dans l'annuaire */
213
	define ('INS_CHAMPS_NOM_WIKINI', 'a_nom_wikini');
807 alexandre_ 214
 
215
	/** Le nom Wiki est il genere automatiquement */
216
	define ('INS_NOM_WIKINI_GENERE', 1) ;
603 florian 217
}
218
 
219
/** L'inscription utilise t'elle le module projet? Mettre à 1 pour oui , et 0 pour non */
220
define ('INS_UTILISE_MODULE_PROJET', 1) ;
221
if (INS_UTILISE_MODULE_PROJET) {
222
    define ('INS_CHEMIN_PROJET', 'client/projet/') ;
223
}
224
 
483 alexandre_ 225
/**
226
//==================================== PARAMETRAGE =================================
227
* Pour gérer la réécriture d'url de l'inscription
228
* Cela nécessite une ligne dans le fichier .htaccess, par exemple
229
* RewriteRule ^ins([0-9a-z]*)$ papyrus.php?menu=22&id=$1 [L]
230
* Cela sert à racourcir l'URL de confirmation d'inscription
231
//==================================================================================
232
*/
233
 
234
define ('INS_UTILISE_REECRITURE_URL', 1) ;      // mettre à 1 si on souhaite utiliser la réécriture
235
 
236
if (INS_UTILISE_REECRITURE_URL) {
779 alexandre_ 237
    define ('INS_URL_PREFIXE', 'ins_') ;         // Indique le préfixe de l'url http://www.mondomaine.org/prefix____
483 alexandre_ 238
}
239
 
470 alexandre_ 240
/* +--Fin du code ----------------------------------------------------------------------------------------+
241
*
242
* $Log: not supported by cvs2svn $
927 alexandre_ 243
* Revision 1.11  2006/09/12 15:40:33  alexandre_tb
244
* modification des valeurs par défaut
245
* utilisation de gen_i18n_pays pour la table des pays
246
*
926 alexandre_ 247
* Revision 1.10  2006/06/29 07:47:22  alexandre_tb
248
* ajout du tableau mail_admin
249
*
872 alexandre_ 250
* Revision 1.9  2006/04/28 12:44:05  florian
251
* integration bazar
252
*
833 florian 253
* Revision 1.8  2006/04/10 09:51:28  alexandre_tb
254
* ajout de la constante INS_NOM_WIKINI_GENERE.
255
*
807 alexandre_ 256
* Revision 1.7  2006/04/04 12:23:05  florian
257
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
258
*
805 florian 259
* Revision 1.6  2006/03/15 11:04:27  alexandre_tb
260
* ajout du tableau mail_admin qui contient la liste des administrateurs qui recevront un double du mail d'inscription
261
*
779 alexandre_ 262
* Revision 1.5  2005/12/19 13:16:38  alexandre_tb
263
* généricité du fichier de config
264
*
671 alexandre_ 265
* Revision 1.4  2005/12/19 11:06:01  alexandre_tb
266
* modification dans la table annuaire
267
*
668 alexandre_ 268
* Revision 1.3  2005/11/17 18:48:02  florian
269
* corrections bugs + amélioration de l'application d'inscription
270
*
603 florian 271
* Revision 1.2  2005/09/29 13:56:48  alexandre_tb
272
* En cours de production. Reste à gérer les news letters et d'autres choses.
273
*
483 alexandre_ 274
* Revision 1.1  2005/09/27 13:56:18  alexandre_tb
275
* version initiale, les autres fichiers de configurations devraient progressivement disparaitre.
276
*
470 alexandre_ 277
* +-- Fin du code ----------------------------------------------------------------------------------------+
278
*/
279
?>