= '$beginSchicht') and " . " (`Shifts`.`DateS` < '$endSchicht'))" . " OR " . " ((`Shifts`.`DateE` > '$beginSchicht') and " . " (`Shifts`.`DateE` <= '$endSchicht')) " . ") and " . "(`ShiftEntry`.`UID` = '" . $_SESSION['UID'] . "'));"; $bErg = mysql_query($SSQL, $con); if (mysql_num_rows($bErg) != 0) echo Get_Text("pub_schichtplan_add_AllreadyinShift"); else { // ermitteln der noch gesuchten $SQL3 = "SELECT * FROM `ShiftEntry`" . " WHERE ((`SID` = '" . $_POST["SID"] . "') AND (`TID` = '" . $_POST["TID"] . "') AND (`UID` = '0'));"; $Erg3 = mysql_query($SQL3, $con); if (mysql_num_rows($Erg3) <= 0) echo Get_Text("pub_schichtplan_add_ToManyYousers"); else { //write shift $SQL = "UPDATE `ShiftEntry` SET " . "`UID` = '" . $_SESSION['UID'] . "', " . "`Comment` = '" . $_POST["newtext"] . "' " . "WHERE ( (`SID` = '" . $_POST["SID"] . "') and " . "(`TID` = '" . $_POST["TID"] . "') and " . "(`UID` = '0')) LIMIT 1;"; $Erg = mysql_query($SQL, $con); if ($Erg != 1) echo Get_Text("pub_schichtplan_add_Error"); else echo Get_Text("pub_schichtplan_add_WriteOK"); } } } else { echo "

:-(

"; array_push($error_messages, "Hack atteck\n"); } } elseif (isset ($_GET["SID"]) && isset ($_GET["TID"])) { //wenn keine Rechte definiert sind if (!isset ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]])) $_SESSION['CVS'][$TID2Name[$_GET["TID"]]] = "Y"; if ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]] == "Y") { echo Get_Text("pub_schichtplan_add_Text1") . "

\n\n" . "
\n" . "\n"; $SQL = "SELECT * FROM `Shifts` WHERE "; $SQL .= "(`SID` = '" . $_GET["SID"] . "')"; $Erg = mysql_query($SQL, $con); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n \n"; echo "\n" . "\n" . "
" . Get_Text("pub_schichtplan_add_Date") . ": " . mysql_result($Erg, 0, "DateS") . "
" . Get_Text("pub_schichtplan_add_Place") . ": " . $RoomID[mysql_result($Erg, 0, "RID")] . "
" . Get_Text("pub_schichtplan_add_Job") . ": " . $EngelTypeID[$_GET["TID"]] . "
" . Get_Text("pub_schichtplan_add_Len") . ": " . mysql_result($Erg, 0, "Len") . "h
" . Get_Text("pub_schichtplan_add_TextFor") . ": " . mysql_result($Erg, 0, "Man") . "
" . Get_Text("pub_schichtplan_add_Comment") . ":" . "
 
\n" . "\n" . "\n" . "
"; } else { echo "

:-(

"; array_push($error_messages, "Hack atteck\n"); } } include "includes/footer.php"; ?>