Add header.inc and footer.inc
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require "../format.inc";
|
||||
$TITLE = 'Downloads';
|
||||
|
||||
if ($_SERVER['PATH_INFO'] !== '') {
|
||||
header('Status: 404');
|
||||
@ -37,33 +38,15 @@ if ($format === 'json') {
|
||||
}
|
||||
} else if ($format === 'html') {
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title>Downloads - Elwig - Elektronische Winzergenossenschaftsverwaltung</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="icon" sizes="16x16 20x20 24x24 30x30 32x32 36x36 40x40 48x48 60x60 64x64 72x72 80x80 96x96 128x128 256x256" href="../res/elwig.ico"/>
|
||||
<link rel="stylesheet" href="../res/style.css"/>
|
||||
</head>
|
||||
<body>
|
||||
require "../header.inc"; ?>
|
||||
<h1>Downloads</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Größe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead><tr><th>Name</th><th>Größe</th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($files as $name => [$size, $mtime, $ctime]) {
|
||||
echo " <tr><td><a href='$name'>$name</a></td><td>" . number_format($size / 1024 / 1024, 1) . " MB</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
<?php foreach ($files as $name => [$size, $mtime, $ctime]) {
|
||||
echo " <tr><td><a href='$name'>$name</a></td><td>" . number_format($size / 1024 / 1024, 1) . " MB</td></tr>\n";
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a href="?format=json">JSON-Format</a></p>
|
||||
</body>
|
||||
</html>
|
||||
<?php }
|
||||
<p><a href="files?format=json">JSON-Format</a></p>
|
||||
<?php require "../footer.inc"; }
|
||||
|
Reference in New Issue
Block a user