Location: PHPKode > projects > @1 File Store > libs/logger.php
<?
class Logger
{
 var $table="";
 var $db;

 function Logger($mysql, $table="logger")
 {
  $this->table=$table;
  $this->db=$mysql;
 }

 function log($type, $user, $extra="")
 {
 	$type=mysql_escape_string($type);
	$user=mysql_escape_string($user);
	$extra=mysql_escape_string($extra);
	$SQL="INSERT INTO `".$this->table."` SET `log_type`='".$type."'";
	$SQL.=", `user_id`='".$user."', `extra`='".$extra."'";
	$SQL.=", `ip`='".$_SERVER["REMOTE_ADDR"]."', `time_rec`=NOW()";
	if(!$this->db->query($SQL))
	{
		exit($this->db->error);
	}
 }
}
?>
Return current item: @1 File Store