summaryrefslogtreecommitdiff
path: root/skin/error.skin.php
blob: 8f7e4c79d12def15450d8b97dc6af8d572b7020c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;

}