Use <output>

This commit is contained in:
Miraty 2022-06-29 00:30:14 +02:00
parent a81016a73a
commit bd5497fe2f
2 changed files with 8 additions and 8 deletions

View File

@ -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 "<p><strong>Succès</strong> : <em>" . $msg . "</em></p>";
closeHTML();
}

View File

@ -1,9 +1,15 @@
<?php
function success($msg = '') {
if ($msg !== '')
echo "<p><output><strong>Succès</strong> : <em>" . $msg . "</em></output></p>\n";
closeHTML();
}
// When the user requests something unexpected
function userError($msg) {
http_response_code(403);
echo "<p><strong>Erreur utilisataire</strong> : <em>" . $msg . "</em></p>\n";
echo "<p><output><strong>Erreur utilisataire</strong> : <em>" . $msg . "</em></output></p>\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 "<p><strong>Server error</strong>: The server encountered an error: <em>" . $msg . "</em></p>\n";
echo "<p><output><strong>Server error</strong>: The server encountered an error: <em>" . $msg . "</em></output></p>\n";
closeHTML();
}