2011-06-01 12:13:39 +02:00
|
|
|
|
<?php
|
2011-06-01 15:02:00 +02:00
|
|
|
|
require_once ('../bootstrap.php');
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
|
|
|
|
$title = "User-Liste";
|
|
|
|
|
$header = "Editieren der Engelliste";
|
2011-06-01 15:02:00 +02:00
|
|
|
|
include ("includes/header.php");
|
|
|
|
|
include ("includes/funktion_db_list.php");
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
if (IsSet ($_GET["enterUID"])) {
|
|
|
|
|
// UserID wurde mit uebergeben --> Aendern...
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
echo "Hallo,<br />" .
|
|
|
|
|
"hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' " .
|
|
|
|
|
"wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, " .
|
|
|
|
|
"dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. " .
|
|
|
|
|
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel " .
|
|
|
|
|
"bereits sein T-Shirt erhalten hat.<br /><br />\n";
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE `UID`='" . $_GET["enterUID"] . "'";
|
|
|
|
|
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
if (mysql_num_rows($Erg_CVS) != 1)
|
|
|
|
|
echo "Sorry, der Engel (UID=" . $_GET["enterUID"] . ") wurde in der Liste nicht gefunden.";
|
|
|
|
|
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);
|
2010-01-27 00:06:22 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
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>";
|
|
|
|
|
}
|
2010-01-27 00:06:22 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
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";
|
2010-01-27 00:06:22 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
$CVS_Data = mysql_fetch_array($Erg_CVS);
|
|
|
|
|
$CVS_Data_i = 1;
|
|
|
|
|
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value) {
|
|
|
|
|
$CVS_Data_i++;
|
|
|
|
|
//nur jeder zweiter sonst wird f<>r jeden text noch die position (Zahl) ausgegeben
|
|
|
|
|
if ($CVS_Data_i % 2 && $CVS_Data_Name != "UID") {
|
|
|
|
|
if ($CVS_Data_Name == "GroupID") {
|
|
|
|
|
if ($_GET["enterUID"] > 0) {
|
|
|
|
|
echo "<tr><td><b>Group</b></td>\n" .
|
|
|
|
|
"<td><select name=\"GroupID\">";
|
2010-01-27 00:06:22 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
$SQL_Group = "SELECT * FROM `UserGroups`";
|
|
|
|
|
$Erg_Group = mysql_query($SQL_Group, $con);
|
|
|
|
|
for ($n = 0; $n < mysql_num_rows($Erg_Group); $n++) {
|
|
|
|
|
$UID = mysql_result($Erg_Group, $n, "UID");
|
|
|
|
|
echo "\t<option value=\"$UID\"";
|
|
|
|
|
if ($CVS_Data_Value == $UID)
|
|
|
|
|
echo " selected";
|
|
|
|
|
echo ">" . mysql_result($Erg_Group, $n, "Name") . "</option>\n";
|
|
|
|
|
}
|
|
|
|
|
echo "</select></td></tr>";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
echo "<tr><td>$CVS_Data_Name</td>\n<td>";
|
|
|
|
|
echo "<input type=\"radio\" name=\"" . ($CVS_Data_i -1) . "\" value=\"Y\" ";
|
|
|
|
|
if ($CVS_Data_Value == "Y")
|
|
|
|
|
echo " checked";
|
|
|
|
|
echo ">allow \n";
|
|
|
|
|
echo "<input type=\"radio\" name=\"" . ($CVS_Data_i -1) . "\" value=\"N\" ";
|
|
|
|
|
if ($CVS_Data_Value == "N")
|
|
|
|
|
echo " checked";
|
|
|
|
|
echo ">denied \n";
|
|
|
|
|
if ($_GET["enterUID"] > 0) {
|
|
|
|
|
echo "<input type=\"radio\" name=\"" . ($CVS_Data_i -1) . "\" value=\"G\" ";
|
|
|
|
|
if ($CVS_Data_Value == "G")
|
|
|
|
|
echo " checked";
|
|
|
|
|
echo ">group-setting \n";
|
|
|
|
|
echo "</td></tr>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} //IF
|
|
|
|
|
} //Foreach
|
|
|
|
|
echo "</td></tr>\n";
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
// Ende Formular
|
|
|
|
|
echo "</td></tr>\n";
|
|
|
|
|
echo "</table>\n<br />\n";
|
|
|
|
|
echo "<input type=\"hidden\" name=\"enterUID\" value=\"" . $_GET["enterUID"] . "\">\n";
|
|
|
|
|
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
|
|
|
|
echo "</form>";
|
2010-01-19 23:48:43 +01:00
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
echo "<br /><form action=\"./userSaveSecure.php?action=delete\" method=\"POST\">\n";
|
|
|
|
|
echo "<input type=\"hidden\" name=\"enterUID\" value=\"" . $_GET["enterUID"] . "\">\n";
|
|
|
|
|
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
|
|
|
|
echo "</form>";
|
|
|
|
|
}
|
2010-01-19 23:48:43 +01:00
|
|
|
|
}
|
|
|
|
|
|
2011-06-01 15:02:00 +02:00
|
|
|
|
include ("includes/footer.php");
|
2010-01-19 23:48:43 +01:00
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|