Example #1
0
 public static function profile($pid)
 {
     if ($pid < 0) {
         fatal('Sorry, star players to do have regular player profiles.');
     }
     global $lng, $coach, $settings;
     $p = new self($pid);
     $team = new Team($p->owned_by_team_id);
     /* Argument(s) passed to generating functions. */
     $ALLOW_EDIT = is_object($coach) && ($team->owned_by_coach_id == $coach->coach_id || $coach->isNodeCommish(T_NODE_LEAGUE, $team->f_lid)) && !$team->is_retired;
     /* Player pages consist of the output of these generating functions. */
     $p->_handleActions($ALLOW_EDIT);
     # Handles any actions/request sent.
     $p->_head($team);
     $p->_about($ALLOW_EDIT);
     $p->_achievements();
     $p->_matchBest();
     $p->_recentGames();
     $p->_injuryHistory();
     if (!$settings['hide_ES_extensions']) {
         $p->_ES();
     }
 }