2 ini_set('display_errors', '1');
3 ini_set('mysql.trace_mode', '0');
5 error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE);
8 require_once dirname(__FILE__) .'/services/servicefactory.php';
9 require_once dirname(__FILE__) .'/config.inc.php';
10 require_once dirname(__FILE__) .'/functions.inc.php';
12 // Determine the base URL
14 $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
16 foreach ($pieces as $piece) {
17 if ($piece != '' && !strstr($piece, '.php')) {
21 if (($root != '/') && (substr($root, -1, 1) != '/')) {
26 $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
27 $root = $protocol .'://'. $_SERVER['HTTP_HOST'] . $root;
30 define('GENERAL_MESSAGE', 200);
31 define('GENERAL_ERROR', 202);
32 define('CRITICAL_MESSAGE', 203);
33 define('CRITICAL_ERROR', 204);
34 define('DEBUG', TRUE);