2 /*******************************************************************************
3 * Copyright (C) 2007 Easter-eggs
4 * http://ldapsaisie.labs.libre-entreprise.org
6 * Author: See AUTHORS file in top-level directory.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ******************************************************************************/
23 // Configuration LDAP Saisie :
24 $GLOBALS['LSconfig'] = array(
25 'NetLDAP2' => '/usr/share/php/Net/LDAP2.php',
26 'Smarty' => '/usr/share/php/smarty/libs/Smarty.class.php',
27 'lang' => 'fr_FR.UTF8',
28 'cacheLSprofiles' => true,
30 'cacheSearch' => true,
31 'keepLSsessionActive' => true,
32 'ldap_servers' => array (
34 'name' => 'LSexample',
35 'ldap_config'=> array(
36 'host' => '127.0.0.1',
40 'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
44 'filter' => '(objectClass=*)',
47 'LSprofiles' => array (
50 'uid=eeggs,ou=people,o=ls' => NULL
52 'ou=people,o=ls' => array (
53 'cn=adminldap,ou=groups,o=ls' => array (
54 'attr' => 'uniqueMember',
55 'LSobject' => 'LSeegroup'
59 'godfather' => array (
60 'LSobjects' => array (
61 'LSeepeople' => array (
62 'attr' => 'lsGodfatherDn',
63 'attr_value' => '%{dn}',
64 'basedn' => 'ou=people,o=ls'
66 'LSeegroup' => array (
67 'filter' => 'lsGodfatherDn=%{dn}'
72 'cacheLSprofiles' => true,
73 'cacheSearch' => true,
74 'authObjectType' => 'LSeepeople',
75 'authObjectFilter' => '(|(uid=%{user})(mail=%{user}))',
76 'authobject_pwdattr' => 'userPassword',
81 'recoverPassword' => array(
83 'recoveryHashAttr' => 'lsRecoveryHash',
84 'recoveryEmailSender' => 'noreply-recover@ls.com',
85 'recoveryHashMail' => array(
86 'subject' => 'LSexample : Recovering your password.',
87 'msg' => "To proceed password recovery procedure, please follow that link:\n%{url}"
89 'newPasswordMail' => array(
90 'subject' => 'LSexample : Your new credentials',
91 'msg' => "Your new password : %{mdp}"
94 'emailSender' => 'noreply@ls.com'
97 'name' => 'LSexample - multi-sociétés',
98 'ldap_config'=> array(
99 'host' => '127.0.0.1',
103 'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
106 'options' => array(),
107 'filter' => '(objectClass=*)',
110 'LSprofiles' => array(
113 'uid=eeggs,ou=people,o=ls' => NULL,
114 'cn=adminldap,ou=groups,o=ls' => array (
115 'attr' => 'uniqueMember',
116 'LSobject' => 'LSeegroup'
121 'authObjectType' => 'LSeepeople',
122 'subDnLabel' => _('Company'),
124 '== Toutes ==' => array(
126 'LSobjects' => array(
133 'LSeecompany' => array(
134 'LSobjects' => array(
141 'cacheLSprofiles' => true,
142 'cacheSearch' => true,
143 'authObjectTypeAttrPwd' => 'userPassword',
144 'recoverPassword' => array(
145 'mailAttr' => 'mail',
146 'recoveryHashAttr' => 'lsRecoveryHash',
147 'recoveryEmailSender' => 'noreply-recover@lsexample.net',
148 'recoveryHashMail' => array(
149 'subject' => 'LSexample : Recovering your password.',
150 'msg' => "To proceed password recovery procedure, please follow that link:\n%{url}"
152 'newPasswordMail' => array(
153 'subject' => 'LSexample : Your new credentials.',
154 'msg' => "Your new password : %{mdp}"
157 'emailSender' => 'noreply@lsexample.net'
164 //define('LS_THEME','black');
165 //define('LS_TEMPLATES_DIR', 'templates/default');
168 define('LS_THEME','default');
169 define('LS_TEMPLATES_DIR', 'templates/'.LS_THEME);
170 define('LS_IMAGES_DIR', 'images/'.LS_THEME);
171 define('LS_CSS_DIR', 'css/'.LS_THEME);
174 $GLOBALS['LSdebug']['active'] = true;
177 $GLOBALS['LSlog']['filename'] = 'tmp/LS.log';
178 $GLOBALS['LSlog']['enable'] = true;
180 define('NB_LSOBJECT_LIST',20);
181 define('NB_LSOBJECT_LIST_SELECT',11);
183 define('MAX_SEND_FILE_SIZE',2000000);
185 // Définitions des locales
186 $textdomain = 'ldapsaisie';
187 bindtextdomain($textdomain, '/var/www/ldapsaisie/trunk/l10n');
188 textdomain($textdomain);
189 setlocale(LC_ALL, $GLOBALS['LSconfig']['lang']);
191 // Définitions des dossiers d'inclusions
192 define('LS_CONF_DIR','conf/');
193 define('LS_OBJECTS_DIR', LS_CONF_DIR . 'LSobjects/');
194 define('LS_INCLUDE_DIR','includes/');
195 define('LS_CLASS_DIR', LS_INCLUDE_DIR .'class/');
196 define('LS_LIB_DIR', LS_INCLUDE_DIR .'libs/');
197 define('LS_ADDONS_DIR', LS_INCLUDE_DIR .'addons/');
198 define('LS_JS_DIR', LS_INCLUDE_DIR .'js/');
199 define('LS_TMP_DIR', 'tmp/');
203 $GLOBALS['defaultJSscipts']=array(
211 ini_set( 'magic_quotes_gpc', 'off' );
212 ini_set( 'magic_quotes_sybase', 'off' );
213 ini_set( 'magic_quotes_runtime', 'off' );