<?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);
}

?>