add more logging functions

This commit is contained in:
Angelo Cuccato 2010-02-02 23:00:15 +01:00
parent 2e6deee575
commit 18060e60cc
3 changed files with 27 additions and 6 deletions

View File

@ -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 "&Auml;nderung wurde gesichert...<br>";
else

View File

@ -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. "]";

View File

@ -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++)
{