} $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } if (!file_exists("settings.php")) { // Xibo has not been configured. Just quit since we can't // raise a SOAP error because we don't know where // nuSOAP is yet. die("Not configured. Visit " . Kit::GetURL() . " to configure."); } if (file_exists("upgrade.php")) { // An upgrade is in progress. Just quit since the server // won't be in a servicable state die("An upgrade is pending. Visit " . Kit::GetURL() . "."); } //parse and init the settings.xml Config::Load(); //create a DB $db = new database(); if (!$db->connect_db($dbhost, $dbuser, $dbpass)) { trigger_error($db->error(), E_USER_ERROR); } if (!$db->select_db($dbname)) { trigger_error($db->error(), E_USER_ERROR); } // Error Handling (our error handler requires a DB connection set_error_handler(array(new Debug(), "ErrorHandler")); date_default_timezone_set(Config::GetSetting('defaultTimezone')); // Work out the location of this service