~ubuntu-branches/ubuntu/maverick/ilohamail/maverick

« back to all changes in this revision

Viewing changes to IlohaMail/include/log.inc

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-02-04 13:44:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040204134437-kz8j3ui2qa7oq8z2
Tags: upstream-0.8.12
ImportĀ upstreamĀ versionĀ 0.8.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/********************************************************
 
3
        include/log.inc
 
4
        
 
5
        (C)Copyright 2001-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
 
6
 
 
7
        This file is part of IlohaMail, and released under GPL.
 
8
        See COPYING, or http://www.fsf.org/copyleft/gpl.html
 
9
        
 
10
        PURPOSE:
 
11
                Shell for log.backend.inc
 
12
 
 
13
********************************************************/
 
14
 
 
15
include_once("../conf/conf.inc");
 
16
 
 
17
if ($log_active){
 
18
        if (empty($log_backend))
 
19
                $log_backend = $backend;
 
20
        if ($log_backend != "FS"){
 
21
                include_once("../conf/db_conf.php");
 
22
                if ((!isset($DB_LOG_TABLE)) || (empty($DB_LOG_TABLE))) $log_backend = "FS";
 
23
                else $log_backend = "DB";
 
24
        }
 
25
        if (($log_backend =="FS")&&(empty($log_file))) $log_backend ="";
 
26
        
 
27
        $log_comment = str_replace("<br>", "", $log_comment);
 
28
        $log_comment = str_replace("\n", "", $log_comment);
 
29
 
 
30
        if (!empty($log_backend)){
 
31
                if (!empty($log_action)){
 
32
                        $log_time = date("M d Y H:i:s", time());
 
33
                        $log_timestamp = time();
 
34
                        $log_ip = $_SERVER["REMOTE_ADDR"];
 
35
                        $log_account = $user_name."@".$host;
 
36
                        $log_comment = $log_comment.$error;
 
37
 
 
38
                        include("../include/log.".$log_backend.".inc");
 
39
                }
 
40
        }
 
41
}
 
42
?>
 
 
b'\\ No newline at end of file'