stat: move from /files/stat to /stat
This commit is contained in:
+7
-2
@@ -56,7 +56,12 @@ global $getVers;
|
||||
$getProd = null;
|
||||
$getVers = null;
|
||||
$info = explode('/', $_SERVER['PATH_INFO']);
|
||||
if (sizeof($info) > 1 && ($info[1] === 'elwig' || $info[1] === 'winziprint')) {
|
||||
if (sizeof($info) > 0 && $info[1] === 'stat') {
|
||||
header('Status: 303');
|
||||
header('Content-Length: 0');
|
||||
header('Location: /stat');
|
||||
exit();
|
||||
} else if (sizeof($info) > 1 && ($info[1] === 'elwig' || $info[1] === 'winziprint')) {
|
||||
$getProd = $info[1];
|
||||
if (sizeof($info) > 2) $getVers = $info[2];
|
||||
if (sizeof($info) > 3) {
|
||||
@@ -180,7 +185,7 @@ if ($format === 'json') {
|
||||
<thead><tr><th class="center">Name</th><th class="center">Größe</th><th class="center">Änderungsdatum</th></tr></thead>
|
||||
<tbody>
|
||||
<?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";
|
||||
echo " <tr><td><a href=\"/files/$name\">$name</a></td><td style='text-align: right;'>" . number_format($size / 1024 / 1024, 1) . " MB</td><td>" . date('d.m.Y, H:i', $mtime) . "</td></tr>\n";
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user