diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3a22f25..1ee67e8 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -21,7 +21,7 @@ - + @@ -72,6 +71,7 @@ 1600471514586 + 1600486645914 @@ -136,10 +136,10 @@ - + - + diff --git a/private/functions.php b/private/functions.php index 0d965f3..8f356bf 100644 --- a/private/functions.php +++ b/private/functions.php @@ -8,7 +8,7 @@ function url_for($script_path) { return WWW_ROOT . $script_path; } -/*function u($string="") { +function u($string="") { return urlencode($string); } @@ -18,7 +18,7 @@ function raw_u($string="") { function h($string="") { return htmlspecialchars($string); -}*/ +} function getGUID(){ if (function_exists('com_create_guid')){ return com_create_guid(); @@ -35,4 +35,19 @@ function getGUID(){ return $uuid; } } + +function error_404(){ + header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found"); + exit(); +} + +function error_500(){ + header($_SERVER["SERVER_PROTOCOL"] . " 500 Internal Server Error"); + exit(); +} + +function redirect_to($location){ + header("Location: " . $location); + exit(); +} ?> diff --git a/private/initialize.php b/private/initialize.php index f43f12f..7ae3dcf 100644 --- a/private/initialize.php +++ b/private/initialize.php @@ -1,5 +1,5 @@