= 5.1.0 required by date functions $errorReportingLevel = E_ALL & ~E_NOTICE; error_reporting($errorReportingLevel); ini_set('error_reporting', $errorReportingLevel); if (file_exists(APP_PATH_ROOT . "/config/.config_{$_SERVER['SERVER_NAME']}.php")) { require APP_PATH_ROOT . "/config/.config_{$_SERVER['SERVER_NAME']}.php"; } if (file_exists(APP_PATH_ROOT . "/.config.php")) include APP_PATH_ROOT . "/.config.php"; require_once APP_PATH_ROOT . "/superedit-SEF.php"; SEF('DEBUG_S'); Lib::loadClass('ApiUser'); Lib::loadClass('Api'); session_start(); session_write_close(); $apiUser = new ApiUser(); // ?LOGIN=LOGOUT if ('LOGOUT' == V::get('LOGIN', '', $_GET)) { $apiUser->logout(); } else { $apiUser->auth(); } $reqUri = V::get('REQUEST_URI', '', $_SERVER); $reqScript = V::get('SCRIPT_NAME', '', $_SERVER); $taskPath = str_replace($reqScript, '', $reqUri); IF(V::get('DBG','',$_GET)){echo'
taskPath (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($taskPath);echo'';}
$api = new Api();
$api->setUser($apiUser);
try {
$api->execute($taskPath);
}
catch (HttpException $e) {
Http::sendHeaderByCode($e->getCode());
echo $e->getMessage();
}
catch (Exception $e) {
Http::sendHeaderByCode(500);
echo $e->getMessage();
}
IF(V::get('DBG','',$_GET)){echo'PHP_AUTH_USER (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($_SERVER['PHP_AUTH_USER']);echo'';}
IF(V::get('DBG','',$_GET)){echo'REQUEST_URI (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($_SERVER['REQUEST_URI']);echo'';}
IF(V::get('DBG','',$_GET)){echo'SCRIPT_NAME (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($_SERVER['SCRIPT_NAME']);echo'';}
IF(V::get('DBG','',$_GET)){die("\nEOF L." . __LINE__);}
?>