Пример #1
0
    $team = lookup_team($team_id);
    if ($team) {
        show_team_xml($team);
    } else {
        xml_error(-136);
    }
    exit;
}
if ($team_ids) {
    $team_id_array = explode(",", $team_ids);
    echo "<teams>\n";
    $total = 0;
    foreach ($team_id_array as $team_id) {
        if (is_numeric($team_id)) {
            //make sure only numbers get through
            $team = lookup_team($team_id);
            if ($team) {
                show_team_xml($team);
                $total++;
                if ($total == 100) {
                    break;
                }
            }
            //do not error out
        }
    }
    echo "</teams>\n";
    exit;
}
$team_name = get_str("team_name");
$name_lc = strtolower($team_name);
Пример #2
0
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util.inc";
require_once "../inc/team.inc";
if (DISABLE_TEAMS) {
    error_page("Teams are disabled");
}
check_get_args(array());
$user = get_logged_in_user(true);
$team = lookup_team($user->teamid);
if (!$team) {
    error_page(tra("No such team"));
}
page_head(tra("Quit %1", $team->name));
echo tra("<strong>Please note before quitting a team:</strong>\n         <ul>\n         <li>If you quit a team, you may rejoin later, or join any other team you desire\n         <li>Quitting a team does not affect your personal credit statistics in any way.\n         </ul>") . "<form method=\"post\" action=\"team_quit_action.php\">";
echo form_tokens($user->authenticator);
echo "<input type=\"hidden\" name=\"id\" value=\"{$team->id}\">\n    <input type=\"submit\" value=\"" . tra("Quit Team") . "\">\n    </form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
        }
        break;
    case "finalize_transfer":
        $team = BoincTeam::lookup_id($user->teamid);
        $now = time();
        if ($user->id == $team->ping_user && transfer_ok($team, $now)) {
            page_head("Assumed foundership of " . $team->name);
            $team->update("userid={$user->id}, ping_user=0, ping_time=0");
            echo "\r\n\t\t\tCongratulations, you are now the founder of team " . $team->name . "\r\n\t\t\tGo to <a href=\"" . URL_BASE . "home.php\">Your Account page</a>\r\n\t\t\tto find the Team Admin options.\r\n\t\t";
        } else {
            error_page("Foundership request not allowed now");
        }
        break;
    case "decline":
        $teamid = post_int("teamid");
        $team = lookup_team($teamid);
        require_founder_login($user, $team);
        page_head("Decline founder change request");
        if ($team->ping_user) {
            $ping_user = BoincUser::lookup_id($team->ping_user);
            $team->update("ping_user=0");
            send_founder_transfer_decline_email($team, $ping_user);
            echo "<p>The foundership request from " . user_links($ping_user) . " has been declined.\r\n\t\t";
        } else {
            echo "<p>There were no foundership requests.";
        }
        break;
    default:
        error_page("undefined action {$action}");
}
echo "<a href='team_display.php?teamid={$team->id}'>Return to team page</a>";
Пример #4
0
if (mysql_num_rows($result) < 1) {
    echo "There are no new users.";
    admin_page_tail();
}
start_table();
table_header("ID", "Name", "Email", "Team", "Country", "Joined");
while ($row = mysql_fetch_object($result)) {
    $id = $row->id;
    $name = $row->name;
    $email = $row->email_addr;
    $country = $row->country;
    $joined = time_str($row->create_time);
    $email_validated = $row->email_validated;
    $team_name = "";
    if ($row->teamid > 0) {
        $team = lookup_team($row->teamid);
        $team_name = $team->name;
    }
    // Special Users:
    $roles = "";
    $user = $row;
    BoincForumPrefs::lookup($user);
    $special_bits = $user->prefs->special_user;
    if ($special_bits != "0") {
        for ($i = 0; $i < 7; $i++) {
            $bit = substr($special_bits, $i, 1);
            if ($bit == '1') {
                if (!empty($roles)) {
                    $roles .= ", ";
                }
                $roles .= $special_user_bitfield[$i];