summaryrefslogtreecommitdiff
path: root/www-ssl/admin
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-27 21:20:10 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-27 21:20:10 +0000
commit6590196f7bfe3558ab5764de782cb49ce939fae5 (patch)
treec145fd7d72d09a4f669b8c372d563d359917d305 /www-ssl/admin
parent7842bc18a5ed7c09d0a86c4d40edc14aba57d31d (diff)
nachfrage beim loeschen, Setzen fuer alle user
git-svn-id: svn://svn.cccv.de/engel-system@176 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/admin')
-rwxr-xr-xwww-ssl/admin/userDefaultSetting.php41
1 files changed, 30 insertions, 11 deletions
diff --git a/www-ssl/admin/userDefaultSetting.php b/www-ssl/admin/userDefaultSetting.php
index 7dddde96..5ab7e653 100755
--- a/www-ssl/admin/userDefaultSetting.php
+++ b/www-ssl/admin/userDefaultSetting.php
@@ -8,6 +8,10 @@ include ("./inc/funktion_db_list.php");
echo "Hallo ".$_SESSION['Nick'].
",<br>\nhier hast du die M&ouml;glichkeit, die Defaulteinstellungen f&uuml;r neue User einzustellen:<br><br>\n";
+echo "<table border=\"0\" class=\"border\">\n";
+echo "\t<tr class=\"contenttopic\">\n";
+echo "\t\t<th>Page</th>\n\t\t<th>Show</th>\n\t\t<th></th>\n";
+echo "\t</tr>\n";
if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
{
@@ -16,27 +20,44 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
case "New":
$SQL = "ALTER TABLE `UserCVS` ADD `". $_GET["Field"]. "` ".
"CHAR( 1 ) DEFAULT '". $_GET["Default"]. "' NOT NULL";
- $erg = mysql_query( $SQL, $con);
- if( $erg == 1)
+ $Erg = mysql_query( $SQL, $con);
+ if( $Erg == 1)
echo "<H2>Create ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull</h2>\n";
else
echo "<H2>Create ".$_GET["Field"]. " = ". $_GET["Default"]. " error...</h2>\n".
"[". mysql_error(). "]<br><br>";
break;
case "Del":
+ echo "\t<tr class=\"content\">\n";
+ echo "\t\t<form action=\"userDefaultSetting.php\">\n";
+ echo "\t\t\t<td><input name=\"Field\" type=\"text\" value=\"". $_GET["Field"]. "\" readonly></td>\n";
+ echo "\t\t\t<td><input name=\"Default\" type=\"text\" value=\"". $_GET["Default"]. "\" readonly></td>\n";
+ echo "\t\t\t<td><input type=\"submit\" name=\"Send\" value=\"Del sure\"></td>\n";
+ echo "\t\t</form>\n";
+ echo "\t</tr>\n";
+ break;
+ case "Del sure":
$SQL = "ALTER TABLE `UserCVS` DROP `". $_GET["Field"]. "` ";
- $erg = mysql_query( $SQL, $con);
- if( $erg == 1)
+ $Erg = mysql_query( $SQL, $con);
+ if( $Erg == 1)
echo "<H2>Delete ".$_GET["Field"]. " succesfull</h2>\n";
else
echo "<H2>Delete ".$_GET["Field"]. " error...</h2>\n".
"[". mysql_error(). "]<br><br>";
break;
+ case "SetForAllUser":
+ $SQL = "UPDATE `UserCVS` SET `". $_GET["Field"]. "` = '". $_GET["Default"]. "'";
+ $Erg = mysql_query( $SQL, $con);
+ if( $Erg == 1)
+ echo "<H2>UPDATE ".$_GET["Field"]. " = ". $_GET["Default"]. " for all Users succesfull</h2>\n";
+ else
+ echo "<H2>UPDATE ".$_GET["Field"]. " = ". $_GET["Default"]. " for all Users error...</h2>\n".
+ "[". mysql_error(). "]<br><br>";
case "Save":
$SQL = "ALTER TABLE `UserCVS` CHANGE `". $_GET["Field"]. "` ".
"`". $_GET["Field"]. "` CHAR( 1 ) NOT NULL DEFAULT '". $_GET["Default"]. "'";
- $erg = mysql_query( $SQL, $con);
- if( $erg == 1)
+ $Erg = mysql_query( $SQL, $con);
+ if( $Erg == 1)
echo "<H2>Write ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull</h2>\n";
else
echo "<H2>Write ".$_GET["Field"]. " = ". $_GET["Default"]. " error...</h2>\n".
@@ -45,13 +66,10 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
} //SWITCH
} //IF(
+
$erg = mysql_query("SHOW COLUMNS FROM `UserCVS`");
echo mysql_error();
-echo "<table border=\"0\" class=\"border\">\n";
-echo "\t<tr class=\"contenttopic\">\n";
-echo "\t\t<th>Page</th>\n\t\t<th>Show</th>\n\t\t<th></th>\n";
-echo "\t</tr>\n";
for( $i=1; $i<mysql_num_rows($erg); $i++)
{
echo "\t<tr class=\"content\">\n";
@@ -67,7 +85,8 @@ for( $i=1; $i<mysql_num_rows($erg); $i++)
"\t\t\t <input type=\"radio\" name=\"Default\" value=\"N\" checked>N";
echo "</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\"></td>\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";
echo "\t\t</form>\n";
echo "\t</tr>\n";
}