2 ini_set('display_errors', '1');
3 ini_set('mysql.trace_mode', '0');
5 error_reporting(E_ALL ^ E_NOTICE);
10 require_once dirname(__FILE__) .'/services/servicefactory.php';
11 require_once dirname(__FILE__) .'/config.inc.php';
12 require_once dirname(__FILE__) .'/functions.inc.php';
14 // Determine the base URL
16 $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
18 foreach ($pieces as $piece) {
19 if ($piece != '' && !strstr($piece, '.php')) {
23 if (($root != '/') && (substr($root, -1, 1) != '/')) {
28 $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
29 $root = $protocol .'://'. $_SERVER['HTTP_HOST'] . $root;
33 define('GENERAL_MESSAGE', 200);
34 define('GENERAL_ERROR', 202);
35 define('CRITICAL_MESSAGE', 203);
36 define('CRITICAL_ERROR', 204);