echo '<p><span>College: </span>' . $row['college'] . '</p>'; echo '</div>'; } //------------------- END FUNCTIONS ----------------------------------- if ($_SERVER['REQUEST_METHOD'] == 'GET') { if (empty($_GET['player_name'])) { echo "<p class='error'>No player found.</p>"; } else { // player_name will be in the form 'firstName_lastName' // (single string with underscore between first name and last name) $player_name = $_GET['player_name']; $table = 'players'; $num = 0; $res = null; if ($res = do_query($dbc, 'players', $player_name)) { display_player_profile($res); mysqli_free_result($res); } else { echo "<p class='error'>No player profile found</p>"; } if ($res = do_query($dbc, 'player_regular_season', $player_name)) { display_player_stats($res); mysqli_free_result($res); } else { echo "<p class='error'>No player stats found</p>"; } if ($res = do_query($dbc, 'player_career', $player_name)) { display_career_stats($res); mysqli_free_result($res); } else { echo "<p class='error'>No player career stats found</p>";
$set_bounty_section = ''; $communication_section = ''; $clan_options_section = ''; $player_clan_section = ''; $player_profile_message = ''; if ($username && !$self) { // Allows the viewer to set bounty on a player. ob_start(); display_set_bounty($player_info); // TODO: Move this functionality to the doshin. $set_bounty_section = ob_get_contents(); ob_end_clean(); $communication_section = render_communication($player_info['uname']); ob_start(); // Clan leader options on players in their clan. display_clan_options($player_info, $viewing_player_obj); $clan_options_section = ob_get_contents(); ob_end_clean(); } // Player clan and clan members $player_clan_section = render_player_clan($player_info, $viewers_clan); // Player profile message ob_start(); display_player_profile($player_info); $player_profile_message = ob_get_contents(); ob_end_clean(); } // Send the info to the template. $parts = get_certain_vars(get_defined_vars(), array('skills_available')); echo render_template('player.tpl', $parts); include SERVER_ROOT . "interface/footer.php";