diff options
Diffstat (limited to 'utils/log.php')
-rw-r--r-- | utils/log.php | 15 |
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 |