2004-12-16 20:52:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/team.inc");
|
2007-10-26 21:14:35 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2004-12-16 20:52:27 +00:00
|
|
|
|
|
|
|
$user = get_logged_in_user();
|
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
$teamid = post_int("teamid");
|
|
|
|
$team = BoincTeam::lookup_id($teamid);
|
|
|
|
if (!$team) {
|
2004-12-16 20:52:27 +00:00
|
|
|
error_page("No such team");
|
|
|
|
}
|
|
|
|
require_founder_login($user, $team);
|
|
|
|
|
|
|
|
page_head("Changing founder of $team->name");
|
|
|
|
$n = $_POST["navailable_users"];
|
|
|
|
for ($i=0; $i<$n; $i++) {
|
|
|
|
if ($_POST["change_$i"] != 0) {
|
2007-10-26 21:14:35 +00:00
|
|
|
$userid = post_int("change_$i");
|
|
|
|
$user = BoincUser::lookup_id($userid);
|
2004-12-16 20:52:27 +00:00
|
|
|
if ($user->teamid != $team->id) {
|
|
|
|
echo "<br>$user->name is not a member of $team->name";
|
|
|
|
} else {
|
2007-10-26 21:14:35 +00:00
|
|
|
$team->update("userid=$userid, ping_user=0");
|
|
|
|
echo "<br>$user->name is now founder of $team->name";
|
2004-12-16 20:52:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|