userid != $user->id || $teamid != $user->teamid) { $show_email = false; } echo "\n"; $result = mysql_query("select * from user where teamid=$team->id"); while ($user = mysql_fetch_object($result)) { show_team_member($user, $show_email); } echo "\n"; exit(); } db_init(); $user = get_logged_in_user(); $teamid = get_int("teamid"); $plain = get_int("plain", true); if ($user->teamid == $teamid) { $team = lookup_team($teamid); require_founder_login($user, $team); if ($plain) { header("Content-type: text/plain"); } else { page_head("$team->name Email List"); start_table(); table_header(array("Member list of ".$team->name, "colspan=\"5\"")); table_header("Name", "Email address", "Total credit", "Recent average credit", "Country"); } $result = mysql_query("select * from user where teamid=$team->id"); while ($user = mysql_fetch_object($result)) { if ($plain) { echo "$user->name <$user->email_addr>\n"; } else { table_row(user_links($user), $user->email_addr, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country); } } if (!$plain) { mysql_free_result($result); end_table(); echo "

Show as plain text

"; page_tail(); } } else { error_page("You need to be the member and the founder of the team to edit team information."); } ?>