summaryrefslogtreecommitdiff
path: root/utils/log.php
blob: e6f27890495d5a32a97d3875daa3460374d4def4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
}

?>