2006-10-23 19:33:22 +00:00
|
|
|
<?php
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2006-10-23 19:33:22 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/team.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2006-10-23 19:33:22 +00:00
|
|
|
$user = get_logged_in_user();
|
|
|
|
$teamid = post_int("id");
|
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");
|
2007-11-08 00:04:57 +00:00
|
|
|
require_founder_login($user, $team);
|
2002-12-16 21:41:41 +00:00
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
page_head("Removing users from $team->name");
|
|
|
|
$ndel = 0;
|
|
|
|
for ($i=0; $i<$_POST["ninactive_users"]; $i++) {
|
|
|
|
$userid = post_int("remove_$i", true);
|
|
|
|
if (!$userid) continue;
|
|
|
|
$user = BoincUser::lookup_id($userid);
|
|
|
|
if (!$user) continue;
|
|
|
|
if ($user->teamid != $team->id) {
|
|
|
|
echo "<br>$user->name is not a member of $team->name";
|
|
|
|
} else {
|
2007-11-07 17:23:29 +00:00
|
|
|
user_quit_team($user);
|
2007-10-26 21:14:35 +00:00
|
|
|
echo "<br>$user->name has been removed";
|
|
|
|
$ndel++;
|
2003-03-21 04:38:55 +00:00
|
|
|
}
|
2006-10-23 19:33:22 +00:00
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
page_tail();
|
|
|
|
|
2006-10-23 19:33:22 +00:00
|
|
|
?>
|