--- /dev/null
+<?php
+
+
+require_once(__DIR__."/lib/function.php");
+
+
+set_include_path(
+ __DIR__ . "/lib/" . PATH_SEPARATOR .
+ __DIR__ . "/controller/" . PATH_SEPARATOR .
+ __DIR__ . "/classes/" . PATH_SEPARATOR .
+ __DIR__ . "/models/" . PATH_SEPARATOR .
+ __DIR__ . "/core/" . PATH_SEPARATOR .
+ get_include_path()
+);
+
+
+if ( ! function_exists('allo_serveur_autoload')) {
+ function allo_serveur_autoload($class_name) {
+ $include = $class_name . '.class.php';
+ @ $result = include($include);
+ if ( ! $result ){
+ return false;
+
+ }
+ return true;
+ }
+}
+
+spl_autoload_register('allo_serveur_autoload');
+
+$default_settings = json_decode(file_get_contents(__DIR__."/../default_settings.json"),true);
+$alloConfig = new AlloConfig($default_settings);
+
+
+$local_settings_path = __DIR__ . "/../local_settings.json";
+
+if (file_exists($local_settings_path)) {
+ $local_settings = json_decode(file_get_contents($local_settings_path),true);
+ $alloConfig->setSettings($local_settings);
+}
+
+
+define("DATABASE_FILE",__DIR__."/database/allo_serveur.json");
+$sqlQuery = new SQLQuery($alloConfig->db_dsn,$alloConfig->db_user,$alloConfig->db_password);
+$ldapWrapper = new LdapWrapper($alloConfig->ldap_fqdn,$alloConfig->ldap_login_field,$alloConfig->ldap_users);
+$sugarWrapper = new SugarWrapper($alloConfig->sugar_api_url,$alloConfig->sugar_login,$alloConfig->sugar_password);
\ No newline at end of file