2006-10-23 19:33:22 +00:00
|
|
|
<?php
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2006-10-23 19:33:22 +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
|
|
|
|
2006-10-23 19:33:22 +00:00
|
|
|
db_init();
|
|
|
|
$user = get_logged_in_user();
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2006-10-23 19:33:22 +00:00
|
|
|
$teamid = post_int("id");
|
|
|
|
|
|
|
|
if ($user->teamid == $teamid) {
|
2004-11-21 18:56:30 +00:00
|
|
|
$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
|
|
|
}
|
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2003-03-21 04:38:55 +00:00
|
|
|
page_tail();
|
2006-10-23 19:33:22 +00:00
|
|
|
} else {
|
|
|
|
error_page("You need to be the member and the founder of the team to edit team information.");
|
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2006-10-23 19:33:22 +00:00
|
|
|
?>
|