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


PHP page_head函数代码示例

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


在下文中一共展示了page_head函数的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_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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例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: main

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

示例11: 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

示例12: render_page_html

function render_page_html()
{
    scripts_i18n();
    page_head();
    display_filters();
    display_content();
    page_foot();
}
开发者ID:moto485,项目名称:Simple-Stats,代码行数:8,代码来源:overview_html.php

示例13: render_page

function render_page()
{
    global $ss;
    $origin = isset($_GET['origin']) && $_GET['origin'] != 'overview' ? $_GET['origin'] : '';
    $failed_login = false;
    // process login request
    if (isset($_POST['simple-stats-login'])) {
        if ($_POST['username'] == $ss->options['username'] && $ss->hash(trim($_POST['password'])) == $ss->options['password']) {
            @setcookie('simple_stats', $ss->hash($ss->options['username'] . $ss->options['password']), time() + 31536000, '/', '');
            header('Location: ./' . ($origin ? './?p=' . $origin : ''), true, 302);
            exit;
        } else {
            $failed_login = true;
        }
    }
    page_head();
    ?>
<div id="main">
<?php 
    if ($origin == 'logout') {
        echo '<p>You have logged out of Simple Stats. You can <a href="./?p=login">login again</a> if you like.';
    } else {
        ?>
<h2><?php 
        echo __('Login');
        ?>
</h2>
<?php 
        if ($failed_login) {
            echo '<p class="center">' . __('Sorry, the username and password combination that you entered was incorrect.');
        }
        ?>
<form action="./?p=login&amp;origin=<?php 
        echo $origin;
        ?>
" method="post">
<table>
<tr><th><label for="username"><?php 
        echo __('User name');
        ?>
</label><td><input type="text" name="username" value="" tabindex="1">
<tr><th><label for="password"><?php 
        echo __('Password');
        ?>
</label><td><input type="password" name="password" value="" tabindex="2">
</table>
<p class="center"><input type="submit" name="simple-stats-login" value="<?php 
        echo __('Submit');
        ?>
" tabindex="3">
</form>
<?php 
    }
    ?>
</div>
<?php 
    page_foot();
}
开发者ID:moto485,项目名称:Simple-Stats,代码行数:58,代码来源:login.php

示例14: 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

示例15: email_sent_message

function email_sent_message($email_addr)
{
    if (defined('EMAIL_FROM')) {
        $email_from = EMAIL_FROM;
    } else {
        $email_from = secure_url_base();
    }
    page_head("Email sent");
    echo "\n        Instructions have been emailed to {$email_addr}.\n        <p>\n        If the email doesn't arrive in a few minutes,\n        your ISP may be blocking it as spam.\n        In this case please contact your ISP and\n        ask them to not block email from {$email_from}.\n    ";
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:10,代码来源:mail_passwd.php


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