userid); $when = time_str($delta->timestamp); $what = $delta->joining?"joined":"quit"; if ($xml) { echo " $user->email_addr $user->id $user->name $what $delta->total_credit $when "; } else { echo " $when ",user_links($user)," ($user->email_addr) $what $delta->total_credit "; } } db_init(); $user = get_logged_in_user(); $teamid=get_int('teamid'); $team = lookup_team($teamid); if ($xml) { require_once('../inc/xml.inc'); xml_header(); } if (!$team || $team->userid != $user->id) { if ($xml) { xml_error("-1", "Not founder"); } else { error_page("You're not the founder of that team"); } } if ($xml) { echo "\n"; } else { page_head("Team history for $team->name"); start_table(); echo " When User Action Total credit at time of action "; } $result = mysql_query("select * from team_delta where teamid=$teamid order by timestamp"); while ($delta = mysql_fetch_object($result)) { show_delta($delta); } mysql_free_result($result); if ($xml) { echo "\n"; } else { end_table(); page_tail(); } ?>