~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to html/user/team_founder_transfer_form.php

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
$user = get_logged_in_user();
24
24
$team = BoincTeam::lookup_id($user->teamid);
25
25
if (!$team) {
26
 
    error_page("You need to be a member of a team to access this page.");
 
26
    error_page(tra("You need to be a member of a team to access this page."));
27
27
}
28
28
 
29
 
page_head("Request foundership of $team->name");
 
29
page_head(tra("Request foundership of %1", $team->name));
30
30
$now = time();
31
31
 
32
32
// it should never happen, but just in case
33
33
//
34
34
if (!$team->userid) {
35
35
    $team->update("userid=$user->id, ping_user=0, ping_time=0");
36
 
    echo "You are now founder of team $team->name.";
 
36
    echo tra("You are now founder of team %1.", $team->name);
37
37
    page_tail();
38
38
    exit;
39
39
}
40
40
 
41
41
if ($user->id == $team->ping_user) {
42
 
    echo "<p>You requested the foundership of $team->name
43
 
        on ".date_str($team->ping_time).".
44
 
    ";
 
42
    echo "<p>".tra("You requested the foundership of %1 on %2.", $team->name, date_str($team->ping_time))."
 
43
    </p>";
45
44
    if (transfer_ok($team, $now)) {
46
 
        echo "
47
 
            60 days have elapsed since your request,
48
 
            and the founder has not responded.
49
 
            You may now assume foundership by clicking here:
50
 
            <form method=\"post\" action=\"team_founder_transfer_action.php\">
 
45
        echo tra("60 days have elapsed since your request, and the founder has not responded. You may now assume foundership by clicking here:")
 
46
            ."<form method=\"post\" action=\"team_founder_transfer_action.php\">
51
47
            <input type=\"hidden\" name=\"action\" value=\"finalize_transfer\">
52
 
            <input type=\"submit\" value=\"Assume foundership\">
 
48
            <input type=\"submit\" value=\"".tra("Assume foundership")."\">
53
49
            </form>
54
50
        ";
55
51
    } else {
56
 
        echo "<p>
57
 
            The founder was notified of your request.
58
 
            If he/she does not respond by ".date_str(transfer_ok_time($team))."
59
 
            you will be given an option to become founder.
60
 
        ";
 
52
        echo "<p>".tra("The founder was notified of your request. If he/she does not respond by %1 you will be given an option to become founder.", date_str(transfer_ok_time($team)))
 
53
        ."</p>";
61
54
    }
62
55
} else {
63
56
    if (new_transfer_request_ok($team, $now)) {
64
57
        echo "<form method=\"post\" action=\"team_founder_transfer_action.php\">";
65
 
        echo "<p>If the team founder is not active and you want to assume
66
 
            the role of founder, click the button below.
67
 
            The current founder will be sent an email detailing your request,
68
 
            and will be able to transfer foundership to you
69
 
            or to decline your request.
70
 
            If the founder does not respond in 60 days,
71
 
            you will be allowed to become the founder.
72
 
            <p>
73
 
            Are you sure you want to request foundership?
74
 
        ";
 
58
        echo "<p>".tra("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.<br /><br />
 
59
                       Are you sure you want to request foundership?")
 
60
        ."</p>";
75
61
 
76
62
        echo "<input type=\"hidden\" name=\"action\" value=\"initiate_transfer\">
77
 
            <input type=\"submit\" value=\"Request foundership\">
 
63
            <input type=\"submit\" value=\"".tra("Request foundership")."\">
78
64
            </form>
79
65
        ";
80
66
    } else {
83
69
                $team->ping_user = -$team->ping_user;
84
70
            }
85
71
            $ping_user = BoincUser::lookup_id($team->ping_user);
86
 
            echo "<p>Founder change has already been requested by ".
87
 
                user_links($ping_user)." on ".date_str($team->ping_time).".
88
 
            ";
 
72
            echo "<p>".tra("Founder change has already been requested by %1 on %2.", user_links($ping_user), date_str($team->ping_time))
 
73
            ."</p>";
89
74
        } else {
90
 
            echo "<p>A foundership change was requested during the last 90 days,
91
 
                 so new requests are not allowed.
92
 
                 Please try again later.
93
 
            ";
 
75
            echo "<p>".tra("A foundership change was requested during the last 90 days, so new requests are not allowed. Please try again later.")
 
76
            ."</p>";
94
77
        }
95
78
    }
96
79
}
97
80
 
98
 
echo "<p><a href=\"team_display.php?teamid=".$team->id."\">Return to team page</a>";
 
81
echo "<p><a href=\"team_display.php?teamid=".$team->id."\">".tra("Return to team page")."</a>";
99
82
 
100
83
page_tail();
101
84
 
102
 
$cvs_version_tracker[]="\$Id: team_founder_transfer_form.php 15992 2008-09-12 20:23:41Z boincadm $";  //Generated automatically - do not edit
 
85
$cvs_version_tracker[]="\$Id: team_founder_transfer_form.php 20582 2010-02-16 01:06:03Z davea $";  //Generated automatically - do not edit
103
86
?>