query("SELECT name FROM hlstats_Games WHERE code='$game'"); if ($db->num_rows() < 1) { error("No such game '$game'."); } list($gamename) = $db->fetch_row(); $db->free_result(); pageHeader(array($gamename), array($gamename => '')); include (PAGE_PATH . '/voicecomm_serverlist.php'); $query = " SELECT count(*) FROM hlstats_Players WHERE game='$game' "; $result = $db->query($query); list($total_players) = $db->fetch_row($result); $query = " SELECT players FROM hlstats_Trend WHERE game='$game' AND timestamp<=" . (time() - 86400) . " ORDER BY timestamp DESC LIMIT 0,1 "; $result = $db->query($query); list($total_players_24h) = $db->fetch_row($result); $players_last_day = -1; if ($total_players_24h > 0) { $players_last_day = $total_players - $total_players_24h; } $query = " SELECT SUM(kills), SUM(headshots), count(serverId) FROM hlstats_Servers WHERE game='$game' "; $result = $db->query($query); list($total_kills, $total_headshots, $total_servers) = $db->fetch_row($result); $query = " SELECT kills FROM hlstats_Trend WHERE game='$game' AND timestamp<=" . (time() - 86400) . " ORDER BY timestamp DESC LIMIT 0,1 "; $result = $db->query($query); list($total_kills_24h) = $db->fetch_row($result); $db->free_result(); $kills_last_day = -1; if ($total_kills_24h > 0) { $kills_last_day = $total_kills - $total_kills_24h; } $query = " SELECT serverId, name, IF(publicaddress != '', publicaddress, concat(address, ':', port) ) AS addr, kills, headshots, act_players, max_players, act_map, map_started, map_ct_wins, map_ts_wins FROM hlstats_Servers WHERE game='$game' ORDER BY sortorder, name, serverId "; $db->query($query); $servers = $db->fetch_row_set(); $db->free_result(); ?>
0) $hpk = sprintf("%.2f", ($total_headshots / $total_kills) * 100); else $hpk = sprintf("%.2f", 0); if ($players_last_day > -1) echo "Tracking " . number_format($total_players) . " players (+" . number_format($players_last_day) . " new players last 24h) with " . number_format($total_kills) . " kills (+" . number_format($kills_last_day) . " last 24h) and " . number_format($total_headshots) . " headshots ($hpk%) on " . number_format($total_servers) . " servers"; else echo "Tracking " . number_format($total_players) . " players with " . number_format($total_kills) . " kills and " . number_format($total_headshots) . " headshots ($hpk%) on " . number_format($total_servers) . " servers"; ?>
'; if ($g_options['slider'] == 1) { ?> '; if ($g_options['show_google_map'] == 1) { ?> '; } if (($g_options['show_google_map'] == 0) && ($g_options['show_server_load_image'] == 0)) { echo '
'; } if ($g_options['slider'] == 0 || ($g_options['slider'] == 1 && count($servers) == 1)) { $i=0; for ($i=0; $i
0) $hpk = sprintf("%.2f", ($total_headshots / $total_kills) * 100); else $hpk = sprintf("%.2f", 0); if ($players_last_day > -1) echo "Tracking " . number_format($total_players) . " players (+" . number_format($players_last_day) . " new players last 24h) with " . number_format($total_kills) . " kills (+" . number_format($kills_last_day) . " last 24h) and " . number_format($total_headshots) . " headshots ($hpk%) on " . number_format($total_servers) . " servers"; else echo "Tracking " . number_format($total_players) . " players with " . number_format($total_kills) . " kills and " . number_format($total_headshots) . " headshots ($hpk%) on " . number_format($total_servers) . " servers"; ?>
 Server  Address  Map  Played  Players  Kills  Headshots  HS:K
 "; echo '' . $rowdata['name'] . ''; ?> Join)"; ?> 0) echo sprintf("%.2f", ($headshots / $kills)); else echo sprintf("%.2f", 0); ?>
"24h View", 2=>"Last Week", 3=>"Last Month", 4=>"Last Year"); foreach($range_arr as $range_code => $range_name) { print(''); print(''); print('
 '.$range_name.'
'); print(''.$range_name.''); print('


'); } ?>
Server Load Graph
 Server  Address  Map  Played  Players  Kills  Headshots  HS:K
 "; echo "" . htmlspecialchars($rowdata['name']) . ""; ?> (Join)"; ?> 0) echo sprintf('%.4f', ($headshots / $kills)); else echo sprintf('%.4f', 0); ?>
Server Load Graph
query(" SELECT hlstats_Awards.awardId, hlstats_Awards.name, hlstats_Awards.verb, hlstats_Awards.d_winner_id, hlstats_Awards.d_winner_count, hlstats_Players.lastName AS d_winner_name, hlstats_Players.flag AS flag, hlstats_Players.country AS country FROM hlstats_Awards LEFT JOIN hlstats_Players ON hlstats_Players.playerId = hlstats_Awards.d_winner_id WHERE hlstats_Awards.game='$game' ORDER BY hlstats_Awards.name "); $result = $db->query(" SELECT IFNULL(value, 1) FROM hlstats_Options WHERE keyname='awards_numdays' "); if ($db->num_rows($result) == 1) list($awards_numdays) = $db->fetch_row($result); else $awards_numdays = 1; $result = $db->query(" SELECT DATE_FORMAT(value, '%W %e %b'), DATE_FORMAT( DATE_SUB( value, INTERVAL $awards_numdays DAY ) , '%W %e %b' ) FROM hlstats_Options WHERE keyname='awards_d_date' "); list($awards_d_date, $awards_s_date) = $db->fetch_row($result); if ($db->num_rows($resultAwards) > 0 && $awards_d_date) { ?>
fetch_array($resultAwards)) { $colour = ($c % 2) + 1; $c++; ?>
".htmlspecialchars($awarddata['name']).''; ?> " . htmlspecialchars($awarddata['d_winner_name'], ENT_COMPAT) . " ({$awarddata['d_winner_count']} " . htmlspecialchars($awarddata['verb']) . ")"; } else { echo "\"Player\"" . htmlspecialchars($awarddata['d_winner_name'], ENT_COMPAT) . " ({$awarddata['d_winner_count']} ". htmlspecialchars($awarddata['verb']) . ")"; } } else { echo '   No Award Winner'; } ?>