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


PHP url_tokens函数代码示例

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


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

示例1: remove_confirm

function remove_confirm($user, $team)
{
    $tokens = url_tokens($user->authenticator);
    page_head(tra("Really remove message board?"));
    echo tra("Are you sure you want to remove your team's message board? All threads and posts will be permanently removed. (You may, however, create a new message board later).") . "<br /><br />\n        <a href=team_forum.php?teamid={$team->id}&cmd=remove>" . tra("Yes - remove message board") . "</a>\n    ";
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:7,代码来源:team_forum.php

示例2: show_admin

function show_admin($user, $admin)
{
    $admin_user = BoincUser::lookup_id($admin->userid);
    $tokens = url_tokens($user->authenticator);
    $date = date_str($admin->create_time);
    echo "<tr>\n        <td>" . user_links($admin_user) . "</td>\n        <td>{$date}</td>\n        <td>\n    ";
    show_button("team_admins.php?teamid={$admin->teamid}&action=remove&userid={$admin_user->id}" . $tokens, tra("Remove"), tra("Remove Team Admin status from this member"));
    echo "</td></tr>\n    ";
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:9,代码来源:team_admins.php

示例3: remove_confirm

function remove_confirm($user, $team)
{
    $tokens = url_tokens($user->authenticator);
    page_head("Really remove message board?");
    echo '
		Are you sure you want to remove your team\'s message board?
		All threads and posts will be permanently removed.
		(You may, however, create a new message board later).
		<p><a href="team_forum.php?teamid=$team->id&amp;cmd=remove">Yes - remove message board</a></p>
	';
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:12,代码来源:team_forum.php

示例4: do_inbox

function do_inbox($logged_in_user)
{
    page_head(tra("Private messages") . ": " . tra("Inbox"));
    make_script();
    if (get_int("sent", true) == 1) {
        echo "<div class=\"notice\">" . tra("Your message has been sent.") . "</div>\n";
    }
    $options = get_output_options($logged_in_user);
    BoincNotify::delete_aux("userid={$logged_in_user->id} and type=" . NOTIFY_PM);
    $msgs = BoincPrivateMessage::enum("userid={$logged_in_user->id} ORDER BY date DESC");
    if (count($msgs) == 0) {
        echo tra("You have no private messages.");
    } else {
        echo "<form name=msg_list action=pm.php method=post>\n            <input type=hidden name=action value=delete_selected>\n        ";
        echo form_tokens($logged_in_user->authenticator);
        start_table();
        echo "<tr><th>" . tra("Subject") . "</th><th>" . tra("Sender and date") . "</th><th>" . tra("Message") . "</th></tr>\n";
        $i = 0;
        foreach ($msgs as $msg) {
            $sender = BoincUser::lookup_id($msg->senderid);
            if (!$sender) {
                $msg->delete();
                continue;
            }
            $i++;
            $class = $i % 2 ? "row0" : "row1";
            echo "<tr class={$class}>\n";
            $checkbox = "<input type=checkbox name=pm_select_{$msg->id}>";
            if (!$msg->opened) {
                $msg->update("opened=1");
            }
            echo "<td valign=top> {$checkbox} {$msg->subject} </td>\n";
            echo "<td valign=top>" . user_links($sender, BADGE_HEIGHT_SMALL);
            show_block_link($msg->senderid);
            echo "<br>" . time_str($msg->date) . "</td>\n";
            echo "<td valign=top>" . output_transform($msg->content, $options) . "<p>";
            $tokens = url_tokens($logged_in_user->authenticator);
            show_button("pm.php?action=new&amp;replyto={$msg->id}", tra("Reply"), tra("Reply to this message"));
            show_button("pm.php?action=delete&amp;id={$msg->id}&amp;{$tokens}", tra("Delete"), tra("Delete this message"));
            echo "</ul></td></tr>\n";
        }
        echo "\n            <tr><td>\n            <a href=\"javascript:set_all(1)\">" . tra("Select all") . "</a>\n            |\n            <a href=\"javascript:set_all(0)\">" . tra("Unselect all") . "</a>\n            </td>\n            <td colspan=2>\n            <input class=\"btn btn-danger\" type=submit value=\"" . tra("Delete selected messages") . "\">\n            </td></tr>\n        ";
        end_table();
        echo "</form>\n";
    }
    page_tail();
}
开发者ID:gchilders,项目名称:boinc,代码行数:47,代码来源:pm.php

示例5: show_admin_page

function show_admin_page($user, $team)
{
    page_head(tra("Team administration for %1", $team->name));
    echo "\n        <ul>\n        <li><a href=team_edit_form.php?teamid={$team->id}>" . tra("Edit team info") . "</a>\n            <br><p class=\"text-muted\">" . tra("Change team name, URL, description, type, or country") . "</p>\n        <li>\n            " . tra("Member list:") . "\n        <a href=team_email_list.php?teamid={$team->id}>" . tra("HTML") . "</a>\n        &middot; <a href=team_email_list.php?teamid={$team->id}&plain=1>" . tra("text") . "</a>\n            <br><p class=\"text-muted\">" . tra("View member names and email addresses") . "</p>\n        <li>" . tra("View change history:") . "\n            <a href=team_delta.php?teamid={$team->id}>" . tra("HTML") . "</a>\n            &middot; <a href=team_delta.php?teamid={$team->id}&xml=1>" . tra("XML") . "</a>\n            <br><p class=\"text-muted\">" . tra("See when members joined or quit this team") . "</p>\n    ";
    // founder-only stuff follows
    //
    if ($team->userid == $user->id) {
        $tokens = url_tokens($user->authenticator);
        if ($team->ping_user > 0) {
            $user2 = BoincUser::lookup_id($team->ping_user);
            $deadline = date_str(transfer_ok_time($team));
            echo "<li>\n                <a href=team_change_founder_form.php?teamid={$team->id}><font color=red><strong>" . tra("Respond to foundership request.") . "</strong></font></a>  " . tra("If you don't respond by %1, %2 may assume foundership of this team.", $deadline, $user2->name);
        }
        echo "\n            <li><a href=team_remove_inactive_form.php?teamid={$team->id}>" . tra("Remove members") . "</a>\n                <br><p class=\"text-muted\">" . tra("Remove inactive or unwanted members from this team") . "</p>\n            <li><a href=team_change_founder_form.php?teamid={$team->id}>" . tra("Change founder") . "</a>\n                <br><p class=\"text-muted\">" . tra("Transfer foundership to another member") . "</p>\n            <li><a href=team_admins.php?teamid={$team->id}>" . tra("Add/remove Team Admins") . "</a>\n                <br><p class=\"text-muted\">" . tra("Give selected team members Team Admin privileges") . "</p>\n\n            <li><a href=team_manage.php?teamid={$team->id}&action=delete&{$tokens}>" . tra("Remove team") . "</a>\n                <br><p class=\"text-muted\">" . tra("Allowed only if team has no members") . "</p>\n            <li><a href=team_forum.php?teamid={$team->id}&cmd=manage>" . tra("Message board") . "</a>\n                <br><p class=\"text-muted\">" . tra("Create or manage a team message board") . "</p>\n        ";
    }
    echo "\n\n        <p>\n        <li>\n            " . tra("To have this team created on all BOINC projects (current and future) you can make it into a %1BOINC-wide team%2.", "<a href=http://boinc.berkeley.edu/teams/>", "</a>") . "\n        <li>\n            " . tra("Team admins are encouraged to join and participate in the Google %1boinc-team-founders%2 group.", "<a href=http://groups.google.com/group/boinc-team-founders>", "</a>") . "\n    </ul>\n    ";
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:18,代码来源:team_manage.php

示例6: show_admin_page

function show_admin_page($user, $team)
{
    page_head("Team administration for {$team->name}");
    echo "\r\n\t\t<ul>\r\n\t\t<li><a href=team_edit_form.php?teamid={$team->id}>Edit team info</a>\r\n\t\t\t<br><span class=note>Change team name, URL, description, type, or country</span>\r\n\t\t<li>\r\n\t\t\tMember list:\r\n\t\t<a href=team_email_list.php?teamid={$team->id}>HTML</a>\r\n\t\t| <a href=team_email_list.php?teamid={$team->id}&plain=1>text</a>\r\n\t\t\t<br><span class=note> View member names and email addresses </span>\r\n\t\t<li>View change history:\r\n\t\t\t<a href=team_delta.php?teamid={$team->id}>HTML</a>\r\n\t\t\t| <a href=team_delta.php?teamid={$team->id}&xml=1>XML</a>\r\n\t\t\t<br><span class=note>See when members joined or quit this team</span>\r\n\t";
    // founder-only stuff follows
    //
    if ($team->userid == $user->id) {
        $tokens = url_tokens($user->authenticator);
        if ($team->ping_user > 0) {
            $user2 = BoincUser::lookup_id($team->ping_user);
            $deadline = date_str(transfer_ok_time($team));
            echo "<li>\r\n\t\t\t\t<a href=team_change_founder_form.php?teamid={$team->id}><font color=red><b>Respond to foundership request</b></font></a>.  If you don't respond by {$deadline}, {$user2->name} may assume foundership of this team.\r\n\t\t\t";
        }
        echo "\r\n\t\t\t<li><a href=team_remove_inactive_form.php?teamid={$team->id}>Remove members</a>\r\n\t\t\t\t<br><span class=note>Remove inactive or unwanted members from this team</span>\r\n\t\t\t<li><a href=team_change_founder_form.php?teamid={$team->id}>Change founder</a>\r\n\t\t\t\t<br><span class=note>Transfer foundership to another member</span>\r\n\t\t\t<li><a href=team_admins.php?teamid={$team->id}>Add/remove Team Admins</a>\r\n\t\t\t\t<br><span class=note>Give selected team members Team Admin privileges</span>\r\n\r\n\t\t\t<li><a href=team_manage.php?teamid={$team->id}&action=delete&{$tokens}>Remove team</a>\r\n\t\t\t\t<br><span class=note>Allowed only if team has no members</a>\r\n\t\t\t<li><a href=team_forum.php?teamid={$team->id}&cmd=manage>Message board</a>\r\n\t\t\t\t<br><span class=note>Create or manage team message board</span>\r\n\t\t";
    }
    echo "\r\n\r\n\t\t<p>\r\n\t\t<li>\r\n\t\t\tTo have this team created on all BOINC projects\r\n\t\t\t(current and future) you can make it into a\r\n\t\t\t<a href=http://boinc.berkeley.edu/teams/>BOINC-wide team</a>.\r\n\t\t<li>\r\n\t\t\tTeam admins are encouraged to join and participate in the Google\r\n\t\t\t<a href=http://groups.google.com/group/boinc-team-founders>boinc-team-founders</a> group.\r\n\t\t<li>\r\n\t\t\tOther resources for BOINC team admins\r\n\t\t\tare available from a third-party site,\r\n\t\t\t<a href=http://www.boincteams.com>www.boincteams.com</a>.\r\n\t</ul>\r\n\t";
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:18,代码来源:team_manage.php

示例7: check_get_args

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;
        project_prefs_update($user, $main_prefs);
    }
    Header("Location: prefs.php?subset={$subset}{$c}");
} else {
    page_head(tra("Confirm delete preferences"));
    $tokens = url_tokens($user->authenticator);
    echo "<p>" . tra("Are you sure you want to delete your separate %1 preferences for %2?", subset_name($subset), $venue) . "</p><br><br>\n";
    show_button("prefs_remove.php?subset={$subset}&venue={$venue}&confirmed=yes{$c}{$tokens}", tra("Yes"), tra("Remove preferences"));
    show_button("prefs.php?subset={$subset}{$c}", tra("Cancel"), tra("Cancel"));
    page_tail();
}
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:prefs_remove.php

示例8: check_get_args

// 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>
    <a href="openid_login.php?openid_identifier=http://yahoo.com"><img src=img/yahoo-button.png></a>
    <br>
';
}
login_form($next_url);
$config = get_config();
if (!parse_bool($config, "disable_account_creation") && !parse_bool($config, "no_web_account_creation")) {
    echo tra("or %1create an account%2.", "<a href=\"create_account_form.php?next_url={$next_url}\">", "</a>");
开发者ID:WilliamStilte,项目名称:boinc,代码行数:31,代码来源:login_form.php

示例9: get_int

$threadid = get_int('id');
$sort_style = get_int('sort', true);
$temp_sort_style = get_int('temp_sort_style', true);
$start = get_int('start', true);
$postid = get_int('postid', true);
$filter = get_str('filter', true);
if ($filter != "false") {
    $filter = true;
} else {
    $filter = false;
}
$logged_in_user = get_logged_in_user(false);
$tokens = "";
if ($logged_in_user) {
    BoincForumPrefs::lookup($logged_in_user);
    $tokens = url_tokens($logged_in_user->authenticator);
}
if (DISABLE_FORUMS && !is_admin($logged_in_user)) {
    error_page("Forums are disabled");
}
if ($threadid < 1) {
    error_page("Invalid thread ID!");
}
$thread = BoincThread::lookup_id($threadid);
$forum = BoincForum::lookup_id($thread->forum);
if (!$thread) {
    error_page("Bad thread ID");
}
if (!is_forum_visible_to_user($forum, $logged_in_user)) {
    if ($logged_in_user) {
        remove_subscriptions_forum($logged_in_user->id, $forum->id);
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:forum_thread.php


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