Subversion Repositories Applications.papyrus

Rev

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

Rev Author Line No. Line
425 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
// +------------------------------------------------------------------------------------------------------+
446 florian 22
// CVS : $Id: ins_annuaire.config.inc.php,v 1.4 2005-09-22 13:30:49 florian Exp $
425 florian 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
446 florian 35
*@version       $Revision: 1.4 $ $Date: 2005-09-22 13:30:49 $
425 florian 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 */
44
define ('INS_TABLE_PAYS', 'gen_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 mot de passe */
54
define ('INS_CHAMPS_PASSE', 'a_mot_de_passe');
55
/** Champs identifiant pays */
56
define ('INS_CHAMPS_PAYS', 'a_ce_pays');
57
/** Champs code postal */
58
define ('INS_CHAMPS_CODE_POSTAL', 'a_code_postal');
59
/** Champs département */
60
define ('INS_CHAMPS_DEPARTEMENT', 'a_numero_dpt');
61
/** Champs adresse 1 */
62
define ('INS_CHAMPS_ADRESSE_1', 'a_adresse1');
63
/** Champs adresse 2 */
64
define ('INS_CHAMPS_ADRESSE_2', 'a_adresse2');
65
/** Champs ville */
66
define ('INS_CHAMPS_VILLE', 'a_ville');
67
/** Champs date de l'inscription */
68
define ('INS_CHAMPS_DATE_INSCRIPTION', 'a_date_inscription');
69
/** Champs pour désigner si c'est l'inscription d'une structure */
70
define ('INS_CHAMPS_EST_STRUCTURE', 'a_est_structure');
71
/** Champs sigle de la structure */
72
define ('INS_CHAMPS_SIGLE_STRUCTURE', 'a_sigle_structure');
73
/** Champs numéro de téléphone */
74
define ('INS_CHAMPS_TELEPHONE', 'a_telephone');
75
/** Champs numéro de fax */
76
define ('INS_CHAMPS_FAX', 'a_fax');
77
/** Champs d'appartenance à une structure */
78
define ('INS_CHAMPS_STRUCTURE', 'a_ce_structure');
79
/** Champs identifiant du pays de la table des pays*/
80
define ('INS_CHAMPS_ID_PAYS', 'gp_id_pays');
81
/** Champs nom du pays de la table des pays*/
82
define ('INS_CHAMPS_LABEL_PAYS', 'gp_nom');
83
/** Champs identifiant du département de la table des departement*/
84
define ('INS_CHAMPS_ID_DEPARTEMENT','gd_id_departement');
85
/** Champs nom du département de la table des departement*/
86
define ('INS_CHAMPS_NOM_DEPARTEMENT','gd_nom');
87
/** Champs pour l'abonnement à une liste */
88
define ('INS_CHAMPS_LETTRE', 'a_lettre');
89
/** Champs de la date d'inscription */
90
define ('INS_CHAMPS_DATE', 'a_date_inscription');
91
/** Champs du site Internet*/
92
define ('INS_CHAMPS_SITE_INTERNET', 'a_site_internet');
93
/** Champs pour la vue sur carto*/
94
define ('INS_CHAMPS_VISIBLE', 'a_voir_sur_carto');
95
/** Champs pour la vue sur carto*/
96
define ('INS_CHAMPS_NUM_AGREMENT', 'a_num_agrement_fpc');
97
 
98
/** adresse d'inscription à la newsletter */
446 florian 99
define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@educ-envir.org');
425 florian 100
/** adresse de désinscription à la newsletter */
446 florian 101
define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@educ-envir.org');
425 florian 102
 
103
 
446 florian 104
//teste si l'on est dans l'application Papyrus
105
if (!defined('PAP_VERSION')) { //pas dans Papyrus
106
	//================================ BASE DE DONNEES =================================
107
	define ('INS_PROTOCOLE', 'mysql') ;
108
	define ('INS_UTILISATEUR', 'ecoleetn') ;
109
	define ('INS_MOT_DE_PASSE_DB', 'g95dj9') ;
110
	define ('INS_HOTE', 'localhost') ;
111
	define ('INS_BASE', 'ecoleetn') ;
112
	define ('INS_TYPE_ENCODAGE','MD5');
113
 
114
	// Formation du dsn
115
	$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
425 florian 116
 
446 florian 117
	include_once 'DB.php'; //appel de la librairie DB de PEAR
118
	/** Variable globale contenant l'objet d'accès à la base de donnée */
119
	$GLOBALS['ins_db'] =& DB::connect($dsn);
120
 
121
	//=============================== AUTHENTIFICATION =================================
122
	include_once 'Auth.php'; //appel de la librairie Auth de PEAR
123
	/** Nom de la session PHP */
124
	define ('INS_NOM_SESSION','Educ-Envir.org');
125
	/** Durée de la session PHP */
126
	define ('INS_DUREE_SESSION',3600*12);
127
	/** Tableau des parametres de l'authentification */
128
	$params = array(
129
		 'dsn' => $dsn,
130
	         'table' => INS_ANNUAIRE,
131
		 'usernamecol' => INS_CHAMPS_MAIL,
132
		 'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
133
	);
134
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
135
	$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
136
	$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
137
	$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
138
	$GLOBALS['AUTH']->setShowLogin(false);
139
 
140
	//==================================== LES URLS ====================================
141
	include_once 'Net_URL.php'; //appel de la librairie Net_URL de PEAR
142
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
143
	$GLOBALS['ins_url'] = new Net_URL('http://localhost/ins_annuaire/');
425 florian 144
 
446 florian 145
	//===================================== CHEMINS ====================================
146
	/** Chemin de l'application (mettre un / à la fin) */
147
	define ('INS_CHEMIN_APPLI', '/home/florian/Documents/CVS/applications_web/php/ins_annuaire/');
148
 
149
	//===================================== LANGUES ====================================
150
	/** Choix de la langue par défaut de l'application */
151
	define ('INS_LANGUE_DEFAUT', 'fr');
152
	include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
153
 
154
 
155
} else { //dans Papyrus
156
	//================================ BASE DE DONNEES =================================
157
	/** Variable globale contenant l'objet d'accès à la base de données de l'application, un objet DB*/
158
	//$GLOBALS['ins_db'] =& $GLOBALS['_GEN_commun']['pear_db']; //Mis en commentaire pour permettre d'avoir une base de données commune avec Educ-Envir
159
	define ('INS_PROTOCOLE', 'mysql') ;
160
	define ('INS_UTILISATEUR', 'educenvi') ;
161
	define ('INS_MOT_DE_PASSE_DB', 'nwxde2a') ;
162
	define ('INS_HOTE', 'localhost') ;
163
	define ('INS_BASE', 'educenvi') ;
164
	define ('INS_TYPE_ENCODAGE','MD5');
165
	// Formation du dsn
166
	$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
167
 
168
	include_once 'DB.php'; //appel de la librairie DB de PEAR
169
	/** Variable globale contenant l'objet d'accès à la base de donnée */
170
	$GLOBALS['ins_db'] =& DB::connect($dsn);
171
 
172
	//=========================AUTHENTIFICATION=================================
173
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
174
	$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth']; //Mis en commmentaire pour permettre d'avoir une base de données commune avec Educ-Envir
175
	//include_once 'Auth.php'; //appel de la librairie Auth de PEAR
176
	/** Nom de la session PHP */
177
	//define ('INS_NOM_SESSION','Educ-Envir.org');
178
	/** Durée de la session PHP */
179
	//define ('INS_DUREE_SESSION',3600*12);
180
	/** Tableau des parametres de l'authentification */
181
	//$params = array(
182
	//	 'dsn' => $dsn,
183
	//         'table' => INS_ANNUAIRE,
184
	//	 'usernamecol' => INS_CHAMPS_MAIL,
185
	//	 'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
186
	//);
187
	/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
188
	//$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
189
	//$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
190
	//$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
191
	//$GLOBALS['AUTH']->setShowLogin(false);
192
 
193
	//==================================== LES URLS ====================================
194
	/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
195
	$GLOBALS['ins_url'] =& $GLOBALS['_GEN_commun']['url'];
196
 
197
	//===================================== CHEMINS ====================================
198
	/** Chemin de l'application (mettre un / à la fin) */
199
	define ('INS_CHEMIN_APPLI', 'client/ins_annuaire/');
200
 
201
	//===================================== LANGUES ====================================
202
	/** Choix de la langue par défaut de l'application */
203
	define ('INS_LANGUE_DEFAUT', $GLOBALS['_GEN_commun']['i18n']) ;
204
	include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
205
}
206
 
425 florian 207
/* +--Fin du code ----------------------------------------------------------------------------------------+
208
*
209
* $Log: not supported by cvs2svn $
210
* version initiale
211
*
212
*
213
* +-- Fin du code ----------------------------------------------------------------------------------------+
214
*/
446 florian 215
?>