ajout fermeture de la database
This commit is contained in:
@ -10,8 +10,10 @@ require_once 'fonctions.inc.php';
|
||||
// $level => INFO, ALERT, ERROR
|
||||
function log_write($log, $level=INFO)
|
||||
{
|
||||
global $table_prefix, $webmaster, $db;
|
||||
global $table_prefix, $webmaster;
|
||||
// actual connected user or user 'script'
|
||||
$db = new db();
|
||||
|
||||
$user = (!empty( $_SERVER["PHP_AUTH_USER"])?$_SERVER["PHP_AUTH_USER"]:'Intruder?!');
|
||||
|
||||
//mail message
|
||||
@ -54,6 +56,7 @@ function log_write($log, $level=INFO)
|
||||
{
|
||||
mail( $webmaster, "Erreur Site Web", $log_mail );
|
||||
}
|
||||
$db->close();
|
||||
}
|
||||
|
||||
// $w_db = true -> write log in database (default)
|
||||
|
Reference in New Issue
Block a user