$player = new SMR_PLAYER($account->account_id, $game_id); if ($count_last_active > 0) { print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">"; print "<tr>"; print "<th>Player</th>"; print "<th>Race</th>"; print "<th>Alliance</th>"; print "<th>Experience</th>"; print "</tr>"; while ($db->next_record()) { $curr_account = new SMR_ACCOUNT(); $curr_account->get_by_id($db->f("account_id")); //reset style $style = ""; $curr_player = new SMR_PLAYER($db->f("account_id"), $game_id); if ($curr_account->veteran == "FALSE" && $curr_account->get_rank() < FLEDGLING) { $style = "font-style:italic;"; } if ($curr_player->account_id == $account->account_id) { $style .= "font-weight:bold;"; } if (!empty($style)) { $style = " style=\"{$style}\""; } print "<tr>"; print "<td valign=\"top\"{$style}>{$curr_player->display_level_name} "; $name = $curr_player->get_colored_name(); print "{$name}"; print "</td>"; print "<td align=\"center\"{$style}>"; $race = $player->get_colored_race($curr_player->race_id);
$forces = new SMR_FORCE($db->f("owner_id"), $var["target_sector"], $player->game_id); if ($player->alliance_id == 0 && $forces->owner_id == $player->account_id || $player->alliance_id != 0 && $player->alliance_id == $forces_owner->alliance_id) { $friendly_forces += $forces->mines * 3 + $forces->combat_drones * 2 + $forces->scout_drones; } else { $enemy_forces += $forces->mines * 3 + $forces->combat_drones * 2 + $forces->scout_drones; } } $last_active = time() - 259200; $db->query("SELECT * FROM player WHERE game_id = {$player->game_id} AND " . "sector_id = " . $var["target_sector"] . " AND " . "last_active > {$last_active} AND " . "land_on_planet = 'FALSE' AND " . "account_id NOT IN (" . implode(',', $HIDDEN_PLAYERS) . ")"); while ($db->next_record()) { // we may skip player if this is a protected gal. if ($sector->is_protected_gal()) { $curr_account = new SMR_ACCOUNT(); $curr_account->get_by_id($db->f("account_id")); // if one is vet and the other is newbie we skip it if (different_level($rank_id, $curr_account->get_rank(), $account->veteran, $curr_account->veteran)) { continue; } } $curr_player = new SMR_PLAYER($db->f("account_id"), $player->game_id); $curr_ship = new SMR_SHIP($db->f("account_id"), $player->game_id); // he's a friend if he's in our alliance (and we are not in a 0 alliance if ($player->alliance_id != 0 && $curr_player->alliance_id == $player->alliance_id) { $friendly_vessel += $curr_ship->attack_rating(); } else { $enemy_vessel += $curr_ship->defense_rating() * 10; } } print "<p>"; print "<table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" class=\"standard\">"; print "<tr>";
<?php require_once get_file_loc("smr_history_db.inc"); function cust_round($x) { return round($x / 10) * 10; } $acc_id = $var["acc_id"]; //view rankings of other players $this_acc = new SMR_ACCOUNT(); $this_acc->get_by_id($acc_id); $rank_id = $this_acc->get_rank(); $game_id = $var["game_id"]; $hof_name = stripslashes($this_acc->HoF_name); $db->query("SELECT * FROM rankings WHERE rankings_id = {$rank_id}"); if ($db->next_record()) { $rank_name = $db->f("rankings_name"); } // initialize vars $kills = 0; $exp = 0; // get stats $db->query("SELECT * from account_has_stats_cache WHERE account_id = {$this_acc->account_id}"); if ($db->next_record()) { $kills = $db->f("kills") > 0 ? $db->f("kills") : 0; $exp = $db->f("experience_traded") > 0 ? $db->f("experience_traded") : 0; } if ($var['sending_page'] == 'hof') { print_topic("Extended User Rankings for {$hof_name}"); print "{$hof_name} has <font color=\"red\">{$kills}</font> kills and <font color=\"red\">{$exp}</font> traded experience<br><br>"; print "{$hof_name} is ranked as a <font size=\"4\" color=\"greenyellow\">{$rank_name}</font> player.<br><br>";