Small changes

This commit is contained in:
2024-05-14 19:13:01 +02:00
parent ddcc746744
commit d4fb95f93f
4 changed files with 13 additions and 10 deletions

View File

@ -5,6 +5,7 @@ global $GITEA_TOKEN;
if ($_SERVER['PHP_AUTH_USER'] !== 'elwig' || $_SERVER['PHP_AUTH_PW'] !== 'ganzGeheim123!') {
header('Status: 401');
header('WWW-Authenticate: Basic realm="Elwig"');
header('Content-Type: text/plain');
exit("401 Unauthorized :(\n");
}

View File

@ -126,8 +126,8 @@ if ($format === 'json') {
<table>
<thead><tr><th>Name</th><th>Größe</th><th>Änderungsdatum</th></tr></thead>
<tbody>
<?php foreach ($entities as $name => [$prod, $vers, $url, $size, $mtime, $ctime, $mod, $cre]) {
echo " <tr><td><a href='files/$name'>$name</a></td><td>" . number_format($size / 1024 / 1024, 1) . " MB</td><td>" . date('d.m.Y, H:i', $mtime) . "</td></tr>\n";
<?php foreach (array_reverse($entities) as $name => [$prod, $vers, $url, $size, $mtime, $ctime, $mod, $cre]) {
echo " <tr><td><a href='/files/$name'>$name</a></td><td>" . number_format($size / 1024 / 1024, 1) . " MB</td><td>" . date('d.m.Y, H:i', $mtime) . "</td></tr>\n";
} ?>
</tbody>
</table>