function draw_team_panel() { global $points_brackets; $teams = get_team_leaders(); $teampoints = array(); while ($team = $teams->fetch_array()) { $teampoints[$team['user_id']] = get_team_point_total($team['user_id']); } $highest = max($teampoints); $bracket = 100; while ($bracket < $highest) { $bracket = current($points_brackets); next($points_brackets); } foreach ($teampoints as $team => $teampoint) { $tlinfo = get_user_info($team); echo 'Team ' . $tlinfo['lname']; draw_progress_bar($teampoint, $bracket); } }
function draw_team_form() { $team_leaders = get_team_leaders(); $orphans = get_orphans(); ?> <?php }