$v) { if (substr($k, 0, 5) == "raum_") { $raum = $raum . ";" . $v; } } } } include ("includes/header.php"); include ("includes/funktionen.php"); include ("includes/funktion_schichtplan.php"); include ("includes/funktion_schichtplan_aray.php"); echo Get_Text("Hello") . $_SESSION['Nick'] . ",
" . Get_Text("pub_schicht_beschreibung") . "

"; function ShowSwitchDay() { global $VeranstaltungsTage, $VeranstaltungsTageMax, $ausdatum, $raum; echo "\n\n\n"; if (isset ($VeranstaltungsTage)) foreach ($VeranstaltungsTage as $k => $v) if ($ausdatum == $v) { if ($k > 0) echo "\t\t\t\n"; if ($k < $VeranstaltungsTageMax) echo "\t\t\t\n"; } echo "\n\n
" . "" . $VeranstaltungsTage[$k -1] . "" . "" . $VeranstaltungsTage[$k +1] . "
"; } // wenn kein Datum gesetzt ist (die Seite zum ersten mal aufgerufen wird), // das Datum auf den ersten Tag setzen... if (!isset ($ausdatum)) { $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '" . gmdate("Y-m-d", time() + $gmdateOffset) . "%' ORDER BY `DateS`"; // $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`"; $Erg = mysql_query($sql, $con); if (mysql_num_rows($Erg) == 0) { $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1"; $Erg = mysql_query($sql, $con); } if (mysql_num_rows($Erg) > 0) $ausdatum = substr(mysql_result($Erg, 0, "DateS"), 0, 10); else $ausdatum = gmdate("Y-m-d", time() + $gmdateOffset); } if (!isset ($raum)) { // Ausgabe wenn kein Raum Ausgew�hlt: echo Get_Text("pub_schicht_auswahl_raeume") . "

\n"; if (isset ($Room)) { echo "
\n"; foreach ($Room as $RoomEntry) { echo "\t
  • "; echo "" . $RoomEntry["Name"] . ""; echo "
  • \n"; } echo ""; echo ""; echo "\n"; echo "
    \n"; } echo "

    "; echo Get_Text("pub_schicht_alles_1") . " " . Get_Text("pub_schicht_alles_2") . " " . Get_Text("pub_schicht_alles_3"); echo "\n

    \n\n"; echo "
    \n\n"; echo Get_Text("pub_schicht_EmptyShifts") . "\n"; // zeit die naesten freien schichten showEmptyShifts(); } else { // Wenn einraum Ausgew�hlt ist: if ($raum == -1) echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":

    "; elseif (substr($raum, 0, 1) == ";") echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":

    "; else echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . Get_Text("pub_schicht_Anzeige_2") . $RoomID[$raum] . "

    "; ShowSwitchDay(); echo "\n\n\n"; echo "\t\n"; echo "\t\t\n"; //Ausgabe Spalten �berschrift if ($raum == -1) { if (isset ($Room)) foreach ($Room as $RoomEntry) if (SummRoomShifts($RoomEntry["RID"]) > 0) echo "\t\t\n"; } elseif (substr($raum, 0, 1) == ";") { $words = preg_split("/;/", $raum); foreach ($words as $word) { if (strlen(trim($word)) > 0) echo "\t\t\n"; } } else echo "\t\t\n"; echo "\t\n"; //Zeit Ausgeben for ($i = 0; $i < 24; $i++) for ($j = 0; $j < $GlobalZeileProStunde; $j++) { $Spalten[$i * $GlobalZeileProStunde + $j] = "\t\n\t\t"; //Stunde: $SpaltenTemp = ""; $SpaltenTemp .= ($i < 10) ? "0$i:" : "$i:"; //Minute $TempMinuten = (($j * 60) / $GlobalZeileProStunde); $SpaltenTemp .= ($TempMinuten < 10) ? "0$TempMinuten" : "$TempMinuten"; //aktuelle stunde markieren if (($j == 0) && ($i == gmdate("H", time() + $gmdateOffset)) && (gmdate("Y-m-d", time() + $gmdateOffset) == $ausdatum)) $SpaltenTemp = "

    $SpaltenTemp

    "; $SpaltenTemp = "\n"; $Spalten[$i * $GlobalZeileProStunde + $j] .= $SpaltenTemp; } if ($raum == -1) { if (isset ($Room)) foreach ($Room as $RoomEntry) if (SummRoomShifts($RoomEntry["RID"]) > 0) CreateRoomShifts($RoomEntry["RID"]); } elseif (substr($raum, 0, 1) == ";") { if (isset ($Room)) { $words = preg_split("/;/", $raum); foreach ($words as $word) { if (strlen(trim($word)) > 0) if (SummRoomShifts($word) > 0) CreateRoomShifts($word); } } } else CreateRoomShifts($raum); //Ausageb Zeilen for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) { echo $Spalten[$i] . "\t\n"; } echo "
    start" . $RoomEntry["Name"] . "" . $RoomID[trim($word)] . "" . $RoomID[$raum] . "
    $SpaltenTemp
    \n"; ShowSwitchDay(); } //if (isset($raum)) echo "@"; include ("includes/footer.php"); ?>