= '$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");
}//TO Many USERS
}//Allready in Shift
}
elseif (isset($_GET["SID"]) && isset($_GET["TID"])) {
echo Get_Text("pub_schichtplan_add_Text1"). "
\n\n".
"