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

« back to all changes in this revision

Viewing changes to IlohaMail/include/log.FS.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.FS.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
                Add log entry into log file.
 
12
        PRE-CONDITIONS:
 
13
                $log_time : date & time
 
14
                $log_timestamp : unix timestamp
 
15
                $log_ip : client IP address
 
16
                $log_account : User's account (user name @ host)
 
17
                $log_comment : error message or other comment
 
18
 
 
19
********************************************************/
 
20
 
 
21
$log_entry = $log_template;
 
22
$log_entry = str_replace("date", $log_time, $log_entry);
 
23
$log_entry = str_replace("acct", $log_account, $log_entry);
 
24
$log_entry = str_replace("ip", $log_ip, $log_entry);
 
25
$log_entry = str_replace("action", $log_action, $log_entry);
 
26
$log_entry = str_replace("comment", $log_comment, $log_entry);
 
27
 
 
28
$fp = fopen($log_file, "a");
 
29
if ($fp){
 
30
        fputs($fp, $log_entry."\n");
 
31
        fclose($fp);
 
32
}
 
33
 
 
34
?>
 
 
b'\\ No newline at end of file'