ausgabe angepasst

git-svn-id: svn://svn.cccv.de/engel-system@223 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2006-12-29 20:25:44 +00:00
parent 94a1cc73ae
commit b432f8d6c6
1 changed files with 22 additions and 61 deletions

View File

@ -4,79 +4,40 @@ $header = "Schichtpläne";
$submenus = 1; $submenus = 1;
if (!IsSet($_POST["action"])) if (!IsSet($_GET["action"]))
{ {
include ("./inc/header.php"); include ("./inc/header.php");
include ("./inc/funktionen.php"); include ("./inc/funktionen.php");
include ("./inc/funktion_schichtplan_aray.php"); include ("./inc/funktion_schichtplan_aray.php");
include ("./inc/funktion_schichtplan.php"); include ("./inc/funktion_schichtplan.php");
?>
Hallo <?PHP echo $_SESSION['Nick']?>,<br> echo "Hallo ". $_SESSION['Nick']. "<br>\n".
auf dieser Seite kannst du dir den Schichtplan in einer Druckansicht generieren lassen. W&auml;hle hierf&uuml;r ein Datum und den Raum: "auf dieser Seite kannst du dir den Schichtplan in einer Druckansicht generieren lassen. W&auml;hle hierf&uuml;r ein Datum und den Raum:\n".
<br><br> "<br>\n";
<form action="./schichtplan_druck.php" method="post" target="_print">
<input type="hidden" name="action" value="1"> foreach( $VeranstaltungsTage as $k => $v)
{
<table> $res = mysql_query("SELECT Name, RID FROM `Room` WHERE `show`!='N' ORDER BY `Name`;",$con);
<tr> for ($i = 0; $i < mysql_num_rows($res); $i++)
<td align="right">Datum:</td> {
<td align="left"> $Tag = $VeranstaltungsTage[$k];
<select name="ausdatum"> $RID = mysql_result($res,$i,"RID");
<?PHP $Rname = mysql_result($res, $i, "Name");
$SQL = "SELECT DateS FROM `Shifts` ORDER BY 'DateS'"; echo "\t<a href=\"./schichtplan_druck.php?action=1&Raum=$RID&ausdatum=$Tag\" target=\"_blank\">$Tag $Rname</a><br>\n";
$Erg = mysql_query($SQL, $con); }
if (!isset($ausdatum)) echo "<br>\n";
$ausdatum = substr(mysql_result($Erg, $i , 0), 0,10); }
echo "<br><br>";
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>
<?PHP
include ("./inc/footer.php"); include ("./inc/footer.php");
} }
else //################################################################# else //#################################################################
{ {
if (IsSet($_POST["Raum"]) AND IsSet($_POST["ausdatum"])) if (IsSet($_GET["Raum"]) AND IsSet($_GET["ausdatum"]))
{ {
$Raum = $_POST["Raum"]; $Raum = $_GET["Raum"];
$ausdatum = $_POST["ausdatum"]; $ausdatum = $_GET["ausdatum"];
include ("./inc/config_db.php"); include ("./inc/config_db.php");
include ("./inc/config.php"); include ("./inc/config.php");