diff --git a/common/init.php b/common/init.php index 3c74841..3af0bc0 100644 --- a/common/init.php +++ b/common/init.php @@ -15,9 +15,3 @@ require "pages.php"; foreach (array_diff(scandir(CONF['common']['root_path'] . "/fn"), array('..', '.')) as $file) require CONF['common']['root_path'] . '/fn/' . $file; - -function success($msg = '') { - if ($msg !== '') - echo "
Succès : " . $msg . "
"; - closeHTML(); -} diff --git a/fn/common.php b/fn/common.php index 3e56a0f..4317358 100644 --- a/fn/common.php +++ b/fn/common.php @@ -1,9 +1,15 @@ \n"; + closeHTML(); +} + // When the user requests something unexpected function userError($msg) { http_response_code(403); - echo "Erreur utilisataire : " . $msg . "
\n"; + echo "\n"; closeHTML(); } @@ -11,7 +17,7 @@ function userError($msg) { function serverError($msg) { http_response_code(500); error_log("Niver internal error: " . strip_tags($msg)); - echo "Server error: The server encountered an error: " . $msg . "
\n"; + echo "\n"; closeHTML(); }