Route::add("controllers/tile/"); Route::add("controllers/tilecache/"); Route::add("controllers/session/"); Route::add("controllers/osm/"); Route::add("controllers/upload/vector"); Route::add("controllers/upload/bitmap"); Route::add("controllers/upload/raster"); Route::add("controllers/upload/processvector"); Route::add("controllers/upload/processbitmap"); Route::add("controllers/upload/processraster"); Route::add("controllers/logstash"); Route::add("controllers/drawing"); Route::add("controllers/job", function () { Database::setDb("gc2scheduler"); }); Route::add("controllers/workflow"); } elseif (Input::getPath()->part(1) == "wms" || Input::getPath()->part(1) == "ows") { Session::start(); new \app\controllers\Wms(); } elseif (Input::getPath()->part(1) == "wmsc") { Session::start(); new \app\controllers\Wmsc(); } elseif (Input::getPath()->part(1) == "wfs") { Session::start(); $db = Input::getPath()->part(2); $dbSplit = explode("@", $db); if (sizeof($dbSplit) == 2) { $db = $dbSplit[1]; $user = $dbSplit[0]; $parentUser = false; } else {
include_once "editor.php"; } elseif (Input::getPath()->part(1) == "controllers") { Session::start(); Session::authenticate(null); Database::setDb($_SESSION['screen_name']); Connection::$param["postgisschema"] = $_SESSION['postgisschema']; Route::add("controllers/cfgfile"); Route::add("controllers/classification/"); Route::add("controllers/database/"); Route::add("controllers/layer/"); Route::add("controllers/mapfile"); Route::add("controllers/setting"); Route::add("controllers/table/"); Route::add("controllers/tile/"); Route::add("controllers/tilecache/"); Route::add("controllers/session/"); } elseif (Input::getPath()->part(1) == "wms" || Input::getPath()->part(1) == "ows") { Session::start(); new \app\controllers\Wms(); } elseif (!Input::getPath()->part(1)) { if (App::$param["redirectTo"]) { \app\inc\Redirect::to(App::$param["redirectTo"]); } else { \app\inc\Redirect::to("/user/login"); } } else { header('HTTP/1.0 404 Not Found'); echo "<h1>404 Not Found</h1>"; echo "The page that you have requested could not be found."; exit; }