1.0 - Initial Release

This commit is contained in:
Gehirnfussel 2013-11-11 22:06:14 +01:00
parent f592897f89
commit b2f05f978a
2 changed files with 86 additions and 2 deletions

View File

@ -1,2 +1,35 @@
Firma2-Essensplan
=================
# Speiseplan_Link
I was tired of writing my "Ausbildungsnachweis", which is a log of what I do as a job-trainee.
So I started this project to code something and to make things easier.
“I'll be honest, we're throwing science at the walls here to see what sticks.” ~Cave Johnson
## ToDos
* Fix End-of-Year-Bug (Week)
* Get a girlfriend
## Requirements
* PHP
* A Browser
## Changelog
* 1.0 Initial release
## License
Speiseplan_Link is freely distributable under the terms of the [MIT license](http://www.opensource.org/licenses/mit-license.php).
Copyright (c) 2013 Jan Jastrow
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Created by
* @Gehirnfussel [(Twitter)](http://twitter.com/gehirnfussel) [(App.net)](http://alpha.app.net/gehirnfussel)
## Credits to
* -

51
speiseplan_link.php Normal file
View File

@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<title>Speiseplan</title>
</head>
<body>
<?php
#¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
# created.by...: Jan Jastrow
# version......: 1.0
# last.change..: 2013-10-30
# license......: MIT
# soure........: https://github.com/Gehirnfussel/Firma2-Essensplan
#_______________
# Kalenderwoche ermitteln
$kw = (int)date('W');
# Wenn Kalenderwoche <= 9 dann füge eine 0 vorne dran.
if ($kw <= 9)
$kw = "0".$kw;
# GET-Parameter auslesen
if(isset($_GET['wann']))
$wann = $_GET['wann'];
else
$wann = 0;
# Diese Woche + $wann
$kw = $kw + $wann;
# Standort auslesen
if(isset($_GET['wo']))
$wo = $_GET['wo'];
else
$wo = "RD"; # Standard: RD
# Pfad und Dateiname zum PDF
$speiseplan = "//Server/Path1-".$wo."/Path2/".$kw."-KW.pdf";
# Direkte Weiterleitung zum entsprechenden Speiseplan
echo ' <p>Weiterleitung zum aktuellen Speiseplan. Falls ein Fehler auftritt, bitte <a href="file:$speiseplan">hier</a> klicken.</p>
<p>Ansonsten wenden Sie sich bitte per Mail an Jan Jastrow (<strong>jan@schwerkraftlabor.de</strong>)</p>';
header("Location: file:$speiseplan"); # Direkte Umleitung
exit;
?>
</body>
</html>