Use <output>
This commit is contained in:
parent
a81016a73a
commit
bd5497fe2f
2 changed files with 8 additions and 8 deletions
|
@ -15,9 +15,3 @@ require "pages.php";
|
||||||
|
|
||||||
foreach (array_diff(scandir(CONF['common']['root_path'] . "/fn"), array('..', '.')) as $file)
|
foreach (array_diff(scandir(CONF['common']['root_path'] . "/fn"), array('..', '.')) as $file)
|
||||||
require CONF['common']['root_path'] . '/fn/' . $file;
|
require CONF['common']['root_path'] . '/fn/' . $file;
|
||||||
|
|
||||||
function success($msg = '') {
|
|
||||||
if ($msg !== '')
|
|
||||||
echo "<p><strong>Succès</strong> : <em>" . $msg . "</em></p>";
|
|
||||||
closeHTML();
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<?php
|
<?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
|
// When the user requests something unexpected
|
||||||
function userError($msg) {
|
function userError($msg) {
|
||||||
http_response_code(403);
|
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();
|
closeHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +17,7 @@ function userError($msg) {
|
||||||
function serverError($msg) {
|
function serverError($msg) {
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
error_log("Niver internal error: " . strip_tags($msg));
|
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();
|
closeHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue