2003-08-08 22:17:36 +00:00
|
|
|
<?php {
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/team.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
db_init();
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2004-11-21 18:56:30 +00:00
|
|
|
$teamid = $_POST["id"];
|
|
|
|
$team = lookup_team($teamid);
|
|
|
|
if (!team) {
|
|
|
|
error_page("No such team");
|
2002-12-16 21:41:41 +00:00
|
|
|
}
|
|
|
|
require_founder_login($user, $team);
|
|
|
|
|
2004-05-11 22:49:23 +00:00
|
|
|
page_head("Removing users from $team->name");
|
2004-11-21 18:56:30 +00:00
|
|
|
$ndel = 0;
|
2003-03-21 04:38:55 +00:00
|
|
|
for ($i=0; $i<$_POST["ninactive_users"]; $i++) {
|
|
|
|
if ($_POST["remove_$i"] != 0) {
|
2004-11-21 18:56:30 +00:00
|
|
|
$userid = $_POST["remove_$i"];
|
|
|
|
$user = lookup_user_id($userid);
|
2003-03-21 04:38:55 +00:00
|
|
|
if ($user->teamid != $team->id) {
|
|
|
|
echo "<br>$user->name is not a member of $team->name";
|
|
|
|
} else {
|
2004-11-21 18:56:30 +00:00
|
|
|
$query = "update user set teamid=0 where id=$userid";
|
|
|
|
$result_user_table = mysql_query($query);
|
2003-03-21 04:38:55 +00:00
|
|
|
echo "<br>$user->name has been removed";
|
2004-11-21 18:56:30 +00:00
|
|
|
$ndel++;
|
2002-08-07 18:56:55 +00:00
|
|
|
}
|
2003-03-21 04:38:55 +00:00
|
|
|
}
|
|
|
|
}
|
2004-11-21 18:56:30 +00:00
|
|
|
if ($ndel) {
|
|
|
|
team_update_nusers($team);
|
2003-08-08 22:17:36 +00:00
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2003-03-21 04:38:55 +00:00
|
|
|
page_tail();
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2003-08-08 22:17:36 +00:00
|
|
|
} ?>
|