1.0.2 - Code cleanup & preparations

Cleaned up some data & HTML, added some CSS.
Some preparations for 1.1
This commit is contained in:
Gehirnfussel 2013-11-18 08:17:23 +01:00
parent 936feace80
commit 7fdd078e61
1 changed files with 20 additions and 11 deletions

View File

@ -1,19 +1,18 @@
<?php
#¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
# version......: 1.0.1
# last.change..: 2013-11-14
# version......: 1.0.2
# last.change..: 2013-11-15
# created.by...: Jan Jastrow
# contact......: jan@schwerkraftlabor.de
# license......: MIT license
# soure........: https://github.com/Gehirnfussel/Firma2-Essensplan
#_________________
# Kalenderwoche ermitteln
$kw = (int)date('W');
# Gibt die Kalenderwoche des 31.12. des aktuellen Jahres aus
$max_kw = date("W",mktime(0,0,0,12,31,date("Y")));
# Wenn Kalenderwoche <= 9 dann füge eine 0 vorne dran.
if ($kw <= 9)
$kw = "0".$kw;
# Kalenderwoche ermitteln
$kw = date('W');
# GET-Parameter auslesen
if(isset($_GET['wann']))
@ -37,13 +36,23 @@ $speiseplan = "file://Server/Path1-".$wo."/Path2/".$kw."-KW.pdf";
echo '<!doctype html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<meta charset="UTF-8"/>
<meta http-equiv="refresh" content="0; url='.$speiseplan.'" />
<title>Speiseplan</title>
<style type="text/css">
body {
background: #e0e0e0;
color: #333;
font-family: "Open Sans", Calibri, Helvetica, Arial, sans-serif;
font-size: 12pt;
}
</style>
</head>
<body>
<script type="text/javascript">window.location = "'.$speiseplan.'"</script>
<p>Es erfolgt eine automatische Weiterleitung zum aktuellen Speiseplan.<br />
Falls ein Fehler auftritt, bitte <a href="'.$speiseplan.'">hier</a> klicken.</p>
<!-- <script type="text/javascript">window.location = "'.$speiseplan.'"</script> -->
<p>Es erfolgt eine automatische Weiterleitung zum aktuellen Speiseplan…</p>
<p>Sollte diese nicht stattfinden, können Sie <a href="'.$speiseplan.'">hier klicken</a>, um zum aktuellen Speiseplan zu kommen.</p>
<p>Falls ein Fehler auftritt, wenden Sie sich bitte an Ihren Administrator.</p>
</body>
</html>';
?>