1<?php
2// This file is part of BOINC.
3// http://boinc.berkeley.edu
4// Copyright (C) 2014 University of California
5//
6// BOINC is free software; you can redistribute it and/or modify it
7// under the terms of the GNU Lesser General Public License
8// as published by the Free Software Foundation,
9// either version 3 of the License, or (at your option) any later version.
10//
11// BOINC is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14// See the GNU Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public License
17// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
18
19require_once("../inc/util.inc");
20require_once("../inc/team.inc");
21
22if (DISABLE_TEAMS) error_page("Teams are disabled");
23
24check_get_args(array("id"));
25
26$user = get_logged_in_user();
27$teamid = get_int("id");
28
29$team = BoincTeam::lookup_id($teamid);
30if (!$team->joinable) {
31    error_page(tra("The team %1 is not joinable.", $team->name));
32}
33$team_name = $team->name;
34page_head(tra("Join %1", $team_name));
35echo " <p><b>".tra("Please note:")."</b>
36    <ul>
37    <li>".tra("Joining a team gives its founder access to your email address.")."
38    <li>".tra("Joining a team does not affect your account's credit.")."
39    </ul>
40    <hr>
41    <form method=\"post\" action=\"team_join_action.php\">";
42echo form_tokens($user->authenticator);
43echo "
44    <input type=\"hidden\" name=\"teamid\" value=\"$teamid\">
45    <input class=\"btn btn-default\" type=\"submit\" value=\"".tra("Join team")."\">
46    </form>
47";
48page_tail();
49
50$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
51?>
52