Statistics Summary
Clan:
Home Page:
Activity: 40) $bar_type = "6"; elseif ($clandata['activity'] > 30) $bar_type = "5"; elseif ($clandata['activity'] > 20) $bar_type = "4"; elseif ($clandata['activity'] > 10) $bar_type = "3"; elseif ($clandata['activity'] > 5) $bar_type = "2"; echo "\"".$clandata['activity']."%\""; ?>
Members:
Avg. Member Points:
Total Kills:
Total Deaths:
Avg. Kills:
Kills per Death: %0.2f', $clandata['kills'] / $clandata['deaths']); } else { echo '-'; } ?>
Kills per Minute: 0) { echo sprintf("%.2f", ($clandata['kills'] / ($clandata['connection_time'] / 60))); } else { echo '-'; } ?>
Total Connection Time:
Avg. Connection Time: 0) { echo timestamp_to_str($clandata['connection_time'] / ($clandata['nummembers'])); } else { echo '-'; } ?>
Favorite Server:* query(" SELECT hlstats_Events_Entries.serverId, hlstats_Servers.name, COUNT(hlstats_Events_Entries.serverId) AS cnt FROM hlstats_Events_Entries INNER JOIN hlstats_Servers ON hlstats_Servers.serverId=hlstats_Events_Entries.serverId INNER JOIN hlstats_Players ON (hlstats_Events_Entries.playerId=hlstats_Players.playerId) WHERE clan=$clan GROUP BY hlstats_Events_Entries.serverId ORDER BY cnt DESC LIMIT 1 "); list($favServerId,$favServerName) = $db->fetch_row(); echo " $favServerName "; ?>
Favorite Map:* query(" SELECT hlstats_Events_Entries.map, COUNT(map) AS cnt FROM hlstats_Events_Entries INNER JOIN hlstats_Players ON (hlstats_Events_Entries.playerId=hlstats_Players.playerId) WHERE clan=$clan GROUP BY hlstats_Events_Entries.map ORDER BY cnt DESC LIMIT 1 "); list($favMap) = $db->fetch_row(); echo " $favMap "; ?>
Favorite Weapon:* query(" SELECT hlstats_Events_Frags.weapon, hlstats_Weapons.name, COUNT(hlstats_Events_Frags.weapon) AS kills, SUM(hlstats_Events_Frags.headshot=1) as headshots FROM hlstats_Events_Frags INNER JOIN hlstats_Weapons ON hlstats_Weapons.code = hlstats_Events_Frags.weapon INNER JOIN hlstats_Players ON hlstats_Events_Frags.killerId=hlstats_Players.playerId WHERE clan=$clan AND hlstats_Weapons.game='$game' GROUP BY hlstats_Events_Frags.weapon ORDER BY kills desc, headshots desc LIMIT 1 "); while ($rowdata = $db->fetch_row($result)) { $fav_weapon = $rowdata[0]; $weap_name = htmlspecialchars($rowdata[1]); } if ($fav_weapon == '') $fav_weapon = 'Unknown'; $image = getImage("/games/$game/weapons/$fav_weapon"); // check if image exists $weaponlink = ""; $cellbody = "$weaponlink\"$weap_name\""; if ($image) { } else { $cellbody = "$weaponlink $weaponlink$weap_name"; } $cellbody .= ""; echo $cellbody; ?>
Player Locations

query(" SELECT hlstats_Players.playerId, hlstats_Players.lastName, hlstats_Players.country, hlstats_Players.flag, hlstats_Players.skill, hlstats_Players.connection_time, hlstats_Players.kills, hlstats_Players.deaths, ROUND(hlstats_Players.kills / IF(hlstats_Players.deaths = 0, 1, hlstats_Players.deaths), 2) AS kpd, ROUND(hlstats_Players.kills / IF(" . $clandata['kills'] . " = 0, 1, ". $clandata['kills'] .") * 100, 2) AS percent, activity FROM hlstats_Players WHERE hlstats_Players.clan=$clan AND hlstats_Players.hideranking = 0 GROUP BY hlstats_Players.playerId ORDER BY $tblMembers->sort $tblMembers->sortorder, $tblMembers->sort2 $tblMembers->sortorder, hlstats_Players.skill DESC LIMIT $tblMembers->startitem,$tblMembers->numperpage "); $resultCount = $db->query(" SELECT COUNT(*) FROM hlstats_Players WHERE hlstats_Players.clan=$clan AND hlstats_Players.hideranking = 0 "); list($numitems) = $db->fetch_row($resultCount); ?>
draw($result, $numitems, 95); ?>