2008-02-05 17:11:21 +01:00
|
|
|
<?php
|
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (C) 2007 Easter-eggs
|
|
|
|
* http://ldapsaisie.labs.libre-entreprise.org
|
|
|
|
*
|
|
|
|
* Author: See AUTHORS file in top-level directory.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
// Configuration LDAP Saisie :
|
|
|
|
$GLOBALS['LSconfig'] = array(
|
2008-04-25 15:48:12 +02:00
|
|
|
'NetLDAP2' => '/usr/share/php/Net/LDAP2.php',
|
2008-02-05 17:11:21 +01:00
|
|
|
'Smarty' => '/var/www/tmp/Smarty-2.6.18/libs/Smarty.class.php',
|
2008-02-08 18:39:24 +01:00
|
|
|
'lang' => 'fr_FR.UTF8',
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-06-18 14:27:35 +02:00
|
|
|
'cacheSubDn' => true,
|
|
|
|
'cacheSearch' => true,
|
2008-02-08 18:39:24 +01:00
|
|
|
'ldap_servers' => array (
|
|
|
|
array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'name' => 'LSexample',
|
2008-02-08 18:39:24 +01:00
|
|
|
'ldap_config'=> array(
|
|
|
|
'host' => '127.0.0.1',
|
|
|
|
'port' => 389,
|
|
|
|
'version' => 3,
|
|
|
|
'starttls' => false,
|
2008-08-06 19:04:03 +02:00
|
|
|
'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
|
|
|
|
'bindpw' => 'toto',
|
|
|
|
'basedn' => 'o=ls',
|
|
|
|
'options' => array(),
|
|
|
|
'filter' => '(objectClass=*)',
|
|
|
|
'scope' => 'sub'
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'LSprofiles' => array (
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => array (
|
|
|
|
'o=ls' => array (
|
|
|
|
'uid=eeggs,ou=people,o=ls' => NULL
|
|
|
|
),
|
|
|
|
'ou=people,o=ls' => array (
|
|
|
|
'cn=adminldap,ou=groups,o=ls' => array (
|
|
|
|
'attr' => 'uniqueMember',
|
|
|
|
'LSobject' => 'LSeegroup'
|
|
|
|
)
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
2008-11-12 17:57:40 +01:00
|
|
|
'godfather' => array (
|
|
|
|
'LSobjects' => array (
|
|
|
|
'LSeepeople' => array (
|
|
|
|
'attr' => 'lsGodfatherDn',
|
|
|
|
'attr_value' => '%{dn}',
|
|
|
|
'basedn' => 'ou=people,o=ls'
|
|
|
|
),
|
|
|
|
'LSeegroup' => array (
|
|
|
|
'filter' => 'lsGodfatherDn=%{dn}'
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-08-06 19:04:03 +02:00
|
|
|
'cacheSearch' => true,
|
2009-01-02 17:00:25 +01:00
|
|
|
'authObjectType' => 'LSeepeople',
|
2008-08-06 19:04:03 +02:00
|
|
|
'authobject_pwdattr' => 'userPassword',
|
|
|
|
'LSaccess' => array(
|
|
|
|
'LSeepeople',
|
|
|
|
'LSeegroup'
|
|
|
|
),
|
|
|
|
'recoverPassword' => array(
|
|
|
|
'mailAttr' => 'mail',
|
|
|
|
'recoveryHashAttr' => 'lsRecoveryHash',
|
2008-10-31 13:12:31 +01:00
|
|
|
'recoveryEmailSender' => 'noreply-recover@ls.com',
|
2008-08-06 19:04:03 +02:00
|
|
|
'recoveryHashMail' => array(
|
|
|
|
'subject' => 'LSexample : Récupération de votre mot de passe.',
|
|
|
|
'msg' => "Pour poursuivre le processus de récupération de votre mot de passe,\nmerci de cliquer de vous rendre à l'adresse suivante :\n%{url}"
|
|
|
|
),
|
|
|
|
'newPasswordMail' => array(
|
|
|
|
'subject' => 'LSexample : Votre nouveau mot de passe.',
|
|
|
|
'msg' => "Votre nouveau mot de passe : %{mdp}"
|
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'emailSender' => 'noreply@ls.com'
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
|
|
|
array (
|
|
|
|
'name' => 'LSexample - multi-sociétés',
|
|
|
|
'ldap_config'=> array(
|
|
|
|
'host' => '127.0.0.1',
|
|
|
|
'port' => 389,
|
|
|
|
'version' => 3,
|
|
|
|
'starttls' => false,
|
2008-06-05 15:21:18 +02:00
|
|
|
'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
|
2008-02-08 18:39:24 +01:00
|
|
|
'bindpw' => 'toto',
|
|
|
|
'basedn' => 'o=ls',
|
|
|
|
'options' => array(),
|
|
|
|
'filter' => '(objectClass=*)',
|
|
|
|
'scope' => 'sub'
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'LSprofiles' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => array (
|
|
|
|
'o=ls' => array (
|
|
|
|
'uid=eeggs,ou=people,o=ls' => NULL,
|
|
|
|
'cn=adminldap,ou=groups,o=ls' => array (
|
|
|
|
'attr' => 'uniqueMember',
|
|
|
|
'LSobject' => 'LSeegroup'
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'authObjectType' => 'LSeepeople',
|
|
|
|
'subDnLabel' => _('Société'),
|
2008-08-06 19:04:03 +02:00
|
|
|
'subDn' => array(
|
|
|
|
'== Toutes ==' => array(
|
|
|
|
'dn' => 'o=ls',
|
|
|
|
'LSobjects' => array(
|
|
|
|
'LSeepeople',
|
|
|
|
'LSeegroup',
|
|
|
|
'LSeecompany'
|
|
|
|
)
|
2008-02-08 18:39:24 +01:00
|
|
|
),
|
2008-08-06 19:04:03 +02:00
|
|
|
'LSobject' => array(
|
|
|
|
'LSeecompany' => array(
|
|
|
|
'LSobjects' => array(
|
|
|
|
'LSeepeople',
|
|
|
|
'LSeegroup'
|
2008-02-08 18:39:24 +01:00
|
|
|
)
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
2008-06-21 18:16:15 +02:00
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-08-06 19:04:03 +02:00
|
|
|
'cacheSearch' => true,
|
2009-01-02 17:00:25 +01:00
|
|
|
'authObjectTypeAttrPwd' => 'userPassword',
|
2008-06-05 15:21:18 +02:00
|
|
|
'recoverPassword' => array(
|
|
|
|
'mailAttr' => 'mail',
|
|
|
|
'recoveryHashAttr' => 'lsRecoveryHash',
|
|
|
|
'recoveryEmailSender' => 'noreply-recover@lsexample.net',
|
|
|
|
'recoveryHashMail' => array(
|
|
|
|
'subject' => 'LSexample : Récupération de votre mot de passe.',
|
|
|
|
'msg' => "Pour poursuivre le processus de récupération de votre mot de passe,\nmerci de cliquer de vous rendre à l'adresse suivante :\n%{url}"
|
|
|
|
),
|
|
|
|
'newPasswordMail' => array(
|
|
|
|
'subject' => 'LSexample : Votre nouveau mot de passe.',
|
|
|
|
'msg' => "Votre nouveau mot de passe : %{mdp}"
|
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'emailSender' => 'noreply@lsexample.net'
|
2008-02-08 18:39:24 +01:00
|
|
|
)
|
|
|
|
)
|
2008-02-05 17:11:21 +01:00
|
|
|
);
|
|
|
|
|
2008-10-09 03:31:33 +02:00
|
|
|
// Interface
|
|
|
|
// Theme Black
|
|
|
|
//define('LS_THEME','black');
|
|
|
|
//define('LS_TEMPLATES_DIR', 'templates/default');
|
|
|
|
|
|
|
|
// Theme Default
|
|
|
|
define('LS_THEME','default');
|
|
|
|
define('LS_TEMPLATES_DIR', 'templates/'.LS_THEME);
|
|
|
|
define('LS_IMAGES_DIR', 'images/'.LS_THEME);
|
|
|
|
define('LS_CSS_DIR', 'css/'.LS_THEME);
|
|
|
|
|
2008-02-05 17:11:21 +01:00
|
|
|
//Debug
|
2008-02-12 18:59:44 +01:00
|
|
|
$GLOBALS['LSdebug']['active'] = true;
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-04-25 15:48:12 +02:00
|
|
|
define('NB_LSOBJECT_LIST',20);
|
|
|
|
define('NB_LSOBJECT_LIST_SELECT',11);
|
2008-02-26 18:40:05 +01:00
|
|
|
|
|
|
|
define('MAX_SEND_FILE_SIZE',2000000);
|
|
|
|
|
2008-04-25 16:09:27 +02:00
|
|
|
// Définitions des locales
|
2008-02-05 17:11:21 +01:00
|
|
|
$textdomain = 'ldapsaisie';
|
|
|
|
bindtextdomain($textdomain, '/var/www/ldapsaisie/trunk/l10n');
|
|
|
|
textdomain($textdomain);
|
|
|
|
setlocale(LC_ALL, $GLOBALS['LSconfig']['lang']);
|
|
|
|
|
2008-04-25 16:09:27 +02:00
|
|
|
// Définitions des dossiers d'inclusions
|
2008-02-05 17:11:21 +01:00
|
|
|
define('LS_CONF_DIR','conf/');
|
2008-04-25 15:48:12 +02:00
|
|
|
define('LS_OBJECTS_DIR', LS_CONF_DIR . 'LSobjects/');
|
2008-02-05 17:11:21 +01:00
|
|
|
define('LS_INCLUDE_DIR','includes/');
|
|
|
|
define('LS_CLASS_DIR', LS_INCLUDE_DIR .'class/');
|
|
|
|
define('LS_LIB_DIR', LS_INCLUDE_DIR .'libs/');
|
|
|
|
define('LS_ADDONS_DIR', LS_INCLUDE_DIR .'addons/');
|
|
|
|
define('LS_JS_DIR', LS_INCLUDE_DIR .'js/');
|
2008-02-26 18:40:05 +01:00
|
|
|
define('LS_TMP_DIR', 'tmp/');
|
2008-10-09 03:31:33 +02:00
|
|
|
|
2008-02-05 17:11:21 +01:00
|
|
|
|
|
|
|
// Javascript
|
|
|
|
$GLOBALS['defaultJSscipts']=array(
|
2008-07-05 22:28:49 +02:00
|
|
|
'mootools-core.js',
|
|
|
|
'mootools-more.js',
|
2008-07-28 18:30:40 +02:00
|
|
|
'functions.js',
|
2008-02-26 18:40:05 +01:00
|
|
|
'LSdefault.js'
|
2008-02-05 17:11:21 +01:00
|
|
|
);
|
|
|
|
|
2008-02-26 18:40:05 +01:00
|
|
|
// PHP values
|
|
|
|
ini_set( 'magic_quotes_gpc', 'off' );
|
|
|
|
ini_set( 'magic_quotes_sybase', 'off' );
|
|
|
|
ini_set( 'magic_quotes_runtime', 'off' );
|
|
|
|
|
2008-02-05 17:11:21 +01:00
|
|
|
?>
|