diff --git a/www-ssl/admin/userDefaultSetting.php b/www-ssl/admin/userDefaultSetting.php
index 995b3842..7dddde96 100755
--- a/www-ssl/admin/userDefaultSetting.php
+++ b/www-ssl/admin/userDefaultSetting.php
@@ -9,17 +9,41 @@ echo "Hallo ".$_SESSION['Nick'].
", \nhier hast du die Möglichkeit, die Defaulteinstellungen für neue User einzustellen: \n";
-if( isset( $_GET["Field"]) && isset( $_GET["Default"]))
+if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
{
- $SQL = "ALTER TABLE `UserCVS` CHANGE `". $_GET["Field"]. "` ".
- "`". $_GET["Field"]. "` CHAR( 1 ) NOT NULL DEFAULT '". $_GET["Default"]. "'";
- $erg = mysql_query( $SQL, $con);
- if( $erg == 1)
- echo "
Write ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull \n";
- else
- echo "Write ".$_GET["Field"]. " = ". $_GET["Default"]. " error... \n".
- "[". mysql_error(). "] ";
-}
+ switch( $_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)
+ echo "Create ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull \n";
+ else
+ echo "Create ".$_GET["Field"]. " = ". $_GET["Default"]. " error... \n".
+ "[". mysql_error(). "] ";
+ break;
+ case "Del":
+ $SQL = "ALTER TABLE `UserCVS` DROP `". $_GET["Field"]. "` ";
+ $erg = mysql_query( $SQL, $con);
+ if( $erg == 1)
+ echo "Delete ".$_GET["Field"]. " succesfull \n";
+ else
+ echo "Delete ".$_GET["Field"]. " error... \n".
+ "[". mysql_error(). "] ";
+ break;
+ 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)
+ echo "Write ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull \n";
+ else
+ echo "Write ".$_GET["Field"]. " = ". $_GET["Default"]. " error... \n".
+ "[". mysql_error(). "] ";
+ break;
+ } //SWITCH
+} //IF(
$erg = mysql_query("SHOW COLUMNS FROM `UserCVS`");
echo mysql_error();
@@ -36,16 +60,30 @@ for( $i=1; $i". mysql_result( $erg, $i, "Field"). "\n";
echo "\t\t\t";
if( mysql_result( $erg, $i, "Default") == "Y")
- echo " Y\t".
- "\t\t\t\t N";
+ echo " Y\n".
+ "\t\t\t N";
else
- echo " Y\t".
- "\t\t\t\t N";
+ echo " Y\n".
+ "\t\t\t N";
echo " \n";
- echo "\t\t\t \n";
+ echo "\t\t\t \n";
+ echo "\t\t\t \n";
echo "\t\t\n";
echo "\t\n";
}
+
+echo "\t\n";
+echo "\t\t\n";
+echo "\t \n";
+
+
+
echo "\n";
include ("./inc/footer.php");