2007-12-12 17:29:16 +01:00
|
|
|
<?php
|
2008-11-21 11:44:28 +01:00
|
|
|
if(!file_exists(dirname(__FILE__) .'/config.inc.php')) {
|
|
|
|
die("Please, create the 'config.inc.php' file. You can copy the 'config.inc.php.example' file.");
|
|
|
|
}
|
2007-12-12 17:29:16 +01:00
|
|
|
|
2008-11-21 11:44:28 +01:00
|
|
|
// First requirements part (before debug management)
|
|
|
|
require_once(dirname(__FILE__) .'/config.inc.php');
|
|
|
|
require_once(dirname(__FILE__) .'/constants.inc.php'); // some constants are based on variables from config file
|
2007-12-12 17:29:16 +01:00
|
|
|
|
|
|
|
|
2008-11-21 11:44:28 +01:00
|
|
|
// Debug Management using constants
|
|
|
|
if(DEBUG_MODE) {
|
|
|
|
ini_set('display_errors', '1');
|
|
|
|
ini_set('mysql.trace_mode', '1');
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
//error_reporting(E_ALL^E_NOTICE);
|
|
|
|
} else {
|
|
|
|
ini_set('display_errors', '0');
|
|
|
|
ini_set('mysql.trace_mode', '0');
|
|
|
|
error_reporting(0);
|
2008-05-09 09:37:54 +02:00
|
|
|
}
|
|
|
|
|
2008-11-21 11:44:28 +01:00
|
|
|
|
|
|
|
// Second requirements part which could display bugs (must come after debug management)
|
2007-12-12 17:29:16 +01:00
|
|
|
require_once(dirname(__FILE__) .'/services/servicefactory.php');
|
|
|
|
require_once(dirname(__FILE__) .'/functions.inc.php');
|
|
|
|
|
2008-11-21 11:44:28 +01:00
|
|
|
|
|
|
|
session_start();
|
2008-05-10 10:59:41 +02:00
|
|
|
|
2008-01-09 16:51:35 +01:00
|
|
|
?>
|