summaryrefslogtreecommitdiff
path: root/utils/log.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-04 10:38:03 +0000
committerdeva <deva>2008-10-04 10:38:03 +0000
commitcce5e7710295021b41d9aaecc503a60fb99256be (patch)
tree660235be91fb821e976c7ae62347eb368ce87524 /utils/log.php
Initial revision
Diffstat (limited to 'utils/log.php')
-rw-r--r--utils/log.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/log.php b/utils/log.php
new file mode 100644
index 0000000..e6f2789
--- /dev/null
+++ b/utils/log.php
@@ -0,0 +1,15 @@
+<?php
+
+function _log($action, $username)
+{
+ global $DATA_DIR;
+
+ $ip = $_SERVER['REMOTE_ADDR'];
+ $time = date("D M jS Y G:i", time());
+
+ $fp = fopen($DATA_DIR . "/admin.log", "a");
+ fprintf($fp, "%s - %s: User %s from %s\n", $time, $action, $username, $ip);
+ fclose($fp);
+}
+
+?> \ No newline at end of file