. require_once("../inc/boinc_db.inc"); require_once("../inc/user.inc"); require_once("../inc/team.inc"); check_get_args(array("xml", "teamid")); $xml = get_int('xml', true); function show_delta($delta) { global $xml; $user = BoincUser::lookup_id($delta->userid); $when = time_str($delta->timestamp); $what = $delta->joining?"joined":"quit"; if ($xml) { echo " $user->id $user->name $what $delta->total_credit $when "; } else { echo " $when ",user_links($user)," (ID $user->id) $what $delta->total_credit "; } } $user = get_logged_in_user(); $teamid = get_int('teamid'); $team = BoincTeam::lookup_id($teamid); if ($xml) { require_once('../inc/xml.inc'); xml_header(); } if (!$team || !is_team_admin($user, $team)) { if ($xml) { xml_error("-1", "Not founder or admin"); } else { error_page(tra("Not founder or admin")); } } if ($xml) { echo "\n"; } else { page_head(tra("Team history for %1", $team->name)); start_table(); echo " ".tra("When")." ".tra("User")." ".tra("Action")." ".tra("Total credit at time of action")." "; } $deltas = BoincTeamDelta::enum("teamid=$teamid order by timestamp"); foreach($deltas as $delta) { show_delta($delta); } if ($xml) { echo "\n"; } else { end_table(); page_tail(); } ?>