2004-07-21 21:42:30 +00:00
|
|
|
<?php
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2004-06-07 03:34:07 +00:00
|
|
|
require_once("../inc/util.inc");
|
2007-11-07 17:23:29 +00:00
|
|
|
require_once("../inc/team.inc");
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
function show_admin_page($user, $team) {
|
|
|
|
page_head("Team administration for $team->name");
|
|
|
|
echo "
|
|
|
|
<ul>
|
|
|
|
<li><a href=team_edit_form.php?teamid=$team->id>Edit team info</a>
|
|
|
|
<br><span class=note>Change team name, URL, description, type, or country</span>
|
|
|
|
<li>
|
|
|
|
Member list:
|
|
|
|
<a href=team_email_list.php?teamid=$team->id>HTML</a>
|
2007-11-25 20:57:34 +00:00
|
|
|
| <a href=team_email_list.php?teamid=$team->id&plain=1>text</a>
|
2007-11-07 17:23:29 +00:00
|
|
|
<br><span class=note> View member names and email addresses </span>
|
|
|
|
<li>View change history:
|
|
|
|
<a href=team_delta.php?teamid=$team->id>HTML</a>
|
|
|
|
| <a href=team_delta.php?teamid=$team->id&xml=1>XML</a>
|
|
|
|
<br><span class=note>See when members joined or quit this team</span>
|
|
|
|
";
|
2007-11-14 21:55:05 +00:00
|
|
|
|
|
|
|
// founder-only stuff follows
|
|
|
|
//
|
2007-11-07 17:23:29 +00:00
|
|
|
if ($team->userid == $user->id) {
|
2007-11-07 23:59:08 +00:00
|
|
|
$tokens = url_tokens($user->authenticator);
|
|
|
|
if ($team->ping_user > 0) {
|
|
|
|
$user2 = BoincUser::lookup_id($team->ping_user);
|
|
|
|
$deadline = date_str(transfer_ok_time($team));
|
|
|
|
echo "<li>
|
|
|
|
<a href=team_change_founder_form.php?teamid=$team->id><font color=red><b>Respond to foundership request</b></font></a>. If you don't respond by $deadline, $user2->name may assume foundership of this team.
|
|
|
|
";
|
|
|
|
}
|
2007-11-07 17:23:29 +00:00
|
|
|
echo "
|
2007-11-10 00:32:42 +00:00
|
|
|
<li><a href=team_remove_inactive_form.php?teamid=$team->id>Remove members</a>
|
|
|
|
<br><span class=note>Remove inactive or unwanted members from this team</span>
|
2007-11-07 17:23:29 +00:00
|
|
|
<li><a href=team_change_founder_form.php?teamid=$team->id>Change founder</a>
|
|
|
|
<br><span class=note>Transfer foundership to another member</span>
|
|
|
|
<li><a href=team_admins.php?teamid=$team->id>Add/remove Team Admins</a>
|
|
|
|
<br><span class=note>Give selected team members Team Admin privileges</span>
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:54:27 +00:00
|
|
|
<li><a href=team_manage.php?teamid=$team->id&action=delete&$tokens>Remove team</a>
|
2007-11-07 17:23:29 +00:00
|
|
|
<br><span class=note>Allowed only if team has no members</a>
|
2007-11-14 21:55:05 +00:00
|
|
|
<li><a href=team_forum.php?teamid=$team->id&cmd=manage>Message board</a>
|
|
|
|
<br><span class=note>Create or manage team message board</span>
|
2007-11-07 17:23:29 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
<p>
|
|
|
|
<li>
|
|
|
|
To have this team created on all BOINC projects
|
|
|
|
(current and future) you can make it into a
|
|
|
|
<a href=http://boinc.berkeley.edu/teams/>BOINC-wide team</a>.
|
|
|
|
<li>
|
|
|
|
Team admins are encouraged to join and participate in the Google
|
|
|
|
<a href=http://groups.google.com/group/boinc-team-founders>boinc-team-founders</a> group.
|
|
|
|
<li>
|
|
|
|
Other resources for BOINC team admins
|
|
|
|
are available from a third-party site,
|
|
|
|
<a href=http://www.boincteams.com>www.boincteams.com</a>.
|
|
|
|
</ul>
|
|
|
|
";
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
page_tail();
|
2004-06-07 03:34:07 +00:00
|
|
|
}
|
2007-09-24 20:13:38 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
$user = get_logged_in_user(true);
|
|
|
|
$teamid = get_int('teamid');
|
|
|
|
$team = BoincTeam::lookup_id($teamid);
|
|
|
|
if (!$team) error_page("no such team");
|
2004-06-07 03:34:07 +00:00
|
|
|
|
2007-11-07 17:23:29 +00:00
|
|
|
$action = get_str('action', true);
|
|
|
|
if ($action == 'delete') {
|
|
|
|
require_founder_login($user, $team);
|
|
|
|
if (team_count_members($team->id) > 0) {
|
|
|
|
error_page("Can't delete non-empty team");
|
|
|
|
}
|
2007-11-07 23:59:08 +00:00
|
|
|
check_tokens($user->authenticator);
|
2007-11-07 17:23:29 +00:00
|
|
|
$team->delete();
|
|
|
|
page_head("Team $team->name deleted");
|
|
|
|
page_tail();
|
|
|
|
} else {
|
|
|
|
require_admin($user, $team);
|
|
|
|
show_admin_page($user, $team);
|
|
|
|
}
|
2004-06-07 03:34:07 +00:00
|
|
|
?>
|