2005-09-10 19:25:43 +02:00
|
|
|
|
<?php
|
|
|
|
|
$title = "Himmel";
|
|
|
|
|
$header = "Schichtpläne";
|
|
|
|
|
$submenus = 1;
|
|
|
|
|
|
|
|
|
|
|
2005-11-09 23:24:02 +01:00
|
|
|
|
if (!IsSet($_POST["action"]))
|
|
|
|
|
{
|
|
|
|
|
include ("./inc/header.php");
|
|
|
|
|
include ("./inc/funktionen.php");
|
2005-11-22 18:25:49 +01:00
|
|
|
|
include ("./inc/funktion_schichtplan_aray.php");
|
2005-11-09 23:24:02 +01:00
|
|
|
|
include ("./inc/funktion_schichtplan.php");
|
|
|
|
|
include ("./inc/funktion_user.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
|
?>
|
|
|
|
|
|
2005-11-30 23:13:38 +01:00
|
|
|
|
Hallo <?PHP echo $_SESSION['Nick']?>,<br>
|
2005-09-10 19:25:43 +02:00
|
|
|
|
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">
|
2005-11-30 23:13:38 +01:00
|
|
|
|
<?PHP
|
2005-09-10 19:25:43 +02:00
|
|
|
|
$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
|
|
|
|
|
|
2005-11-09 23:24:02 +01:00
|
|
|
|
$res = mysql_query("SELECT Name, RID FROM `Room` WHERE `show`!='N' ORDER BY Name;",$con);
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
2005-11-09 23:24:02 +01:00
|
|
|
|
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";
|
|
|
|
|
}
|
2005-09-10 19:25:43 +02:00
|
|
|
|
?>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
<br>
|
|
|
|
|
<input type="submit" value="generieren...">
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<br><br>
|
2005-11-30 23:13:38 +01:00
|
|
|
|
<?PHP
|
2005-11-09 23:24:02 +01:00
|
|
|
|
include ("./inc/footer.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
2005-11-09 23:24:02 +01:00
|
|
|
|
else //#################################################################
|
2005-09-10 19:25:43 +02:00
|
|
|
|
{
|
2005-11-09 23:24:02 +01:00
|
|
|
|
if (IsSet($_POST["Raum"]) AND IsSet($_POST["ausdatum"]))
|
|
|
|
|
{
|
|
|
|
|
$Raum = $_POST["Raum"];
|
|
|
|
|
$ausdatum = $_POST["ausdatum"];
|
|
|
|
|
|
2006-11-23 18:39:05 +01:00
|
|
|
|
include ("./inc/config_db.php");
|
2005-11-09 23:24:02 +01:00
|
|
|
|
include ("./inc/config.php");
|
|
|
|
|
include ("./inc/secure.php");
|
|
|
|
|
//var wird nur gesetzt immer edit auszublenden, achtung sesion darf nicht gestart sein !!!
|
|
|
|
|
$_SESSION['CVS'][ "admin/schichtplan.php" ] = "N";
|
|
|
|
|
include ("./inc/funktion_lang.php");
|
|
|
|
|
include ("./inc/funktion_schichtplan.php");
|
2005-11-22 18:25:49 +01:00
|
|
|
|
include ("./inc/funktion_schichtplan_aray.php");
|
2005-11-09 23:24:02 +01:00
|
|
|
|
include ("./inc/funktion_user.php");
|
|
|
|
|
?>
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
<!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>
|
2005-11-30 23:13:38 +01:00
|
|
|
|
<span style="font-weight:bold;font-size:200%"><?PHP echo $ausdatum; ?></span>
|
2005-09-10 19:25:43 +02:00
|
|
|
|
</td>
|
|
|
|
|
<td width="350" align="right">
|
|
|
|
|
<span style="font-weight:bold;font-size:100%">Raum:</span>
|
2005-11-30 23:13:38 +01:00
|
|
|
|
<span style="font-weight:bold;font-size:200%"><?PHP echo $RoomID[$Raum]; ?> </span>
|
2005-09-10 19:25:43 +02:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<table border="2" width="650" class="border" cellpadding="2" cellspacing="1">
|
2005-11-30 23:13:38 +01:00
|
|
|
|
|
|
|
|
|
<!--Ausgabe Spalten <EFBFBD>berschrift-->
|
|
|
|
|
|
2005-09-10 19:25:43 +02:00
|
|
|
|
<tr class="contenttopic">
|
|
|
|
|
<th bgcolor="#E0E0E0">Uhrzeit</th>
|
|
|
|
|
<th bgcolor="#E0E0E0">Schichtplanbelegung</th>
|
|
|
|
|
</tr>
|
2005-11-30 23:13:38 +01:00
|
|
|
|
<?PHP
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
//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)
|
|
|
|
|
|
|
|
|
|
?>
|