本文整理汇总了PHP中page_tail函数的典型用法代码示例。如果您正苦于以下问题:PHP page_tail函数的具体用法?PHP page_tail怎么用?PHP page_tail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_tail函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: login_with_auth
function login_with_auth($authenticator, $next_url, $perm)
{
$user = BoincUser::lookup_auth($authenticator);
if (!$user) {
page_head("Login failed");
echo "There is no account with that authenticator.\n Please <a href=get_passwd.php>try again</a>.\n ";
page_tail();
} else {
if (substr($user->authenticator, 0, 1) == 'x') {
error_page("This account has been administratively disabled.");
} else {
Header("Location: {$next_url}");
send_cookie('auth', $authenticator, $perm);
}
}
}
开发者ID:aggroskater,项目名称:boinc,代码行数:16,代码来源:login_action.php
示例17: reg_form
function reg_form()
{
$config = get_config();
$disable_acct = parse_bool($config, "disable_account_creation");
page_head("Register");
start_table();
echo "<tr><td>";
echo "<h3>Create an account</h3>";
create_account_form(0, "download.php");
echo "</td><td>";
echo "<h3>If you already have an account, log in</h3>";
login_form("download.php");
echo "</td></tr>";
end_table();
page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:16,代码来源:register.php
示例18: list_files
function list_files($user, $err_msg)
{
$dir = sandbox_dir($user);
$d = opendir($dir);
if (!$d) {
error_page("Can't open sandbox directory");
}
page_head("file sandbox for {$user->name}");
echo "\n <form action=sandbox.php method=post ENCTYPE=\"multipart/form-data\">\n <input type=hidden name=action value=upload_file>\n Upload a file to your sandbox:\n <p><input size=80 type=file name=new_file>\n <p> <input type=submit value=Upload>\n </form>\n <hr>\n ";
if (strcmp($err_msg, "") != 0) {
echo "<p>{$err_msg}<hr>";
}
$files = array();
while (($f = readdir($d)) !== false) {
if ($f == '.') {
continue;
}
if ($f == '..') {
continue;
}
$files[] = $f;
}
if (count($files) == 0) {
echo "Your sandbox is currently empty.";
} else {
sort($files);
start_table();
table_header("Name<br><span class=note>(click to view)</span>", "Modified", "Size (bytes)", "MD5", "Delete", "Download");
foreach ($files as $f) {
$path = "{$dir}/{$f}";
list($error, $size, $md5) = sandbox_parse_link_file($path);
if ($error) {
table_row($f, "Can't parse link file", "", "<a href=sandbox.php?action=delete_files&name={$f}>delete</a>");
continue;
}
$p = sandbox_physical_path($user, $md5);
if (!is_file($p)) {
table_row($f, "Physical file not found", "", "");
continue;
}
$ct = time_str(filemtime($path));
table_row("<a href=sandbox.php?action=view_file&name={$f}>{$f}</a>", $ct, $size, $md5, button_text("sandbox.php?action=delete_file&name={$f}", "Delete"), button_text("sandbox.php?action=download_file&name={$f}", "Download"));
}
end_table();
}
page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:47,代码来源:sandbox.php
示例19: 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 · <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 · <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
示例20: 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
注:本文中的page_tail函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论