diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-10-05 14:36:01 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-10-05 14:36:01 +0200 |
commit | 0f185543bb9851fddc137f81a1e2a1d21589bc83 (patch) | |
tree | c9a3c56ba2166defac508f8d1c67ef81fe4e9789 /ratatoeskr/main.php | |
parent | afe436b25dd935aa2ae3a327027ea04b3c82e5ac (diff) | |
download | ratatoeskr-cms-0f185543bb9851fddc137f81a1e2a1d21589bc83.tar.gz ratatoeskr-cms-0f185543bb9851fddc137f81a1e2a1d21589bc83.tar.bz2 ratatoeskr-cms-0f185543bb9851fddc137f81a1e2a1d21589bc83.zip |
Backend, frontend and 404 handlers partially implemented.
* Backend layout done.
* Frontend theoretically done (untested).
* 404 handler done
* Added textprocessors.php
Diffstat (limited to 'ratatoeskr/main.php')
-rw-r--r-- | ratatoeskr/main.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php index 09f4d8d..041b96e 100644 --- a/ratatoeskr/main.php +++ b/ratatoeskr/main.php @@ -15,7 +15,7 @@ require_once(dirname(__FILE__) . "/sys/models.php"); require_once(dirname(__FILE__) . "/sys/init_ste.php"); require_once(dirname(__FILE__) . "/sys/translation.php"); require_once(dirname(__FILE__) . "/sys/urlprocess.php"); -#require_once(dirname(__FILE__) . "/frontend.php"); +require_once(dirname(__FILE__) . "/frontend.php"); require_once(dirname(__FILE__) . "/backend/main.php"); function ratatoeskr() @@ -38,12 +38,20 @@ function ratatoeskr() } /* Register URL handlers */ - #register_url_handler("_default", "frontend_url_handler"); + register_url_handler("_default", "frontend_url_handler"); register_url_handler("backend", $backend_subactions); - #register_url_handler("_notfound", "e404handler"); + register_url_handler("_notfound", url_action_simple(function($data) + { + global $ste; + //header("HTTP/1.1 404 Not Found"); + $ste->vars["title"] = "404 Not Found"; + $ste->vars["details"] = str_replace("[[URL]]", $_SERVER["REQUEST_URI"], (isset($translation) ? $translation["e404_details"] : "The page [[URL]] could not be found. Sorry.")); + echo $ste->exectemplate("systemtemplates/error.html"); + })); $urlpath = explode("/", $_GET["action"]); $rel_path_to_root = implode("/", array_merge(array("."), array_repeat("..", count($urlpath) - 1))); + $GLOBALS["rel_path_to_root"] = $rel_path_to_root; $data = array("rel_path_to_root" => $rel_path_to_root); $ste->vars["rel_path_to_root"] = $rel_path_to_root; |