Uztaisi takš EventLogu
vai ņem manējo...
class EventLog extends DatabaseAccessor {
function EventLog() {
$this->init();
}
function init() {
parent :: init();
$GLOBALS['EVENTLOG'] = & $this;
}
/* Static */
function log($moduleName, $moduleAction, $descr) {
$eventLog = & $GLOBALS['EVENTLOG'];
$eventLog->logEx($moduleName, $moduleAction, $descr);
}
/* Non-Static */
function logEx($moduleName, $moduleAction, $descr) {
//$userId = $_SESSION['USER']->id;
$time = date('H:i:s');
$date = date('Y-m-d');
$sql = "INSERT INTO EventLog(Module,Action,Descr,TransDate,TransTime)
VALUES ( '$moduleName', '$moduleAction', '$descr', '{$date}','{$time}' )";
$this->dbio->query($sql);
}
} // end class