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


PHP page_tail函数代码示例

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


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

示例1: user_permissions_form

function user_permissions_form()
{
    global $special_user_bitfield;
    page_head('Manage user privileges');
    start_table();
    row1("Current special users", 99);
    echo "<tr><th>User</th>";
    for ($i = 0; $i < S_NFLAGS; $i++) {
        echo "<th>" . $special_user_bitfield[$i] . "</th>\n";
    }
    echo "<th> </th></tr>";
    $result = _mysql_query("SELECT prefs.userid, prefs.special_user, user.id, user.name \n        FROM forum_preferences as prefs, user \n        WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id");
    $i = 0;
    while ($foo = _mysql_fetch_object($result)) {
        echo "<tr class=row{$i}>\n            <td>{$foo->name} ({$foo->id})</td>\n            <form action=\"user_permissions.php\" method=\"POST\">\n            <input type=\"hidden\" name=\"userid\" value=\"{$foo->userid}\">\n        ";
        for ($j = 0; $j < S_NFLAGS; $j++) {
            $bit = substr($foo->special_user, $j, 1);
            $c = $bit == 1 ? "checked" : "";
            echo "<td>\n                <input type=\"checkbox\" name=\"role" . $j . "\" value=\"1\" {$c}>\n                </td>\n            ";
        }
        echo "<td><input class=\"btn btn-default\" type=\"submit\" value=\"Update\"></td>";
        echo "</form></tr>\n";
        $i = 1 - $i;
    }
    echo "\n        <tr class=row{$i}>\n        <form action=\"user_permissions.php\" method=\"POST\">\n        <td>Add User ID:<input type=\"text\" name=\"userid\" size=\"6\"></td>\n    ";
    for ($j = 0; $j < S_NFLAGS; $j++) {
        echo "<td>\n            <input type=\"checkbox\" name=\"role" . $j . "\" value=\"1\">\n            </td>\n        ";
    }
    echo "<td>\n        <input class=\"btn btn-default\" type=\"submit\" value=\"Update\">\n        </td>\n        </form>\n        </tr>\n    ";
    end_table();
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:32,代码来源:user_permissions.php

示例2: show_installed_page

function show_installed_page($user)
{
    $url = concierge_url($user, false);
    page_head("Add project");
    echo "\n        <iframe width=0 height=0 frameborder=0 src={$url}></iframe>\n        To start running " . PROJECT . " on this computer:\n        <ul>\n        <li> Open the BOINC Manager.\n        <li> Select <b>Add Project</b>.\n        <li> You should see a welcome message; click OK.\n        </ul>\n    ";
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:7,代码来源:download.php

示例3: show_stats

function show_stats($brand)
{
    switch ($brand) {
        case 1:
            $x = "HTC Power to Give";
            break;
        default:
            error_page("invalid brand");
    }
    $hosts = BoincHost::enum("os_name='Android' and serialnum like '%{$x}%'");
    $n = 0;
    $t = 0;
    $a = 0;
    foreach ($hosts as $h) {
        $t += $h->total_credit;
        $a += $h->expavg_credit;
        if ($h->expavg_credit > 0.1) {
            $n++;
        }
    }
    page_head("Stats for {$x}");
    start_table();
    row2("Active devices", $n);
    row2("Average daily credit", $a);
    row2("Total credit", $t);
    end_table();
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:28,代码来源:brand_stats.php

示例4: show_admins

function show_admins($user, $teamid)
{
    page_head(tra("Add or remove Team Admins"));
    echo tra("You can select team members as 'Team Admins'. Team Admins can:") . "\n        <ul>\n        <li>" . tra("Edit team information (name, URL, description, country)") . "\n        <li>" . tra("View the team's join/quit history") . "\n        <li>" . tra("Moderate the team forum, if any (admins get email notification of moderation events and red X reports)") . "\n        </ul>\n        " . tra("Team Admins cannot:") . "\n        <ul>\n        <li>" . tra("Change the team founder") . "\n        <li>" . tra("Remove members") . "\n        <li>" . tra("Add or remove Team Admins") . "\n        </ul>\n        " . tra("If a Team Admin quits the team, they cease to be a Team Admin.") . "\n        <br /><br />" . tra("We recommend that you select only people you know and trust very well as Team Admins.");
    $admins = BoincTeamAdmin::enum("teamid={$teamid}");
    start_table();
    if (count($admins) == 0) {
        row1(tra("There are currently no Team Admins"));
    } else {
        row1(tra("Current Team Admins"), 3);
        table_header(tra("Name"), tra("Became Team Admin on"), "");
        foreach ($admins as $admin) {
            show_admin($user, $admin);
        }
    }
    end_table();
    echo "\n        <p>\n        <form action=team_admins.php>\n        <input type=hidden name=action value=add>\n        <input type=hidden name=teamid value={$teamid}>\n    ";
    echo form_tokens($user->authenticator);
    start_table();
    row1(tra("Add Team Admin"));
    row2(tra("Email address of team member:"), "<input name=email_addr>");
    row2("", "<input type=submit action value=\"" . tra("Add") . "\">");
    end_table();
    echo "</form>";
    page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:26,代码来源:team_admins.php

示例5: show_item

function show_item($y)
{
    $d = gmdate("g:i A \\U\\T\\C, F d Y", $y[7]);
    $file = $y[0];
    if (strstr($file, 'http://')) {
        $url = $file;
    } else {
        $url = "http://boinc.berkeley.edu/addons/{$file}";
    }
    page_head($y[1]);
    list_start();
    list_item("Name<br><font size=-2>Click to download</font>", "<a href=\"{$url}\">" . $y[1] . '</a>');
    if ($y[2]) {
        list_item("Version", $y[2]);
    }
    if ($y[3]) {
        list_item("Summary", $y[3]);
    }
    if ($y[4]) {
        list_item("Origin", '<a href=' . $y[4] . '>' . $y[4] . '</a>');
    }
    if ($y[5]) {
        list_item("Platform", $y[5]);
    }
    if ($y[6]) {
        list_item("Description", $y[6]);
    }
    list_item("Date", $d);
    list_end();
    page_tail();
}
开发者ID:ChristianBeer,项目名称:boinc,代码行数:31,代码来源:addon_item.php

示例6: select_profile

function select_profile($cmd)
{
    // Request for a random profile.
    //
    if ($cmd == "rand") {
        $profiles = array();
        $pic = get_int('pic');
        if ($pic == 0) {
            $profiles = BoincProfile::enum("has_picture=0", "limit 1000");
        } else {
            if ($pic == 1) {
                $profiles = BoincProfile::enum("has_picture=1", "limit 1000");
            } else {
                if ($pic == -1) {
                    $profiles = BoincProfile::enum(null, "limit 1000");
                }
            }
        }
        if (count($profiles) == 0) {
            page_head(tra("No profiles"));
            echo tra("No profiles matched your query.");
            page_tail();
            exit;
        }
        shuffle($profiles);
        $userid = $profiles[0]->userid;
        header("Location: " . URL_BASE . "view_profile.php?userid={$userid}");
        exit;
    }
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:30,代码来源:profile_menu.php

示例7: show_result_page

function show_result_page($success, $post, $thread, $choice)
{
    if ($success) {
        if ($choice) {
            page_head('Input Recorded');
            echo "<p>Your input has been successfully recorded.  Thank you for your help.</p>";
        } else {
            page_head('Vote Registered');
            echo "<span class=\"title\">Vote Registered</span>";
            echo "<p>Your rating has been successfully recorded.  Thank you for your input.</p>";
        }
        echo "<a href=\"forum_thread.php?nowrap=true&id=", $thread->id, "#", $post->id, "\">Return to thread</a>";
    } else {
        page_head('Vote Submission Problem');
        echo "<span class=\"title\">Vote submission failed</span>";
        if ($post) {
            echo "<p>There was a problem recording your vote in our database.  Please try again later.</p>";
            echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\">Return to thread</a>";
        } else {
            echo "<p>There post you specified does not exist, or your rating was invalid.</p>";
        }
    }
    page_tail();
    exit;
}
开发者ID:Turante,项目名称:boincweb,代码行数:25,代码来源:forum_rate.php

示例8: show_admins

function show_admins($user, $teamid)
{
    page_head("Add or remove Team Admins");
    echo "\n\t\tYou can select team members as 'Team Admins'.\n\t\tTeam Admins can:\n\t\t<ul>\n\t\t<li>Edit team information (name, URL, description, country).</li>\n\t\t<li>View the team's join/quit history.</li>\n\t\t<li>Moderate the team forum, if any (admins get emails notification of moderation events and red X reports).</li>\n\t\t</ul>\n\t\tTeam Admins cannot:\n\t\t<ul>\n\t\t<li>Change the team founder.</li>\n\t\t<li>Remove members.</li>\n\t\t<li>Add or remove Team Admins.</li>\n\t\t</ul>\n\t\tIf a Team Admin quits the team, they cease to be a Team Admin.\n\t\t<p>\n\t\tWe recommend that you select only people\n\t\tyou know and trust very well as Team Admins.\n\t";
    $admins = BoincTeamAdmin::enum("teamid={$teamid}");
    start_table();
    if (count($admins) == 0) {
        row1("There are currently no Team Admins");
    } else {
        row1("Current Team Admins", 3);
        table_header("Name", "Became Team Admin on", "");
        foreach ($admins as $admin) {
            show_admin($user, $admin);
        }
    }
    end_table();
    echo '
		<p>
		<form action="team_admins.php">
		<input type="hidden" name="action" value="add">
		<input type="hidden" name="teamid" value="$teamid">
	';
    echo form_tokens($user->authenticator);
    start_table();
    row1("Add Team Admin");
    row2('Email address of team member:', '<input name="email_addr">');
    row2('', '<input type="submit" action value="Add">');
    end_table();
    echo "</form>";
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:team_admins.php

示例9: qcn_host_edit_error_page

function qcn_host_edit_error_page($errheader, $errtext)
{
    page_head($errheader);
    echo "<BR>" . $errtext . "<BR><BR>";
    echo "<FORM><INPUT TYPE=\"button\" VALUE=\"Back\" onClick=\"history.go(-1);return true;\"> </FORM>";
    page_tail();
    exit;
}
开发者ID:happyj,项目名称:qcn,代码行数:8,代码来源:edit_host_info_action.php

示例10: email_password

function email_password($vol)
{
    page_head("Emailing password");
    echo "We're emailing your Help Volunteer password to {$vol->email_addr}.";
    page_tail();
    $body = "Your BOINC Help Volunteer password is:\n{$vol->password}\n";
    mail($vol->email_addr, "Help Volunteer info", $body, "From: BOINC");
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:8,代码来源:help_vol_edit.php

示例11: main

function main()
{
    page_head("Bossa apps");
    start_table();
    show_apps();
    end_table();
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:8,代码来源:bossa_apps.php

示例12: show_error

function show_error($str)
{
    page_head("Can't create account");
    echo "{$str}<br>\n";
    echo BoincDb::error();
    echo "<p>Click your browser's <b>Back</b> button to try again.\n<p>\n";
    page_tail();
    exit;
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:9,代码来源:openid_login.php

示例13: delete_profile

function delete_profile($user)
{
    $result = BoincProfile::delete_aux("userid = {$user->id}");
    if (!$result) {
        error_page("couldn't delete profile - please try again later");
    }
    delete_user_pictures($user->id);
    page_head("Delete Confirmation");
    $user->update("has_profile=0");
    echo "Your profile has been deleted<br />";
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:12,代码来源:delete_profile.php

示例14: show_batches

function show_batches($user)
{
    $batches = BoincBatch::enum("user_id={$user->id}");
    page_head("Batches");
    start_table();
    table_header("Batch ID", "Submitted", "# jobs");
    foreach ($batches as $batch) {
        echo "<tr>\n            <td><a href=submit_status.php?action=show_batch&batch_id={$batch->id}>{$batch->id}</a></td>\n            <td>" . time_str($batch->create_time) . "</td>\n            <td>{$batch->njobs}</td>\n            </tr>\n        ";
    }
    end_table();
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:12,代码来源:submit_status.php

示例15: unsubscribe

function unsubscribe($forum, $thread, $user)
{
    BoincSubscription::delete($user->id, $thread->id);
    if (!BoincSubscription::lookup($user->id, $thread->id)) {
        page_head(tra("Unsubscription successful"));
        show_forum_header($user);
        show_title($forum, $thread);
        echo "<p>" . tra("You are no longer subscribed to %1. You will no longer receive notifications for this thread.", "<b>" . cleanup_title($thread->title) . "</b>");
    } else {
        page_head(tra("Unsubscription failed"));
        echo "<p>" . tra("We are currently unable to unsubscribe you from %1. Please try again later..", "<b>" . cleanup_title($thread->title) . "</b>");
    }
    echo "</p><p><br /><a href=\"forum_thread.php?id=" . $thread->id . "\">" . tra("Return to thread") . "</a></p>";
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:15,代码来源:forum_subscribe.php


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