";
switch ($action) {
case "change":
if (IsSet($enterUID))
{
if ($Type == "Normal")
{
$SQL = "UPDATE `User` SET ";
$SQL.= " `Nick` = '$eNick', `Name` = '$eName', `Vorname` = '$eVorname', ".
"`Telefon` = '$eTelefon', `Handy` = '$eHandy', `DECT` = '$eDECT', ".
"`email` = '$eemail', `Size` = '$eSize', ".
"`Gekommen`= '$eGekommen', `Aktiv`= '$eAktiv', ".
"`Tshirt` = '$eTshirt' ";
$SQL.= "WHERE `UID` = '$enterUID' LIMIT 1;";
echo "User-";
SQLExec( $SQL );
}
if ($Type == "Secure")
{
$SQL2 = "UPDATE `UserCVS` SET ";
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=$enterUID";
$Erg_CVS = mysql_query($SQL_CVS, $con);
$CVS_Data = mysql_fetch_array($Erg_CVS);
$CVS_Data_i = 1;
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value)
{
if( ($CVS_Data_i+1)%2 && $CVS_Data_Name!="UID")
$SQL2.= "`$CVS_Data_Name` = '".$$CVS_Data_i."', ";
$CVS_Data_i++;
}
$SQL2 = substr( $SQL2, 0, strlen($SQL2)-2 );
$SQL2.= " WHERE `UID` = '$enterUID' LIMIT 1;";
echo "
Secure-";
SQLExec( $SQL2 );
}
}
break;
case "delete":
if (IsSet($enterUID))
{
$SQL="delete from `User` WHERE `UID` = '$enterUID' LIMIT 1;";
SQLExec( $SQL );
$SQL2="delete from `UserCVS` WHERE `UID` = '$enterUID' LIMIT 1;";
SQLExec( $SQL2 );
$SQL3="UPDATE `ShiftEntry` SET `UID` = '0', `Comment` = NULL ".
"WHERE `UID` = '$enterUID' LIMIT 1;";
SQLExec( $SQL3 );
}
break;
case "newpw":
echo "Bitte neues Kennwort für ";
// Get Nick
$USQL = "SELECT * FROM User where UID=$eUID";
$Erg = mysql_query($USQL, $con);
echo mysql_result($Erg, 0, "Nick");
echo " eingeben:
";
echo "