add group del
This commit is contained in:
parent
c6c14dc740
commit
2532a68fdd
|
@ -16,12 +16,6 @@ if (IsSet($_GET["enterUID"]))
|
||||||
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ".
|
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ".
|
||||||
"bereits sein T-Shirt erhalten hat.<br><br>\n";
|
"bereits sein T-Shirt erhalten hat.<br><br>\n";
|
||||||
|
|
||||||
echo "<form action=\"./userSaveSecure.php?action=change\" method=\"POST\">\n";
|
|
||||||
echo "<table border=\"0\">\n";
|
|
||||||
echo "<input type=\"hidden\" name=\"Type\" value=\"Secure\">\n";
|
|
||||||
|
|
||||||
// CVS-Rechte
|
|
||||||
echo " <tr><td><br><u>Rights of \"". UID2Nick($_GET["enterUID"]). "\":</u></td></tr>\n";
|
|
||||||
|
|
||||||
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE `UID`='". $_GET["enterUID"]. "'";
|
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE `UID`='". $_GET["enterUID"]. "'";
|
||||||
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
||||||
|
@ -30,6 +24,25 @@ if (IsSet($_GET["enterUID"]))
|
||||||
echo "Sorry, der Engel (UID=". $_GET["enterUID"]. ") wurde in der Liste nicht gefunden.";
|
echo "Sorry, der Engel (UID=". $_GET["enterUID"]. ") wurde in der Liste nicht gefunden.";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Rename if is an group
|
||||||
|
if( $_GET["enterUID"] < 0 ) {
|
||||||
|
$SQLname = "SELECT `Name` FROM `UserGroups` WHERE `UID`='". $_GET["enterUID"]. "'";
|
||||||
|
$ErgName = mysql_query($SQLname, $con);
|
||||||
|
echo mysql_error($con);
|
||||||
|
|
||||||
|
echo "<form action=\"./userSaveSecure.php?action=changeGroupName\" method=\"POST\">\n";
|
||||||
|
echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
|
||||||
|
echo "<input type=\"text\" name=\"GroupName\" value=\"". mysql_result($ErgName, 0, "Name"). "\">\n";
|
||||||
|
echo "<input type=\"submit\" value=\"rename\">\n";
|
||||||
|
echo "</form>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<form action=\"./userSaveSecure.php?action=change\" method=\"POST\">\n";
|
||||||
|
echo "<table border=\"0\">\n";
|
||||||
|
echo "<input type=\"hidden\" name=\"Type\" value=\"Secure\">\n";
|
||||||
|
echo " <tr><td><br><u>Rights of \"". UID2Nick($_GET["enterUID"]). "\":</u></td></tr>\n";
|
||||||
|
|
||||||
|
|
||||||
$CVS_Data = mysql_fetch_array($Erg_CVS);
|
$CVS_Data = mysql_fetch_array($Erg_CVS);
|
||||||
$CVS_Data_i = 1;
|
$CVS_Data_i = 1;
|
||||||
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value)
|
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value)
|
||||||
|
@ -78,7 +91,6 @@ if (IsSet($_GET["enterUID"]))
|
||||||
} //IF
|
} //IF
|
||||||
} //Foreach
|
} //Foreach
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
} // IF TYPE
|
|
||||||
|
|
||||||
// Ende Formular
|
// Ende Formular
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
@ -87,11 +99,12 @@ if (IsSet($_GET["enterUID"]))
|
||||||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
echo "<form action=\"./userSaveSecure.php?action=delete\" method=\"POST\">\n";
|
echo "<br><form action=\"./userSaveSecure.php?action=delete\" method=\"POST\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
|
echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
|
||||||
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include ("../../includes/footer.php");
|
include ("../../includes/footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -65,8 +65,23 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
||||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "changeGroupName":
|
||||||
|
if (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]<0) )
|
||||||
|
{
|
||||||
|
$SQL = "UPDATE `UserGroups` SET `Name`='". $_POST["GroupName"]. "' WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1 ;";
|
||||||
|
$Erg = db_query($SQL, "Update Group Name");
|
||||||
|
if ($Erg == 1) {
|
||||||
|
echo "Änderung wurde gesichert...\n";
|
||||||
|
} else {
|
||||||
|
echo "Fehler beim speichern...\n(". mysql_error($con). ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
||||||
|
break;
|
||||||
|
|
||||||
case "delete":
|
case "delete":
|
||||||
if (IsSet($_POST["enterUID"]))
|
if (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]>0) )
|
||||||
{
|
{
|
||||||
echo "delate User...";
|
echo "delate User...";
|
||||||
$SQL="DELETE FROM `User` WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1;";
|
$SQL="DELETE FROM `User` WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1;";
|
||||||
|
@ -95,6 +110,25 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
||||||
} else {
|
} else {
|
||||||
echo "Fehler beim speichern...\n(". mysql_error($con). ")";
|
echo "Fehler beim speichern...\n(". mysql_error($con). ")";
|
||||||
}
|
}
|
||||||
|
} elseif (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]<0) ) {
|
||||||
|
echo "delate Group...";
|
||||||
|
$SQL="DELETE FROM `UserGroups` WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1;";
|
||||||
|
$Erg = db_query($SQL, "Group delete");
|
||||||
|
if ($Erg == 1) {
|
||||||
|
echo "Änderung wurde gesichert...\n";
|
||||||
|
} else {
|
||||||
|
echo "Fehler beim speichern...\n(". mysql_error($con). ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<br>\ndelate UserCVS...";
|
||||||
|
$SQL2="DELETE FROM `UserCVS` WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1;";
|
||||||
|
$Erg = db_query($SQL2, "User CVS delete");
|
||||||
|
if ($Erg == 1) {
|
||||||
|
echo "Änderung wurde gesichert...\n";
|
||||||
|
} else {
|
||||||
|
echo "Fehler beim speichern...\n(". mysql_error($con). ")";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
Loading…
Reference in New Issue