2 if(defined('E_DEPRECATED')){ // since php 5.3
3 error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
5 error_reporting(E_ALL ^ E_NOTICE);
8 require_once(dirname(__FILE__).'/config.php');
9 require_once(dirname(__FILE__).'/fields.php');
10 require_once(dirname(__FILE__).'/lang/en.php');
11 require_once(dirname(__FILE__).'/lang/'.$conf['lang'].'.php');
12 require_once(dirname(__FILE__).'/functions.php');
13 require_once(dirname(__FILE__).'/template.php');
14 require_once(dirname(__FILE__).'/smarty/Smarty.class.php');
19 @ini_set('arg_separator.output', '&');
20 session_name("ldapab");
24 if (get_magic_quotes_gpc()) {
25 if (!empty($_GET)) remove_magic_quotes($_GET);
26 if (!empty($_POST)) remove_magic_quotes($_POST);
27 if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE);
28 if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST);
29 if (!empty($_SESSION)) remove_magic_quotes($_SESSION);
30 ini_set('magic_quotes_gpc', 0);
32 @set_magic_quotes_runtime(0);
34 function remove_magic_quotes(&$array) {
35 foreach (array_keys($array) as $key) {
36 if (is_array($array[$key])) {
37 remove_magic_quotes($array[$key]);
39 $array[$key] = stripslashes($array[$key]);
44 //prepare SMARTY object
46 $smarty->compile_dir = dirname(__FILE__).'/../cache';
47 $smarty->use_sub_dirs = 0;
48 $smarty->template_dir = dirname(__FILE__).'/../templates';
49 $smarty->force_compile = $conf['smartycompile'];
51 // select the correct google api key
52 $conf['gmapkey'] = $conf['gmaps'][$_SERVER['HTTP_HOST']];