<?php require_once get_file_loc('smr_sector.inc'); print_topic("SECTOR DEATH RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(3, 0); print "<div align=\"center\">"; print "<p>Here are the most deadly Sectors!</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"60%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Sector</th>"; print "<th>Battles</th>"; print "</tr>"; $db->query("SELECT * FROM sector WHERE game_id = {$player->game_id} ORDER BY battles DESC, sector_id LIMIT 10"); $rank = 0; while ($db->next_record()) { // get current player $curr_sector = new SMR_SECTOR($db->f("sector_id"), $player->game_id, $player->account_id); // increase rank counter $rank++; print "<tr>"; print "<td valign=\"top\" align=\"center\""; if ($player->sector_id == $curr_sector->sector_id) { print " style=\"font-weight:bold;\""; } print ">{$rank}</td>"; print "<td valign=\"top\" align=\"center\""; if ($player->sector_id == $curr_sector->sector_id) { print " style=\"font-weight:bold;\""; }
<?php print_topic("ALLIANCE KILL RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(1, 1); $db->query("SELECT alliance_id, alliance_name, alliance_kills, leader_id FROM alliance\n\t\t\tWHERE game_id = {$player->game_id} ORDER BY alliance_kills DESC, alliance_name"); $alliances = array(); while ($db->next_record()) { $alliances[$db->f("alliance_id")] = array(stripslashes($db->f("alliance_name")), $db->f("alliance_kills"), $db->f("leader_id")); if ($db->f("alliance_id") == $player->alliance_id) { $ourRank = sizeof($alliances); } } // how many alliances are there? $numAlliances = sizeof($alliances); print "<div align=\"center\">"; print "<p>Here are the rankings of alliances by their kills.</p>"; if ($player->alliance_id > 0) { print "<p>Your alliance is ranked {$ourRank} out of {$numAlliances} alliances.</p>"; } print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Alliance</th>"; print "<th>Kills</th>"; print "</tr>"; $rank = 0; foreach ($alliances as $id => $infoArray) { // get current alliance $currAllianceName = $infoArray[0]; $numKills = $infoArray[1];
<?php print_topic("Racial Standings"); include get_file_loc('menue.inc'); print_ranking_menue(2, 2); print "<div align=center>"; print "<p>Here are the rankings of the races by their deaths</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Race</th>"; print "<th>Deaths</th>"; print "</tr>"; $rank = 0; $db2 = new SmrMySqlDatabase(); $db->query("SELECT race.race_id as race_id, race_name, sum(deaths) as death_sum, count(account_id) FROM player NATURAL JOIN race WHERE game_id = {$player->game_id} GROUP BY player.race_id ORDER BY death_sum DESC"); while ($db->next_record()) { $rank++; $race_id = $db->f("race_id"); $db2->query("SELECT * FROM player WHERE race_id = {$race_id} AND game_id = {$player->game_id} AND out_of_game = 'TRUE'"); if ($player->race_id == $race_id) { $style = " style=\"font-weight:bold;\""; } elseif ($db2->next_record()) { $style = " style=\"color:red;\""; } else { $style = ""; } print "<tr>"; print "<td align=\"center\"{$style}>{$rank}</td>"; print "<td align=\"center\"{$style}>" . $db->f("race_name") . "</td>"; print "<td align=\"center\"{$style}>" . $db->f("death_sum") . "</td>";
<?php print_topic("DEATH RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(0, 2); // what rank are we? $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " AND " . "(deaths > {$player->deaths} OR " . "(deaths = {$player->deaths} AND player_name <= " . format_string("{$player->player_name}", true) . " ))"); $our_rank = $db->nf(); // how many players are there? $db->query("SELECT * FROM player WHERE game_id = {$player->game_id}"); $total_player = $db->nf(); print "<div align=\"center\">"; print "<p>Here are the rankings of players by their deaths</p>"; print "<p>You are ranked {$our_rank} out of {$total_player}</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Player</th>"; print "<th>Race</th>"; print "<th>Alliance</th>"; print "<th>Deaths</th>"; print "</tr>"; $db->query("SELECT * FROM player WHERE game_id = {$player->game_id} ORDER BY deaths DESC, player_name LIMIT 10"); $rank = 0; while ($db->next_record()) { // get current player $curr_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id); // increase rank counter $rank++; print "<tr>"; print "<td valign=\"top\" align=\"center\"";
<?php print_topic("Racial Standings"); include get_file_loc('menue.inc'); print_ranking_menue(2, 0); print "<div align=center>"; print "<p>Here are the rankings of the races by their experience</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Race</th>"; print "<th>Total Experience</th>"; print "<th>Average Experience</th>"; print "<th>Total Traders</th>"; print "</tr>"; $rank = 0; $db2 = new SmrMySqlDatabase(); $db->query("SELECT player.race_id as race_id, race_name, sum(player_cache.experience) as experience_sum, count(player_cache.account_id) as members FROM player,player_cache NATURAL JOIN race WHERE race.race_id = player.race_id AND (player_cache.account_id = player.account_id AND player_cache.game_id = {$player->game_id}) AND player.game_id = {$player->game_id} GROUP BY player.race_id ORDER BY experience_sum DESC"); while ($db->next_record()) { $rank++; $race_id = $db->f("race_id"); $db2->query("SELECT * FROM player WHERE race_id = {$race_id} AND game_id = {$player->game_id} AND out_of_game = 'TRUE'"); if ($player->race_id == $race_id) { $style = " style=\"font-weight:bold;\""; } elseif ($db2->next_record()) { $style = " style=\"color:red;\""; } else { $style = ""; } if ($db2->next_record()) { $style .= (print "<tr>");
<?php require_once get_file_loc('smr_alliance.inc'); print_topic("ALLIANCE VS ALLIANCE RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(1, 3); $db2 = new SmrMySqlDatabase(); $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "rankings_alliance_vs_alliance.php"; print_form($container); if (isset($_POST["alliancer"])) { $alliancer = $_POST["alliancer"]; } print "<div align=\"center\">"; print "<p>Here are the rankings of alliances vs other alliances<br>"; print "Click on an alliances name for more detailed death stats.</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th rowspan=\"9\">Killed</th><th colspan=\"8\">Killers</th></tr><tr><td> </td>"; if (empty($alliancer)) { $alliance_vs = array(); $db->query("SELECT * FROM alliance WHERE game_id = {$player->game_id} ORDER BY alliance_kills DESC, alliance_name LIMIT 5"); while ($db->next_record()) { $alliance_vs[] = $db->f("alliance_id"); } //print("emtpy $alliancer"); } else { $alliance_vs = $alliancer; } $alliance_vs[] = 0;
<?php print_topic("ALLIANCE EXPERIENCE RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(1, 0); $db->query("SELECT player.alliance_id as alliance_id, sum( experience ) AS alliance_exp, count( * ) AS members, alliance_name AS name\n\t\t\t\tFROM player, alliance\n\t\t\t\tWHERE player.game_id = " . $player->game_id . " \n\t\t\t\tAND player.game_id = alliance.game_id\n\t\t\t\tAND alliance.alliance_id = player.alliance_id\n\t\t\t\tGROUP BY player.alliance_id\n\t\t\t\tORDER BY alliance_exp DESC"); $alliances = array(); while ($db->next_record()) { $alliances[$db->f("alliance_id")] = array(stripslashes($db->f("name")), $db->f("alliance_exp"), $db->f("members")); if ($db->f("alliance_id") == $player->alliance_id) { $ourRank = sizeof($alliances); } } // how many alliances are there? $numAlliances = sizeof($alliances); print "<div align=\"center\">"; print "<p>Here are the rankings of alliances by their experience.</p>"; if ($player->alliance_id > 0) { print "<p>Your alliance is ranked {$ourRank} out of {$numAlliances} alliances.</p>"; } print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Alliance</th>"; print "<th>Total Experience</th>"; print "<th>Average Experience</th>"; print "<th>Total Traders</th>"; print "</tr>"; $rank = 0; foreach ($alliances as $id => $infoArray) { $rank++;
<?php print_topic("Racial Standings"); include get_file_loc('menue.inc'); print_ranking_menue(2, 1); print "<div align=center>"; print "<p>Here are the rankings of the races by their kills</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Race</th>"; print "<th>Kills</th>"; print "</tr>"; $rank = 0; $db2 = new SmrMySqlDatabase(); $db->query("SELECT race.race_id as race_id, race_name, sum(kills) as kill_sum, count(account_id) FROM player NATURAL JOIN race WHERE game_id = {$player->game_id} GROUP BY player.race_id ORDER BY kill_sum DESC"); while ($db->next_record()) { $rank++; $race_id = $db->f("race_id"); $db2->query("SELECT * FROM player WHERE race_id = {$race_id} AND game_id = {$player->game_id} AND out_of_game = 'TRUE'"); if ($player->race_id == $race_id) { $style = " style=\"font-weight:bold;\""; } elseif ($db2->next_record()) { $style = " style=\"color:red;\""; } else { $style = ""; } print "<tr>"; print "<td align=\"center\"{$style}>{$rank}</td>"; print "<td align=\"center\"{$style}>" . $db->f("race_name") . "</td>"; print "<td align=\"center\"{$style}>" . $db->f("kill_sum") . "</td>";
<?php print_topic("ALLIANCE DEATH RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(1, 2); $db->query("SELECT alliance_id, alliance_name, alliance_deaths, leader_id FROM alliance\n\t\t\tWHERE game_id = {$player->game_id} ORDER BY alliance_deaths DESC, alliance_name"); $alliances = array(); while ($db->next_record()) { $alliances[$db->f("alliance_id")] = array(stripslashes($db->f("alliance_name")), $db->f("alliance_deaths"), $db->f("leader_id")); if ($db->f("alliance_id") == $player->alliance_id) { $ourRank = sizeof($alliances); } } // how many alliances are there? $numAlliances = sizeof($alliances); print "<div align=\"center\">"; print "<p>Here are the rankings of alliances by their deaths.</p>"; if ($player->alliance_id > 0) { print "<p>Your alliance is ranked {$ourRank} out of {$numAlliances} alliances.</p>"; } print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Alliance</th>"; print "<th>Deaths</th>"; print "</tr>"; $rank = 0; foreach ($alliances as $id => $infoArray) { // get current alliance $currAllianceName = $infoArray[0]; $numDeaths = $infoArray[1];
<?php print_topic("KILL RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(0, 1); // what rank are we? $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " AND " . "(kills > {$player->kills} OR " . "(kills = {$player->kills} AND player_name <= " . format_string("{$player->player_name}", true) . " ))"); $our_rank = $db->nf(); // how many players are there? $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id); $total_player = $db->nf(); print "<div align=\"center\">"; print "<p>Here are the rankings of players by their kills</p>"; print "<p>You are ranked {$our_rank} out of {$total_player}</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Player</th>"; print "<th>Race</th>"; print "<th>Alliance</th>"; print "<th>Kills</th>"; print "</tr>"; $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " ORDER BY kills DESC, player_name LIMIT 10"); $rank = 0; while ($db->next_record()) { // get current player $curr_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id); // increase rank counter $rank++; print "<tr>"; print "<td valign=\"top\" align=\"center\"";
<?php print_topic("EXPERIENCE RANKINGS"); include get_file_loc('menue.inc'); print_ranking_menue(0, 0); $player->get_display_xp_lvl(); // what rank are we? $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " AND " . "(experience > {$player->display_experience} OR " . "(experience = {$player->display_experience} AND player_name <= '" . addslashes(addslashes("{$player->player_name}")) . "' ))"); $our_rank = $db->nf(); // how many players are there? $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id); $total_player = $db->nf(); print "<div align=\"center\">"; print "<p>Here are the rankings of players by their experience</p>"; print "<p>You are ranked {$our_rank} out of {$total_player}</p>"; print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Rank</th>"; print "<th>Player</th>"; print "<th>Race</th>"; print "<th>Alliance</th>"; print "<th>Experience</th>"; print "</tr>"; $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " ORDER BY experience DESC, player_name LIMIT 10"); $rank = 0; while ($db->next_record()) { // get current player $curr_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id); $curr_player->get_display_xp_lvl(); // increase rank counter $rank++;