public static function profile($cid) { global $lng, $coach; $c = new self($cid); $ALLOW_EDIT = is_object($coach) && ($c->coach_id == $coach->coach_id || $coach->mayManageObj(T_OBJ_COACH, $c->coach_id)); # Coach (or admin) visting own profile? title($c->name); echo "<hr>"; $c->_menu($ALLOW_EDIT); switch (isset($_GET['subsec']) ? $_GET['subsec'] : 'teams') { case 'profile': $c->_CCprofile($ALLOW_EDIT); break; case 'stats': $c->_stats(); break; case 'newteam': $c->_newTeam($ALLOW_EDIT); break; case 'teams': $c->_teams($ALLOW_EDIT); break; case 'recentmatches': $c->_recentGames(); break; } }