Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 469 → Rev 470

/trunk/client/bottin/configuration/bottin.config.inc.php
New file
0,0 → 1,212
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bottin.config.inc.php,v 1.1 2005-09-27 13:56:18 alexandre_tb Exp $
/**
* Fichier de configuration de l'application d'inscription/annuaire
*
* A éditer de façon spécifique à chaque déploiement
*
*@package ins_annuaire
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@author Florian SCHMITT <florian@ecole-et-nature.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-09-27 13:56:18 $
// +------------------------------------------------------------------------------------------------------+
*/
//================================= CONSTANTES DB ==================================
/** Nom de la table Annuaire */
define ('INS_ANNUAIRE', 'annuaire');
/** Nom de la table des départements */
define ('INS_TABLE_DPT', 'gen_departement');
/** Nom de la table des pays */
define ('INS_TABLE_PAYS', 'gen_i18n_pays');
/** Champs identifiant */
define ('INS_CHAMPS_ID', 'a_id');
/** Champs adresse mail */
define ('INS_CHAMPS_MAIL', 'a_mail');
/** Champs nom */
define ('INS_CHAMPS_NOM', 'a_nom');
/** Champs prénom */
define ('INS_CHAMPS_PRENOM', 'a_prenom');
/** Champs mot de passe */
define ('INS_CHAMPS_PASSE', 'a_mot_de_passe');
/** Champs identifiant pays */
define ('INS_CHAMPS_PAYS', 'a_ce_pays');
/** Champs code postal */
define ('INS_CHAMPS_CODE_POSTAL', 'a_code_postal');
/** Champs département */
define ('INS_CHAMPS_DEPARTEMENT', 'a_numero_dpt');
/** Champs adresse 1 */
define ('INS_CHAMPS_ADRESSE_1', 'a_adresse1');
/** Champs adresse 2 */
define ('INS_CHAMPS_ADRESSE_2', 'a_adresse2');
/** Champs ville */
define ('INS_CHAMPS_VILLE', 'a_ville');
/** Champs date de l'inscription */
define ('INS_CHAMPS_DATE_INSCRIPTION', 'a_date_inscription');
/** Champs pour désigner si c'est l'inscription d'une structure */
define ('INS_CHAMPS_EST_STRUCTURE', 'a_est_structure');
/** Champs sigle de la structure */
define ('INS_CHAMPS_SIGLE_STRUCTURE', 'a_sigle_structure');
/** Champs numéro de téléphone */
define ('INS_CHAMPS_TELEPHONE', 'a_telephone');
/** Champs numéro de fax */
define ('INS_CHAMPS_FAX', 'a_fax');
/** Champs d'appartenance à une structure */
define ('INS_CHAMPS_STRUCTURE', 'a_ce_structure');
/** Champs identifiant du pays de la table des pays*/
define ('INS_CHAMPS_ID_PAYS', 'gp_id_pays');
/** Champs nom du pays de la table des pays*/
define ('INS_CHAMPS_LABEL_PAYS', 'gp_nom');
/** Champs identifiant du département de la table des departement*/
define ('INS_CHAMPS_ID_DEPARTEMENT','gd_id_departement');
/** Champs nom du département de la table des departement*/
define ('INS_CHAMPS_NOM_DEPARTEMENT','gd_nom');
/** Champs pour l'abonnement à une liste */
define ('INS_CHAMPS_LETTRE', 'a_lettre');
/** Champs de la date d'inscription */
define ('INS_CHAMPS_DATE', 'a_date_inscription');
/** Champs du site Internet*/
define ('INS_CHAMPS_SITE_INTERNET', 'a_site_internet');
/** Champs pour la vue sur carto*/
define ('INS_CHAMPS_VISIBLE', 'a_voir_sur_carto');
/** Champs pour la vue sur carto*/
define ('INS_CHAMPS_NUM_AGREMENT', 'a_num_agrement_fpc');
 
