2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2005-02-19 08:06:53 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/team.inc");
|
2003-03-19 21:01:32 +00:00
|
|
|
|
2008-01-09 20:29:09 +00:00
|
|
|
ini_set("memory_limit", "1024M");
|
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
$logged_in_user = get_logged_in_user();
|
2005-02-19 08:06:53 +00:00
|
|
|
$teamid = get_int("teamid");
|
2007-10-26 21:14:35 +00:00
|
|
|
$team = BoincTeam::lookup_id($teamid);
|
2007-11-07 17:23:29 +00:00
|
|
|
if (!$team) error_page("no such team");
|
|
|
|
require_admin($logged_in_user, $team);
|
2008-06-18 19:52:20 +00:00
|
|
|
page_head("Remove members from $team->name");
|
2007-10-26 21:14:35 +00:00
|
|
|
echo "
|
|
|
|
<form method=\"post\" action=\"team_remove_inactive_action.php\">
|
|
|
|
<input type=\"hidden\" name=\"id\" value=\"".$team->id."\">
|
|
|
|
";
|
|
|
|
start_table();
|
|
|
|
echo "<tr>
|
|
|
|
<th>Remove?</th>
|
2008-06-18 19:52:20 +00:00
|
|
|
<th>Name (ID)</th>
|
2007-10-26 21:14:35 +00:00
|
|
|
<th>Total credit</th>
|
|
|
|
<th>Recent average credit</th>
|
|
|
|
</tr>
|
|
|
|
";
|
2006-10-23 19:33:22 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
$users = BoincUser::enum("teamid=$team->id");
|
2007-10-26 21:14:35 +00:00
|
|
|
$ninactive_users = 0;
|
|
|
|
foreach($users as $user) {
|
2007-11-07 17:23:29 +00:00
|
|
|
if ($user->id == $logged_in_user->id) continue;
|
|
|
|
if ($user->id == $team->userid) continue;
|
2007-10-26 21:14:35 +00:00
|
|
|
$user_total_credit = format_credit($user->total_credit);
|
|
|
|
$user_expavg_credit = format_credit($user->expavg_credit);
|
|
|
|
echo "
|
|
|
|
<tr>
|
|
|
|
<td align=center><input type=checkbox name=remove_$ninactive_users value=$user->id>
|
2008-06-18 19:52:20 +00:00
|
|
|
<td>".user_links($user)." ($user->id)</td>
|
2007-10-26 21:14:35 +00:00
|
|
|
<td>$user_total_credit</td>
|
|
|
|
<td>$user_expavg_credit</td>
|
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
$ninactive_users++;
|
2005-02-19 08:06:53 +00:00
|
|
|
}
|
2007-10-26 21:14:35 +00:00
|
|
|
end_table();
|
2007-11-07 17:23:29 +00:00
|
|
|
if ($ninactive_users == 0) {
|
|
|
|
echo "<p>No members are eligible for removal.";
|
|
|
|
} else {
|
|
|
|
echo "<input type=hidden name=ninactive_users value=$ninactive_users>";
|
|
|
|
echo "<input type=submit value=\"Remove users\">";
|
|
|
|
}
|
2007-10-26 21:14:35 +00:00
|
|
|
echo "</form>";
|
|
|
|
page_tail();
|
2002-08-07 18:56:55 +00:00
|
|
|
?>
|