diff options
author | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2005-09-10 17:25:43 +0000 |
---|---|---|
committer | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2005-09-10 17:25:43 +0000 |
commit | 310c2ce98fc8c0e94559c9ed8587101d92f6e853 (patch) | |
tree | 7093065a133e434fb7e551803e8700661d04c5bb /admin/schichtplan_druck.php |
add total system
git-svn-id: svn://svn.cccv.de/engel-system@1 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'admin/schichtplan_druck.php')
-rwxr-xr-x | admin/schichtplan_druck.php | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/admin/schichtplan_druck.php b/admin/schichtplan_druck.php new file mode 100755 index 00000000..a6ec2dbd --- /dev/null +++ b/admin/schichtplan_druck.php @@ -0,0 +1,169 @@ +<?php +$title = "Himmel"; +$header = "Schichtpläne"; +$submenus = 1; + + +if (!IsSet($action)) { +include ("./inc/header.php"); +include ("./inc/funktionen.php"); + +include ("./inc/funktion_schichtplan.php"); +include ("./inc/funktion_user.php"); + + +?> + +Hallo <? echo $_SESSION['Nick']?>,<br> +auf dieser Seite kannst du dir den Schichtplan in einer Druckansicht generieren lassen. Wähle hierfür ein Datum und den Raum: +<br><br> +<form action="./schichtplan_druck.php" method="post" target="_print"> +<input type="hidden" name="action" value="1"> + + +<table> + <tr> + <td align="right">Datum:</td> + <td align="left"> + <select name="ausdatum"> +<? +$SQL = "SELECT DateS FROM `Shifts` ORDER BY 'DateS'"; +$Erg = mysql_query($SQL, $con); +if (!isset($ausdatum)) + $ausdatum = substr(mysql_result($Erg, $i , 0), 0,10); + +for ($i = 0 ; $i < mysql_fetch_row($Erg) ; $i++) +{ + if ($tmp != substr(mysql_result($Erg, $i , 0), 0,10)) + { + $tmp = substr(mysql_result($Erg, $i , 0), 0,10); + echo "\t\t\t\t<option value=\"$tmp\">$tmp</option>\n"; + } +} + +?> + </select> + </td> + </tr> + <tr> + <td align="right">Raum:</td> + <td align="left"> + <select name="Raum"> +<?php + +$res = mysql_query("SELECT Name, RID FROM `Room` WHERE `show`!='N' ORDER BY Name;",$con); + +for ($i = 0; $i < mysql_num_rows($res); $i++) +{ + $rid=mysql_result($res,$i,"RID"); + $raum_name=mysql_result($res, $i, "Name"); + echo "\t\t\t\t<option value=\"$rid\">$raum_name</option>\n"; +} + + +?> + </select> + </td> + </tr> + +</table> +<br> +<input type="submit" value="generieren..."> +</form> + +<br><br> +<? + +include ("./inc/footer.php"); + +} +else +{ + + +if (IsSet($Raum) AND IsSet($ausdatum)) +{ +include ("./inc/db.php"); +include ("./inc/config.php"); +include ("./inc/funktion_lang.php"); +include ("./inc/funktion_schichtplan.php"); +include ("./inc/funktion_user.php"); +?> + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>Schichtplan</title> +<meta name="keywords" content="Engel, Himmelsverwaltung"> +<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> +<meta http-equiv="Content-Style-Type" content="text/css"> +<meta http-equiv="expires" content="0"> +<meta name="robots" content="index"> +<meta name="revisit-after" content="1 days"> +<meta http-equiv="content-language" content="de"> +</head> +<body> + +<h1>Schichtplan</h1> + +<table> + <tr> + <td width="250" align="left"> + <span style="font-weight:bold;font-size:100%">Datum:</span> + <span style="font-weight:bold;font-size:200%"><? echo $date; ?></span> + </td> + <td width="350" align="right"> + <span style="font-weight:bold;font-size:100%">Raum:</span> + <span style="font-weight:bold;font-size:200%"><? echo $RoomID[$Raum]; ?> </span> + </td> + </tr> +</table> + +<table border="2" width="650" class="border" cellpadding="2" cellspacing="1"> +<? +//Ausgabe Spalten überschrift +?> + <tr class="contenttopic"> + <th bgcolor="#E0E0E0">Uhrzeit</th> + <th bgcolor="#E0E0E0">Schichtplanbelegung</th> + </tr> +<? + +//Zeit Ausgeben +for( $i = 0; $i < 24; $i++ ) + for( $j = 0; $j < $GlobalZeileProStunde; $j++) + { + $Spalten[$i * $GlobalZeileProStunde + $j] = + "\t<tr class=\"content\">\n"; + if( $j==0) + { + $Spalten[$i * $GlobalZeileProStunde + $j].= + "\t\t<td rowspan=\"$GlobalZeileProStunde\">"; + if( $i < 10 ) + $Spalten[$i * $GlobalZeileProStunde + $j].= "0"; + $Spalten[$i * $GlobalZeileProStunde + $j].= "$i:"; + if( ( ($j*60) / $GlobalZeileProStunde) < 10 ) + $Spalten[$i * $GlobalZeileProStunde + $j].= "0"; + $Spalten[$i * $GlobalZeileProStunde + $j].= + ( ($j*60) / $GlobalZeileProStunde). "</td>\n"; + + } + } + + +CreateRoomShifts( $Raum ); + + +// Ausgabe Zeilen + for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) echo $Spalten[$i]; +// Ende +echo "</table>\n"; + +echo "Stand: ". gmdate("Y-m-d H:i"). "\n"; +echo "</body>\n"; +echo "</html>\n"; + +} //isset($Vars) +} //isset($Action) + +?> |