2 require_once("{$GLOBALS['srcdir']}/sql.inc");
4 function newEvent($event,$user, $groupname, $comments="")
6 $adodb = $GLOBALS['adodb']['db'];
7 if($event == ("login" || "logout" || "backup" || "view" || "auth" || "upload"))
9 $sql = "insert into log (date, event, user, groupname, comments) values (NOW(), " . $adodb->qstr($event) . "," . $adodb->qstr($user) . "," . $adodb->qstr($groupname) . "," .$adodb->qstr($comments) . ")";
10 return sqlInsertClean($sql);
19 function getEventByDate($date, $cols = "*")
21 $res = sqlStatement("select $cols from log where date like '%$date%' order by date DESC");
23 for($iter=0; $row=sqlFetchArray($res); $iter++)