UNSTABLE do not use it !!

This commit is contained in:
sparkyx 2004-10-03 16:48:51 +00:00
parent 0f40a0e720
commit 29c0a870bc
57 changed files with 1333 additions and 986 deletions

View file

@ -20,16 +20,20 @@
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
//include_once ("postgres.php");
include_once("constant.php");
function echo_debug ($p_log) {
return;
function echo_debug ($file,$line="",$msg="") {
$password=phpcompta_password;
$l_Db="dbname=log user='phpcompta' password='$password' host=127.0.0.1";
$cn=pg_connect($l_Db);
$file=FormatString($file);
$line=FormatString($line);
$msg=FormatString($msg);
$fdebug=fopen("/tmp/debug_log","a+");
if ( $fdebug != false ) {
fwrite($fdebug,date("Ymd H:i:s").$p_log."\n");
fclose($fdebug);
}
$sql= "insert into log (lg_file,lg_line,lg_msg) ".
"values ('$file','$line','$msg');";
pg_exec($cn,$sql);
}
?>