diff options
author | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2006-04-17 14:09:30 +0000 |
---|---|---|
committer | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2006-04-17 14:09:30 +0000 |
commit | 3fd2457cf50196c0ef787b763a6accd9fd337492 (patch) | |
tree | d2dd2ea0ffb648bbd08e4051ab62a36c793c40b5 | |
parent | 7343b39173c61c0a264bbd50a5674d9b63df396b (diff) |
changes logging
git-svn-id: svn://svn.cccv.de/engel-system@121 29ba0400-6e00-0410-a75a-ca02368028f8
-rwxr-xr-x | www-ssl/admin/aktiv.php | 2 | ||||
-rw-r--r-- | www-ssl/inc/funktion_db.php | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/www-ssl/admin/aktiv.php b/www-ssl/admin/aktiv.php index e0ddf3a4..ef63a3a9 100755 --- a/www-ssl/admin/aktiv.php +++ b/www-ssl/admin/aktiv.php @@ -28,7 +28,7 @@ echo "</form>\n"; if( Isset($_POST["ResetActive"]) ) { $SQLreset = "UPDATE `User` SET `Aktiv` = '0'"; - $ErgReset = mysql_query($SQLreset, $con); + $ErgReset = db_query($SQLreset, "Reset Active"); if ($ErgReset != 1) echo "Fehler beim zuruecksetzen der Activ\n"; else diff --git a/www-ssl/inc/funktion_db.php b/www-ssl/inc/funktion_db.php index e0e5d98e..06decc47 100644 --- a/www-ssl/inc/funktion_db.php +++ b/www-ssl/inc/funktion_db.php @@ -5,7 +5,8 @@ if( !function_exists("db_query")) function Ausgabe_Daten($SQL) { global $con; - + + $Erg = mysql_query($SQL, $con); echo mysql_error($con); @@ -46,7 +47,7 @@ if( !function_exists("db_query")) $Where = substr( $SQL, $Where_Start); // sicherheitsprüfung !!!! - if( $Where_Start == 0) die("<h1>DIE: kein WHERE im SQL ausdruck gefunden</h1>"); + if( $Where_Start == 0) $Where = ";"; //Daten auslesen $Diff .= Ausgabe_Daten( "SELECT * FROM $Table $Where"); @@ -77,6 +78,9 @@ if( !function_exists("db_query")) $querry_erg = mysql_query($SQL, $con); } + //abschneiden wenn zu lang + if( strlen( $Diff) > 5120) $Diff = "too mutch (len ". strlen( $Diff). ")"; + //LOG commands in DB $SQL_SEC = "INSERT INTO `ChangeLog` ( `UID` , `SQLCommad` , `Commend` ) ". " VALUES ( ". @@ -85,9 +89,9 @@ if( !function_exists("db_query")) "Diff:<br>$Diff', ". "'". htmlentities( $comment, ENT_QUOTES). "' );"; $erg = mysql_query($SQL_SEC, $con); +echo "##$erg"; echo mysql_error($con); - - +echo "##"; return $querry_erg; }//function db_query( } |