query
("
SELECT
hlstats_Games.name
FROM
hlstats_Games
WHERE
hlstats_Games.code = '$game'
");
if ($db->num_rows() < 1) error("No such game '$game'.");
list($gamename) = $db->fetch_row();
$db->free_result();
pageHeader
(
array ($gamename, 'Server Chat Statistics'),
array ($gamename=>"%s?game=$game", 'Server Chat Statistics'=>'')
);
flush();
$servername = "(All Servers)";
if ($showserver != 0)
{
$result=$db->fetch_array
(
$db->query
("
SELECT
hlstats_Servers.name
FROM
hlstats_Servers
WHERE
hlstats_Servers.serverId = ".$db->escape($showserver)."
")
);
$servername = "(" . $result['name'] . ")";
}
?>
escape($filter) . "' in BOOLEAN MODE)";
}
$surl = $g_options['scripturl'];
$result = $db->query
("
SELECT SQL_NO_CACHE
hlstats_Events_Chat.eventTime,
unhex(replace(hex(hlstats_Players.lastName), 'E280AE', '')) as lastName,
IF(hlstats_Events_Chat.message_mode=2, CONCAT('(Team) ', hlstats_Events_Chat.message), IF(hlstats_Events_Chat.message_mode=3, CONCAT('(Squad) ', hlstats_Events_Chat.message), hlstats_Events_Chat.message)) AS message,
hlstats_Servers.name AS serverName,
hlstats_Events_Chat.playerId,
hlstats_Players.flag,
hlstats_Events_Chat.map
FROM
hlstats_Events_Chat
INNER JOIN
hlstats_Players
ON
hlstats_Players.playerId = hlstats_Events_Chat.playerId
INNER JOIN
hlstats_Servers
ON
hlstats_Servers.serverId = hlstats_Events_Chat.serverId
WHERE
$whereclause $whereclause2
ORDER BY
hlstats_Events_Chat.id $table->sortorder
LIMIT
$table->startitem,
$table->numperpage;
", true, false);
/*
$whereclause = "hlstats_Events_Chat.serverId ";
if($showserver == 0) {
$whereclause .= "in (".implode($serverids,',').")";
} else {
$whereclause .= "= $showserver";
}
*/
$db->query
("
SELECT
count(*)
FROM
hlstats_Events_Chat
INNER JOIN
hlstats_Players
ON
hlstats_Players.playerId = hlstats_Events_Chat.playerId
INNER JOIN
hlstats_Servers
ON
hlstats_Servers.serverId = hlstats_Events_Chat.serverId
WHERE
$whereclause $whereclause2
");
if ($db->num_rows() < 1) $numitems = 0;
else
{
list($numitems) = $db->fetch_row();
}
$db->free_result();
$table->draw($result, $numitems, 95);
?>