Jeste lepsi vychytafka trasovani templat :-)
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / log.inc
CommitLineData
51ff3226 1<?php
d4e006f9 2class logger {
51ff3226 3
8f03b4ac
H
4 public static function error_handler($errno=-1, $errstr='unknown', $errfile='/dev/null', $errline=-1, $errcontext=array('?')) {
5 return error_log("$errfile:$errline = error #$errno: $errstr");
6 }
7
fd15ea3a 8 public static function log($action,$node_id,$result,$parameter1='',$parameter2='') {
51ff3226 9
10 global $db,$node;
e23557a6 11 $user_id = isSet($_SESSION['user_id'])?$_SESSION['user_id']:"";
a2ef7f73 12 error_log('LOG: user: '.$user_id.', action: '.$action.
13 ', node_id: '.$node_id.', result: '.$result);
51ff3226 14// $db->query("insert delayed into logs set event='$action',node_id='$node_id',user_id='$user_id',result='$result',parameter1='$parameter1',parameter2='$parameter2'");
15
16 }
17
18}
This page took 0.353379 seconds and 4 git commands to generate.