/** adresse d'inscription à la newsletter */
define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@educ-envir.org');
/** adresse de désinscription à la newsletter */
define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@educ-envir.org');
 
 
//teste si l'on est dans l'application Papyrus
if (!defined('PAP_VERSION')) { //pas dans Papyrus
//================================ BASE DE DONNEES =================================
define ('INS_PROTOCOLE', 'mysql') ;
define ('INS_UTILISATEUR', '') ;
define ('INS_MOT_DE_PASSE_DB', '') ;
define ('INS_HOTE', 'localhost') ;
define ('INS_BASE', '') ;
define ('INS_TYPE_ENCODAGE','MD5');
// Formation du dsn
$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
 
include_once 'DB.php'; //appel de la librairie DB de PEAR
/** Variable globale contenant l'objet d'accès à la base de donnée */
$GLOBALS['ins_db'] =& DB::connect($dsn);
//=============================== AUTHENTIFICATION =================================
include_once 'Auth.php'; //appel de la librairie Auth de PEAR
/** Nom de la session PHP */
define ('INS_NOM_SESSION','Educ-Envir.org');
/** Durée de la session PHP */
define ('INS_DUREE_SESSION',3600*12);
/** Tableau des parametres de l'authentification */
$params = array(
'dsn' => $dsn,
'table' => INS_ANNUAIRE,
'usernamecol' => INS_CHAMPS_MAIL,
'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
);
/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
$GLOBALS['AUTH']->setShowLogin(false);
//==================================== LES URLS ====================================
include_once 'Net_URL.php'; //appel de la librairie Net_URL de PEAR
/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
$GLOBALS['ins_url'] = new Net_URL('http://localhost/');
 
//===================================== CHEMINS ====================================
/** Chemin de l'application (mettre un / à la fin) */
define ('INS_CHEMIN_APPLI', '/');
 
//===================================== LANGUES ====================================
/** Choix de la langue par défaut de l'application */
define ('INS_LANGUE_DEFAUT', 'fr');
include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
} else { //dans Papyrus
//================================ BASE DE DONNEES =================================
/** Variable globale contenant l'objet d'accès à la base de données de l'application, un objet DB*/
//$GLOBALS['ins_db'] =& $GLOBALS['_GEN_commun']['pear_db']; //Mis en commentaire pour permettre d'avoir une base de données commune avec Educ-Envir
define ('INS_PROTOCOLE', 'mysql') ;
define ('INS_UTILISATEUR', '') ;
define ('INS_MOT_DE_PASSE_DB', '') ;
define ('INS_HOTE', 'localhost') ;
define ('INS_BASE', '') ;
define ('INS_TYPE_ENCODAGE','MD5');
// Formation du dsn
$dsn = INS_PROTOCOLE.'://'.INS_UTILISATEUR.':'.INS_MOT_DE_PASSE_DB.'@'.INS_HOTE.'/'.INS_BASE;
 
include_once 'DB.php'; //appel de la librairie DB de PEAR
/** Variable globale contenant l'objet d'accès à la base de donnée */
$GLOBALS['ins_db'] =& DB::connect($dsn);
 
//=========================AUTHENTIFICATION=================================
/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth']; //Mis en commmentaire pour permettre d'avoir une base de données commune avec Educ-Envir
//include_once 'Auth.php'; //appel de la librairie Auth de PEAR
/** Nom de la session PHP */
//define ('INS_NOM_SESSION','Educ-Envir.org');
/** Durée de la session PHP */
//define ('INS_DUREE_SESSION',3600*12);
/** Tableau des parametres de l'authentification */
//$params = array(
// 'dsn' => $dsn,
// 'table' => INS_ANNUAIRE,
// 'usernamecol' => INS_CHAMPS_MAIL,
// 'passwordcol' => INS_CHAMPS_MOT_DE_PASSE
//);
/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/
//$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params );
//$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION);
//$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION);
//$GLOBALS['AUTH']->setShowLogin(false);
//==================================== LES URLS ====================================
/** Variable globale contenant l'objet d'accès à l'URL de base de l'application, un objet Net_URL*/
$GLOBALS['ins_url'] =& $GLOBALS['_GEN_commun']['url'];
 
//===================================== CHEMINS ====================================
/** Chemin de l'application (mettre un / à la fin) */
define ('INS_CHEMIN_APPLI', 'client/bottin/');
 
//===================================== LANGUES ====================================
/** Choix de la langue par défaut de l'application */
define ('INS_LANGUE_DEFAUT', $GLOBALS['_GEN_commun']['i18n']) ;
include_once INS_CHEMIN_APPLI.'langues/ins_annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>