Issues (1963)

html/user/team.php (1 issue)

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
19
include_once("../inc/db.inc");
20
include_once("../inc/util.inc");
21
include_once("../inc/team.inc");
22
23
if (DISABLE_TEAMS) error_page("Teams are disabled");
24
25
check_get_args(array());
26
27
page_head(tra("Teams"));
28
29
echo "<p>".tra("%1 participants may form %2 teams %3.", PROJECT, "<b>", "</b>") ."
30
    <p>
31
    ". tra("You may belong to only one team. You can join or quit a team at any time."). "
32
    <p>" .
33
    tra("Each team has a %1 founder %2 who may:", "<b>", "</b>") . "
34
    <ul>
35
    <li> " . tra("edit the team's name and description") . "
36
    <li> " . tra("add or remove team admins") . "
37
    <li> " . tra("remove members from the team") . "
38
    <li> " . tra("disband a team if it has no members") . "
39
    </ul>
40
    <p>" .
41
    tra("To join a team, visit its team page and click %1 Join this team %2.", "<b>", "</b>") . "
42
    <h3>" . tra("Find a team") . "</h3>
43
";
44
team_search_form(null);
45
echo "
46
47
    <h3>" . tra("Top teams") . "</h3>
48
    <ul>
49
    <li> <a href=\"top_teams.php\">" . tra("All teams") . "</a>
50
";
51
52
for ($i=1; $i<count($team_types); $i++) {
0 ignored issues
show
Coding Style Performance introduced by
The use of count() inside a loop condition is not allowed; assign the return value to a variable and use the variable in the loop condition instead
Loading history...
53
    echo "<li> <a href=\"top_teams.php?type=".$i."\">".tra("%1 teams", team_type_name($i))."</a>
54
    ";
55
}
56
57
echo "
58
    </ul>
59
    <h3>" . tra("Create a new team") . "</h3>
60
    " . tra("If you cannot find a team that is right for you, you can %1 create a team %2.", "<a href=\"team_create_form.php\">","</a>");
61
page_tail();
62
63
?>
64