2007-12-12 17:29:16 +01:00
|
|
|
<?php
|
|
|
|
ini_set('display_errors', '1');
|
|
|
|
ini_set('mysql.trace_mode', '0');
|
|
|
|
|
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
2008-05-10 10:59:41 +02:00
|
|
|
//error_reporting(E_ALL);
|
2007-12-12 17:29:16 +01:00
|
|
|
|
|
|
|
define('DEBUG', true);
|
|
|
|
session_start();
|
|
|
|
|
2008-05-09 09:37:54 +02: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
|
|
|
require_once(dirname(__FILE__) .'/services/servicefactory.php');
|
|
|
|
require_once(dirname(__FILE__) .'/config.inc.php');
|
2008-04-18 11:57:32 +02:00
|
|
|
require_once(dirname(__FILE__) .'/constants.inc.php');
|
2007-12-12 17:29:16 +01:00
|
|
|
require_once(dirname(__FILE__) .'/functions.inc.php');
|
|
|
|
|
|
|
|
// Determine the base URL
|
|
|
|
if (!isset($root)) {
|
|
|
|
$pieces = explode('/', $_SERVER['SCRIPT_NAME']);
|
|
|
|
$root = '/';
|
|
|
|
foreach($pieces as $piece) {
|
|
|
|
if ($piece != '' && !strstr($piece, '.php')) {
|
|
|
|
$root .= $piece .'/';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (($root != '/') && (substr($root, -1, 1) != '/')) {
|
|
|
|
$root .= '/';
|
|
|
|
}
|
|
|
|
$root = 'http://'. $_SERVER['HTTP_HOST'] . $root;
|
|
|
|
}
|
2008-05-10 10:59:41 +02:00
|
|
|
|
2008-01-09 16:51:35 +01:00
|
|
|
?>
|