= 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(); } set_time_limit(5 * 60); $taskPath = Request::getRewriteTaskPath(); IF(V::get('DBG','',$_GET)){echo'
taskPath (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($taskPath);echo'';}
if ('/xml/wfs' == substr($taskPath, 0, 8)) {
$taskPath = "/xml/wfsQgis/" . substr($taskPath, 9);
}
$api = new Api();
$api->setUser($apiUser);
$apiBaseUri = Request::getScriptUri();
$api->setBaseUri($apiBaseUri);
try {
$api->execute($taskPath);
}
catch (HttpException $e) {
Http::sendHeaderByCode($e->getCode());
echo $e->getMessage();
}
catch (Exception $e) {
Http::sendHeaderByCode(500);
echo $e->getMessage();
}
?>