userdata["acclevel"] < 80) die ("Access denied!"); ?>      title; ?> (Last Days)

query("DROP TABLE IF EXISTS hlstats_AdminEventHistory"); $db->query(" CREATE TEMPORARY TABLE hlstats_AdminEventHistory ( eventType VARCHAR(64) NOT NULL, eventTime DATETIME NOT NULL, eventDesc VARCHAR(255) NOT NULL, serverName VARCHAR(255) NOT NULL, map VARCHAR(64) NOT NULL ) DEFAULT CHARSET=utf8 "); function insertEvents ($table, $select) { global $db; $select = str_replace("", "hlstats_Events_$table", $select); $db->query(" INSERT INTO hlstats_AdminEventHistory ( eventType, eventTime, eventDesc, serverName, map ) $select "); } insertEvents("Rcon", " SELECT CONCAT(
.type, ' Rcon'),
.eventTime, CONCAT('\"', command, '\"\nFrom: %A%".$g_options['scripturl']."?mode=search&q=', remoteIp, '&st=ip&game=%', remoteIp, '%/A%', IF(password<>'',CONCAT(', password: \"', password, '\"'),'')), IFNULL(hlstats_Servers.name, 'Unknown'),
.map FROM
LEFT JOIN hlstats_Servers ON hlstats_Servers.serverId =
.serverId "); insertEvents("Admin", " SELECT
.type,
.eventTime, IF(playerName != '', CONCAT('\"', playerName, '\": ', message), message ), IFNULL(hlstats_Servers.name, 'Unknown'),
.map FROM
LEFT JOIN hlstats_Servers ON hlstats_Servers.serverId =
.serverId "); if (isset($_GET['type']) && $_GET['type'] != '') { $where = "WHERE eventType='".$db->escape($_GET['type'])."'"; } else { $where = ""; } $result = $db->query(" SELECT eventTime, eventType, eventDesc, serverName, map FROM hlstats_AdminEventHistory $where ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder LIMIT $table->startitem,$table->numperpage "); $resultCount = $db->query(" SELECT COUNT(*) FROM hlstats_AdminEventHistory $where "); list($numitems) = $db->fetch_row($resultCount); ?> "> Show only events of type: query(" SELECT DISTINCT eventType FROM hlstats_AdminEventHistory ORDER BY eventType ASC "); $types[""] = "(All)"; while (list($k) = $db->fetch_row($resultTypes)) { $types[$k] = $k; } echo getSelect("type", $types, $type); ?>

draw($result, $numitems, 95, "center"); ?>