summaryrefslogtreecommitdiff
path: root/www-ssl
diff options
context:
space:
mode:
Diffstat (limited to 'www-ssl')
-rwxr-xr-xwww-ssl/admin/user.php49
-rwxr-xr-xwww-ssl/admin/user2.php13
-rwxr-xr-xwww-ssl/admin/userDefaultSetting.php35
3 files changed, 72 insertions, 25 deletions
diff --git a/www-ssl/admin/user.php b/www-ssl/admin/user.php
index 05bc5fd6..5b6077aa 100755
--- a/www-ssl/admin/user.php
+++ b/www-ssl/admin/user.php
@@ -129,7 +129,7 @@ else
"bereits sein T-Shirt erhalten hat.<br><br>\n";
echo "<form action=\"./user2.php?action=change\" method=\"POST\">\n";
- echo "<table>\n";
+ echo "<table border=\"0\">\n";
echo "<input type=\"hidden\" name=\"Type\" value=\"". $_GET["Type"]. "\">\n";
if( $_GET["Type"] == "Normal" )
@@ -259,16 +259,43 @@ else
//nur jeder zweiter sonst wird für jeden text noch die position (Zahl) ausgegeben
if( $CVS_Data_i%2 && $CVS_Data_Name!="UID")
{
- 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";
- echo "</td></tr>";
+ if($CVS_Data_Name=="GroupID") {
+ if( $_GET["enterUID"] > 0 )
+ {
+ echo "<tr><td><b>Group</b></td>\n".
+ "<td><select name=\"GroupID\">";
+
+ $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";
diff --git a/www-ssl/admin/user2.php b/www-ssl/admin/user2.php
index b4647da5..229a4cdc 100755
--- a/www-ssl/admin/user2.php
+++ b/www-ssl/admin/user2.php
@@ -54,10 +54,17 @@ if (IsSet($_GET["action"]))
$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` = '". $_POST[$CVS_Data_i]."', ";
- $CVS_Data_i++;
+ if( ($CVS_Data_i+1)%2 && $CVS_Data_Name!="UID") {
+ if( $CVS_Data_Name == "GroupID")
+ {
+ if( $_POST["enterUID"] > 0 )
+ $SQL2.= "`$CVS_Data_Name` = ". $_POST["GroupID"].", ";
+ } else {
+ $SQL2.= "`$CVS_Data_Name` = '". $_POST[$CVS_Data_i]."', ";
+ }
}
+ $CVS_Data_i++;
+ }
$SQL2 = substr( $SQL2, 0, strlen($SQL2)-2 );
$SQL2.= " WHERE `UID`='". $_POST["enterUID"]. "' LIMIT 1;";
echo "<br>Secure-";
diff --git a/www-ssl/admin/userDefaultSetting.php b/www-ssl/admin/userDefaultSetting.php
index 3c47ebc7..09c62a15 100755
--- a/www-ssl/admin/userDefaultSetting.php
+++ b/www-ssl/admin/userDefaultSetting.php
@@ -46,7 +46,7 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
"[". mysql_error(). "]<br><br>";
break;
case "SetForAllUser":
- $SQL = "UPDATE `UserCVS` SET `". $_GET["Field"]. "`='". $_GET["Default"]. "'";
+ $SQL = "UPDATE `UserCVS` SET `". $_GET["Field"]. "`='". $_GET["Default"]. "' WHERE UID>0";
$Erg = mysql_query( $SQL, $con);
if( $Erg == 1)
echo "<H2>UPDATE ".$_GET["Field"]. " = ". $_GET["Default"]. " for all Users succesfull</h2>\n";
@@ -70,20 +70,30 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
$erg = mysql_query("SHOW COLUMNS FROM `UserCVS`");
echo mysql_error();
-for( $i=1; $i<mysql_num_rows($erg); $i++)
+for( $i=2; $i<mysql_num_rows($erg); $i++)
{
echo "\t<tr class=\"content\">\n";
echo "\t\t<form action=\"userDefaultSetting.php\">\n";
echo "\t\t\t<input name=\"Field\" type=\"hidden\" value=\"". mysql_result( $erg, $i, "Field"). "\">\n";
echo "\t\t\t<td>". mysql_result( $erg, $i, "Field"). "</td>\n";
- echo "\t\t\t<td>";
+ echo "\t\t\t<td>\n";
+
+ echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"Y\"";
if( mysql_result( $erg, $i, "Default") == "Y")
- echo "<input type=\"radio\" name=\"Default\" value=\"Y\" checked>Y\n".
- "\t\t\t <input type=\"radio\" name=\"Default\" value=\"N\">N";
- else
- echo "<input type=\"radio\" name=\"Default\" value=\"Y\">Y\n".
- "\t\t\t <input type=\"radio\" name=\"Default\" value=\"N\" checked>N";
- echo "</td>\n";
+ echo " checked";
+ echo ">allow\n";
+
+ echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"N\"";
+ if( mysql_result( $erg, $i, "Default") == "N")
+ echo " checked";
+ echo ">denied\n";
+
+ echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"G\"";
+ if( mysql_result( $erg, $i, "Default") == "G")
+ echo " checked";
+ echo ">group-setting\n";
+
+ echo "\t\t\t</td>\n";
echo "\t\t\t<td><input type=\"submit\" name=\"Send\" value=\"Save\">\n";
echo "\t\t\t <input type=\"submit\" name=\"Send\" value=\"Del\">\n";
echo "\t\t\t <input type=\"submit\" name=\"Send\" value=\"SetForAllUser\"></td>\n";
@@ -95,8 +105,11 @@ echo "\t<tr class=\"content\">\n";
echo "\t\t<form action=\"userDefaultSetting.php\">\n";
echo "\t\t\t<input name=\"New\" type=\"hidden\" value=\"New\">\n";
echo "\t\t\t<td><input name=\"Field\" type=\"text\" value=\"new\"></td>\n";
-echo "\t\t\t<td><input type=\"radio\" name=\"Default\" value=\"Y\">Y\t".
- "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"N\">N</td>\n";
+echo "\t\t\t<td>\n";
+echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"Y\">allow\n";
+echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"N\">denied\n";
+echo "\t\t\t\t<input type=\"radio\" name=\"Default\" value=\"G\" checked>group-setting\n";
+echo "\t\t\t</td>\n";
echo "\t\t\t<td><input type=\"submit\" name=\"Send\" value=\"New\"></td>\n";
echo "\t\t</form>\n";
echo "\t</tr>\n";