2006-10-27 16:06:42 +00:00
|
|
|
<?php
|
2007-09-26 15:46:54 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2006-10-27 16:06:42 +00:00
|
|
|
|
2007-11-07 23:59:08 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2006-10-27 16:06:42 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/team.inc");
|
|
|
|
|
2007-11-07 23:59:08 +00:00
|
|
|
$user = get_logged_in_user();
|
|
|
|
$team = BoincTeam::lookup_id($user->teamid);
|
|
|
|
if (!$team) {
|
2007-07-23 20:30:30 +00:00
|
|
|
error_page("You need to be a member of a team to access this page.");
|
2006-11-02 19:43:54 +00:00
|
|
|
}
|
2006-10-27 16:06:42 +00:00
|
|
|
|
2007-11-07 23:59:08 +00:00
|
|
|
page_head("Request foundership of $team->name");
|
2006-10-27 16:06:42 +00:00
|
|
|
$now = time();
|
|
|
|
|
2008-06-13 16:40:51 +00:00
|
|
|
if ($user->id == $team->ping_user) {
|
|
|
|
echo "<p>You requested the foundership of $team->name
|
|
|
|
on ".date_str($team->ping_time).".
|
2006-10-27 16:06:42 +00:00
|
|
|
";
|
2008-06-13 16:40:51 +00:00
|
|
|
if (transfer_ok($team, $now)) {
|
|
|
|
echo "
|
|
|
|
60 days have elapsed since your request,
|
|
|
|
and the founder has not responded.
|
|
|
|
You may now assume foundership by clicking here:
|
|
|
|
<form method=\"post\" action=\"team_founder_transfer_action.php\">
|
|
|
|
<input type=\"hidden\" name=\"action\" value=\"finalize_transfer\">
|
|
|
|
<input type=\"submit\" value=\"Assume foundership\">
|
|
|
|
</form>
|
|
|
|
";
|
|
|
|
} else {
|
|
|
|
echo "<p>
|
|
|
|
The founder was notified of your request.
|
|
|
|
If he/she does not respond by ".date_str(transfer_ok_time($team))."
|
|
|
|
you will be given an option to become founder.
|
|
|
|
";
|
|
|
|
}
|
2006-10-27 16:06:42 +00:00
|
|
|
} else {
|
2008-06-13 16:40:51 +00:00
|
|
|
if (new_transfer_request_ok($team, $now)) {
|
|
|
|
echo "<form method=\"post\" action=\"team_founder_transfer_action.php\">";
|
|
|
|
echo "<p>If the team founder is not active and you want to assume
|
|
|
|
the role of founder, click the button below.
|
|
|
|
The current founder will be sent an email detailing your request,
|
|
|
|
and will be able to transfer foundership to you
|
|
|
|
or to decline your request.
|
|
|
|
If the founder does not respond in 60 days,
|
|
|
|
you will be allowed to become the founder.
|
|
|
|
<p>
|
|
|
|
Are you sure you want to request foundership?
|
|
|
|
";
|
|
|
|
|
|
|
|
echo "<input type=\"hidden\" name=\"action\" value=\"initiate_transfer\">
|
|
|
|
<input type=\"submit\" value=\"Request foundership\">
|
|
|
|
</form>
|
|
|
|
";
|
|
|
|
} else {
|
|
|
|
if ($team->ping_user) {
|
2007-09-26 15:46:54 +00:00
|
|
|
if ($team->ping_user < 0) {
|
|
|
|
$team->ping_user = -$team->ping_user;
|
|
|
|
}
|
2007-11-07 23:59:08 +00:00
|
|
|
$ping_user = BoincUser::lookup_id($team->ping_user);
|
2007-07-23 20:30:30 +00:00
|
|
|
echo "<p>Founder change has already been requested by ".
|
|
|
|
user_links($ping_user)." on ".date_str($team->ping_time).".
|
|
|
|
";
|
2008-06-13 16:40:51 +00:00
|
|
|
} else {
|
|
|
|
echo "<p>A foundership change was requested during the last 90 days,
|
|
|
|
so new requests are not allowed.
|
|
|
|
Please try again later.
|
|
|
|
";
|
2007-07-23 20:30:30 +00:00
|
|
|
}
|
2006-10-27 16:06:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
echo "<p><a href=\"team_display.php?teamid=".$team->id."\">Return to team page</a>";
|
2006-10-27 16:06:42 +00:00
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|