diff options
Diffstat (limited to 'www-ssl')
-rwxr-xr-x | www-ssl/admin/room.php | 2 | ||||
-rwxr-xr-x | www-ssl/admin/shiftadd.php | 2 | ||||
-rwxr-xr-x | www-ssl/admin/userDefaultSetting.php | 29 |
3 files changed, 27 insertions, 6 deletions
diff --git a/www-ssl/admin/room.php b/www-ssl/admin/room.php index 50171986..151d9bca 100755 --- a/www-ssl/admin/room.php +++ b/www-ssl/admin/room.php @@ -183,7 +183,7 @@ case 'delete': if (IsSet($SQL)){ // echo $SQL; // hier muesste das SQL ausgefuehrt werden... - $Erg = mysql_query($SQL, $con); + $Erg = db_query($SQL, "exec SQL"); if ($Erg == 1) echo "Änderung wurde gesichert...<br>"; else diff --git a/www-ssl/admin/shiftadd.php b/www-ssl/admin/shiftadd.php index c0230748..70391041 100755 --- a/www-ssl/admin/shiftadd.php +++ b/www-ssl/admin/shiftadd.php @@ -291,7 +291,7 @@ function CreateNewEntry() $SQL .= "'". $_DateS. "', '". $_DateE. "', "; $SQL .= "'". $_GET["len"]. "', '". $_GET["RID"]. "', "; $SQL .= "'". $_GET["SchichtName"]. "');"; - $Erg = mysql_query($SQL, $con); + $Erg = db_query($SQL, "create shift"); $SQLFail = "\n\t<br>[".$SQL. "]"; diff --git a/www-ssl/admin/userDefaultSetting.php b/www-ssl/admin/userDefaultSetting.php index 09c62a15..84d880ad 100755 --- a/www-ssl/admin/userDefaultSetting.php +++ b/www-ssl/admin/userDefaultSetting.php @@ -20,7 +20,7 @@ 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); + $Erg = db_query( $SQL, "New user default setting"); if( $Erg == 1) echo "<H2>Create ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull</h2>\n"; else @@ -38,7 +38,7 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"])) break; case "Del sure": $SQL = "ALTER TABLE `UserCVS` DROP `". $_GET["Field"]. "` "; - $Erg = mysql_query( $SQL, $con); + $Erg = db_query( $SQL, "del user default setting"); if( $Erg == 1) echo "<H2>Delete ".$_GET["Field"]. " succesfull</h2>\n"; else @@ -47,7 +47,7 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"])) break; case "SetForAllUser": $SQL = "UPDATE `UserCVS` SET `". $_GET["Field"]. "`='". $_GET["Default"]. "' WHERE UID>0"; - $Erg = mysql_query( $SQL, $con); + $Erg = db_query( $SQL, "Set new user default setting for all user"); if( $Erg == 1) echo "<H2>UPDATE ".$_GET["Field"]. " = ". $_GET["Default"]. " for all Users succesfull</h2>\n"; else @@ -56,7 +56,7 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"])) case "Save": $SQL = "ALTER TABLE `UserCVS` CHANGE `". $_GET["Field"]. "` ". "`". $_GET["Field"]. "` CHAR( 1 ) NOT NULL DEFAULT '". $_GET["Default"]. "'"; - $Erg = mysql_query( $SQL, $con); + $Erg = db_query( $SQL, "Save user default setting"); if( $Erg == 1) echo "<H2>Write ".$_GET["Field"]. " = ". $_GET["Default"]. " succesfull</h2>\n"; else @@ -69,6 +69,27 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"])) $erg = mysql_query("SHOW COLUMNS FROM `UserCVS`"); echo mysql_error(); +echo "\t<tr class=\"content\">\n"; +echo "\t\t<form action=\"userDefaultSetting.php\">\n"; +echo "\t\t\t<input name=\"Field\" type=\"hidden\" value=\GroupID\">\n"; +echo "\t\t\t<td>Group</td>\n"; +echo "\t\t\t<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( mysql_result( $erg, 1, "Default") == $UID) + echo " selected"; + echo ">". mysql_result($Erg_Group, $n, "Name"). "</option>\n"; +} +echo "</select></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=\"SetForAllUser\"></td>\n"; +echo "\t\t</form>\n"; +echo "\t</tr>\n"; for( $i=2; $i<mysql_num_rows($erg); $i++) { |