当前位置: 首页>>代码示例>>PHP>>正文


PHP check_get_args函数代码示例

本文整理汇总了PHP中check_get_args函数的典型用法代码示例。如果您正苦于以下问题:PHP check_get_args函数的具体用法?PHP check_get_args怎么用?PHP check_get_args使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_get_args函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: error_page

//
// 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/>.
// create, manage, or read a team message board
require_once "../inc/util.inc";
require_once "../inc/team.inc";
require_once "../inc/forum_db.inc";
if (DISABLE_TEAMS) {
    error_page("Teams are disabled");
}
check_get_args(array("tnow", "ttok", "teamid", "cmd"));
function create_confirm($user, $team)
{
    page_head(tra("Create Message Board"));
    echo tra("You may create a message board for use by %1.", $team->name) . "\n        <ul>\n        <li>" . tra("Only team members will be able to post.") . "\n        <li>" . tra("At your option, only members will be able to read.") . "\n        <li>" . tra("You and your Team Admins will have moderator privileges.") . "\n        </ul>\n    ";
    $tokens = url_tokens($user->authenticator);
    show_button("team_forum.php?teamid={$team->id}&cmd=create{$tokens}", tra("Create Message Board"), tra("Create a message board for %1", $team->name));
    page_tail();
}
function create_forum($user, $team)
{
    $f = BoincForum::lookup("parent_type=1 and category={$team->id}");
    if ($f) {
        error_page(tra("Team already has a message board"));
    }
    $id = BoincForum::insert("(category, parent_type) values ({$team->id}, 1)");
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:team_forum.php

示例2: check_get_args

// 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/>.
include_once "../inc/util.inc";
include_once "../inc/prefs.inc";
include_once "../inc/prefs_project.inc";
check_get_args(array("subset", "venue", "confirmed", "cols", "tnow", "ttok"));
$user = get_logged_in_user();
check_tokens($user->authenticator);
$subset = get_str("subset");
$venue = get_str("venue");
$confirmed = get_str("confirmed", true);
$columns = get_int("cols", true);
$c = $columns ? "&cols={$columns}" : "";
if ($confirmed) {
    if ($subset == "global") {
        $main_prefs = prefs_parse_global($user->global_prefs);
        $main_prefs->{$venue} = null;
        global_prefs_update($user, $main_prefs);
    } else {
        $main_prefs = prefs_parse_project($user->project_prefs);
        $main_prefs->{$venue} = null;
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:prefs_remove.php

示例3: check_get_args

//
// 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/cert.inc";
check_get_args(array("border"));
$user = get_logged_in_user();
$team = BoincTeam::lookup_id($user->teamid);
if (!$team) {
    error_page("no team");
}
$join = gmdate('j F Y', $team->create_time);
$today = gmdate('j F Y', time(0));
credit_to_ops($team->total_credit, $ops, $unit);
$border = get_str("border", true);
if ($border == "no") {
    $border = 0;
} else {
    $border = 8;
}
$credit = credit_string($team->total_credit, false);
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:cert_team.php

示例4: error_page

// 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/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/team.inc";
if (DISABLE_TEAMS) {
    error_page("Teams are disabled");
}
check_get_args(array("format", "team_id", "team_ids", "team_name"));
$format = get_str("format", true);
$team_id = get_int("team_id", true);
$team_ids = get_str("team_ids", true);
BoincDb::get(true);
if ($team_id || $team_ids || $format == 'xml') {
    require_once '../inc/xml.inc';
    xml_header();
    $retval = db_init_xml();
    if ($retval) {
        xml_error($retval);
    }
}
if ($team_id) {
    $team = BoincTeam::lookup_id($team_id);
    if ($team) {
开发者ID:gchilders,项目名称:boinc,代码行数:31,代码来源:team_lookup.php

示例5: check_get_args

// 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/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/team.inc";
check_get_args(array("tnow", "ttok"));
$user = get_logged_in_user(true);
check_tokens($user->authenticator);
$teamid = post_int("teamid");
$team = BoincTeam::lookup_id($teamid);
require_team($team);
if (!$team->joinable) {
    error_page(tra("The team %1 is not joinable.", $team->name));
}
if ($user->teamid == $team->id) {
    page_head(tra("Already a member"));
    echo tra("You are already a member of %1.", $team->name);
} else {
    $success = user_join_team($team, $user);
    if ($success) {
        page_head(tra("Joined %1", $team->name));
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:team_join_action.php

示例6: check_get_args

// Copyright (C) 2008 University of California
//
// 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";
check_get_args(array("field"));
$field = get_str("field");
switch ($field) {
    case "result_server_state":
        page_head(tra("Server states"));
        echo "\n        <p>\n        " . tra("A tasks's <b>server state</b> indicates whether the task has been sent to a computer, and if so whether the computer has finished it. Possible values are:") . "\n        <p>\n    ";
        start_table();
        row2_plain("<b>" . tra("Inactive") . "</b>", tra("The task is not ready to send (for example, because its input files are unavailable)"));
        row2_plain("<b>" . tra("Unsent") . "</b>", tra("The task is ready to send, but hasn't been sent yet."));
        row2_plain("<b>" . tra("In Progress") . "</b>", tra("The task has been sent; waiting for completion."));
        row2_plain("<b>" . tra("Over") . "</b>", tra("The task has been sent to a computer and either it has timed out or the computer has reported its completion."));
        break;
    case "result_outcome":
        page_head(tra("Outcomes"));
        echo "\n        <p>\n        " . tra("A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. Possible values are:") . "\n        <p>\n    ";
        start_table();
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:explain_state.php

示例7: check_get_args

// 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/db.inc";
require_once "../inc/util.inc";
require_once "../inc/account.inc";
check_get_args(array("next_url"));
$next_url = sanitize_local_url(get_str('next_url', true));
$next_url = urldecode($next_url);
$u = "login_form.php?next_url=" . $next_url;
redirect_to_secure_url($u);
$user = get_logged_in_user(false);
if ($user) {
    page_head("Already logged in");
    row2("You are logged in as {$user->name}", ".  <a href=\"logout.php?" . url_tokens($user->authenticator) . "\">Log out</a>");
    page_tail();
    exit;
}
page_head(tra("Log in"));
if (0) {
    echo '
    <a href="openid_login.php?openid_identifier=https://www.google.com/accounts/o8/id"><img src=img/google-button.png></a>
开发者ID:WilliamStilte,项目名称:boinc,代码行数:31,代码来源:login_form.php

示例8: check_get_args

// 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/boinc_db.inc';
require_once '../inc/util.inc';
require_once '../inc/account.inc';
require_once '../inc/countries.inc';
require_once '../inc/translation.inc';
require_once '../inc/recaptchalib.php';
check_get_args(array("next_url", "teamid"));
$next_url = sanitize_local_url(get_str('next_url', true));
redirect_to_secure_url("create_account_form.php?next_url={$next_url}");
$config = get_config();
if (parse_bool($config, "disable_account_creation")) {
    error_page("This project is not accepting new accounts");
}
if (parse_bool($config, "no_web_account_creation")) {
    error_page("This project has disabled Web account creation");
}
page_head(tra("Create an account"), null, null, null, recaptcha_get_head_extra());
if (!no_computing()) {
    echo "<p>\n        <b>" . tra("NOTE: If you use the BOINC Manager, don't use this form. Just run BOINC, select Add Project, and enter an email address and password.") . "</b></p>\n    ";
}
$teamid = get_int("teamid", true);
if ($teamid) {
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:create_account_form.php

示例9: error_page

// 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/profile.inc";
require_once "../inc/uotd.inc";
if (DISABLE_PROFILES) {
    error_page("Profiles are disabled");
}
check_get_args(array("cmd", "pic"));
$option = get_str('cmd', true);
if ($option) {
    select_profile($option);
    exit;
}
page_head(tra("Profiles"));
echo "\n    <p>" . tra("%1Profiles%2 let individuals share backgrounds and opinions with the %3 community.", "<b>", "</b>", PROJECT) . " " . tra("Explore the diversity of your fellow volunteers, and contribute your own views for others to enjoy.") . "\n    <p>" . tra("If you haven't already, you can %1create your own user profile%2 for others to see!", "<a href=\"create_profile.php\">", "</a>");
start_table_noborder();
$today = getdate(time());
$UOTD_heading = tra("User of the Day") . " -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year'];
row1($UOTD_heading);
echo "<tr><td>";
$profile = get_current_uotd();
if ($profile) {
    $user = BoincUser::lookup_id($profile->userid);
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:profile_menu.php

示例10: check_get_args

// 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/>.
// Forum index
// shows the categories and the forums in each category
require_once '../inc/forum.inc';
require_once '../inc/pm.inc';
require_once '../inc/time.inc';
check_get_args(array("read", "return", "tnow", "ttok"));
$user = get_logged_in_user(false);
// Process request to mark all posts as read
//
if (get_int("read", true) == 1) {
    if ($user) {
        check_tokens($user->authenticator);
        BoincForumPrefs::lookup($user);
        $now = time();
        $user->prefs->update("mark_as_read_timestamp={$now}");
        Header("Location: " . get_str("return", true));
    }
}
function show_forum_summary($forum, $i)
{
    switch ($forum->parent_type) {
开发者ID:happyj,项目名称:qcn,代码行数:31,代码来源:forum_index.php

示例11: xml_header

//
// 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/boinc_db.inc";
require_once "../inc/xml.inc";
xml_header();
$retval = db_init_xml();
if ($retval) {
    xml_error($retval);
}
check_get_args(array("account_key"));
$auth = get_str("account_key");
$user = BoincUser::lookup_auth($auth);
if (!$user) {
    xml_error(ERR_DB_NOT_FOUND);
}
$name = urlencode($user->name);
$country = urlencode($user->country);
$postal_code = urlencode($user->postal_code);
$url = urlencode($user->url);
$weak_auth = weak_auth($user);
$cpid = md5($user->cross_project_id . $user->email_addr);
$ret = "<id>{$user->id}</id>\n<name>{$name}</name>\n<country>{$country}</country>\n<weak_auth>{$weak_auth}</weak_auth>\n<postal_code>{$postal_code}</postal_code>\n<cpid>{$cpid}</cpid>\n<has_profile>{$user->has_profile}</has_profile>\n<create_time>{$user->create_time}</create_time>\n<global_prefs>\n{$user->global_prefs}\n</global_prefs>\n<project_prefs>\n{$user->project_prefs}\n</project_prefs>\n<url>{$url}</url>\n<send_email>{$user->send_email}</send_email>\n<show_hosts>{$user->show_hosts}</show_hosts>\n<teamid>{$user->teamid}</teamid>\n<venue>{$user->venue}</venue>";
if ($user->teamid) {
    $team = BoincTeam::lookup_id_nocache($user->teamid);
    if ($team->userid == $user->id) {
开发者ID:ChristianBeer,项目名称:boinc,代码行数:31,代码来源:am_get_info.php

示例12: error_page

// 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("id"));
$user = get_logged_in_user();
$teamid = get_int("id");
$team = BoincTeam::lookup_id($teamid);
if (!$team->joinable) {
    error_page(tra("The team %1 is not joinable.", $team->name));
}
$team_name = $team->name;
page_head(tra("Join %1", $team_name));
echo " <p><b>" . tra("Please note:") . "</b>\n    <ul>\n    <li>" . tra("Joining a team gives its founder access to your email address.") . "\n    <li>" . tra("Joining a team does not affect your account's credit.") . "\n    </ul>\n    <hr>\n    <form method=\"post\" action=\"team_join_action.php\">";
echo form_tokens($user->authenticator);
echo "\n    <input type=\"hidden\" name=\"teamid\" value=\"{$teamid}\">\n    <input type=\"submit\" value=\"" . tra("Join team") . "\">\n    </form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:team_join_form.php

示例13: check_get_args

// 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/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/prefs.inc";
check_get_args(array("hostid", "venue"));
$user = get_logged_in_user();
$venue = get_str("venue");
check_venue($venue);
$hostid = get_int("hostid");
$host = BoincHost::lookup_id($hostid);
if (!$host) {
    error_page("No such host");
}
if ($host->userid != $user->id) {
    error_page("Not your host");
}
$retval = $host->update("venue='{$venue}'");
if ($retval) {
    page_head(tra("Host venue updated"));
    if ($venue == '') {
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:host_venue_action.php

示例14: check_get_args

// 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/>.
// This file allows you to create a new thread in a forum
// At first it displays an input box and when you submit
// it will apply the changes by calling methods on the forum
require_once '../inc/forum_email.inc';
require_once '../inc/forum.inc';
require_once '../inc/bbcode_html.inc';
require_once '../inc/akismet.inc';
require_once '../inc/news.inc';
check_get_args(array("id", "title", "force_title", "tnow", "ttok", "export"));
$logged_in_user = get_logged_in_user();
BoincForumPrefs::lookup($logged_in_user);
check_banished($logged_in_user);
$forumid = get_int("id");
$forum = BoincForum::lookup_id($forumid);
if (DISABLE_FORUMS && !is_admin($logged_in_user)) {
    error_page("Forums are disabled");
}
if (!user_can_create_thread($logged_in_user, $forum)) {
    error_page(tra("Only project admins may create a thread here. However, you may reply to existing threads."));
}
check_post_access($logged_in_user, $forum);
$title = post_str("title", true);
if (!$title) {
    $title = get_str("title", true);
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:forum_post.php

示例15: error_page

// 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/forum.inc";
require_once "../inc/forum_email.inc";
if (DISABLE_FORUMS) {
    error_page("Forums are disabled");
}
check_get_args(array("id", "action", "tnow", "ttok"));
function mod_comment()
{
    $x = "";
    $reason = post_str('reason', true);
    if ($reason) {
        $x .= "\nModerator comment: {$reason}\n";
    }
    return $x;
}
function hide_explanation()
{
    switch (post_int("category", true)) {
        case 1:
            $c = "Obscene";
            break;
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:forum_moderate_post_action.php


注:本文中的check_get_args函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。