aboutsummaryrefslogtreecommitdiff
path: root/skin/error.phps
diff options
context:
space:
mode:
Diffstat (limited to 'skin/error.phps')
-rw-r--r--skin/error.phps23
1 files changed, 23 insertions, 0 deletions
diff --git a/skin/error.phps b/skin/error.phps
new file mode 100644
index 0000000..8f7e4c7
--- /dev/null
+++ b/skin/error.phps
@@ -0,0 +1,23 @@
+<?php
+
+namespace skin\error;
+
+use Stringable;
+
+function http_error($ctx,
+ int $code,
+ string|Stringable $title,
+ string|Stringable|null $message = null) {
+return <<<HTML
+<html>
+ <head><title>$code $title</title></head>
+ <body>
+ <center><h1>$code $title</h1></center>
+ {$ctx->if_true($message,
+ '<hr><p align="center">'.$message.'</p>'
+ )}
+ </body>
+</html>
+HTML;
+
+} \ No newline at end of file