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


PHP admin_page_tail函数代码示例

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


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

示例1: show_assigns

function show_assigns()
{
    admin_page_head("Assignments");
    $asgns = BoincAssignment::enum();
    if (count($asgns)) {
        start_table();
        table_header("Assignment ID/time", "target", "workunit", "result");
        foreach ($asgns as $asgn) {
            show_assign($asgn);
        }
        end_table();
    } else {
        echo "No assignments";
    }
    admin_page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:16,代码来源:assign.php

示例2: INSTR

$main_query = "\r\nSELECT\r\n\t   app_version_num AS App_Version,\r\n\t   hostid AS Host_ID,\r\n\t   case\r\n\t\t   when INSTR(host.os_name, 'Darwin') then 'Darwin'\r\n\t\t   when INSTR(host.os_name, 'Linux') then 'Linux'\r\n\t\t   when INSTR(host.os_name, 'Windows') then 'Windows'\r\n\t\t   when INSTR(host.os_name, 'SunOS') then 'SunOS'\r\n\t\t   when INSTR(host.os_name, 'Solaris') then 'Solaris'\r\n\t\t   when INSTR(host.os_name, 'Mac') then 'Mac'\r\n\t\t   else 'Unknown'\r\n\t   end AS OS_Name,\r\n\t   case\r\n\t\t   when INSTR(host.os_name, 'Linux') then \r\n\t\t\t   case\r\n\t\t\t\t   when INSTR(LEFT(host.os_version, 6), '-') then LEFT(host.os_version, (INSTR(LEFT(host.os_version, 6), '-') - 1))\r\n\t\t\t\t   else LEFT(host.os_version, 6)\r\n\t\t\t   end\r\n\t\t   else host.os_version\r\n\t   end AS OS_Version,\r\n\t   host.nresults_today AS Results_Today, \r\n\t   COUNT(*) AS error_count\r\nFROM   result\r\n\t\t   left join host on result.hostid = host.id \r\nWHERE\r\n\t   appid = '{$query_appid}' and\r\n\t   server_state = '5' and\r\n\t   outcome = '3' and \r\n\t   received_time > '{$query_received_time}'\r\nGROUP BY\r\n\t   app_version_num DESC,\r\n\t   hostid,\r\n\t   OS_Name,\r\n\t   OS_Version,\r\n\t   host.nresults_today\r\n";
$result = mysql_query($main_query);
echo "<table>\n";
echo "<tr><th>App Version</th><th>Host ID</th><th>OS Name</th><th>OS Version</th><th>Results Today</th><th>Error Count</th></tr>\n";
while ($res = mysql_fetch_object($result)) {
    echo "<tr>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->App_Version;
    echo "</td>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->Host_ID;
    echo "</td>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->OS_Name;
    echo "</td>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->OS_Version;
    echo "</td>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->Results_Today;
    echo "</td>";
    echo "<td align=\"left\" valign=\"top\">";
    echo $res->error_count;
    echo "</td>";
    echo "</tr>\n";
}
mysql_free_result($result);
echo "</table>\n";
admin_page_tail();
$cvs_version_tracker[] = "\$Id: failure_result_summary_by_host.php 15758 2008-08-05 22:43:14Z davea \$";
//Generated automatically - do not edit
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:failure_result_summary_by_host.php

示例3: clear

function clear()
{
    global $course_id;
    admin_page_head("Deleting course data");
    BoltEnrollment::delete_aux("course_id = {$course_id}");
    BoltView::delete_aux("course_id = {$course_id}");
    BoltResult::delete_aux("course_id = {$course_id}");
    BoltXsetResult::delete_aux("course_id = {$course_id}");
    BoltSelectFinished::delete_aux("course_id = {$course_id}");
    BoltRefreshRec::delete_aux("course_id = {$course_id}");
    BoltQuestion::delete_aux("course_id = {$course_id}");
    echo "\n\t\tCourse data deleted.\n\t";
    admin_page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:14,代码来源:bolt_admin.php

示例4: clear_batch

function clear_batch($batch_id)
{
    admin_page_head("Deleting instances");
    if (BossaJobInst::delete_aux("batch_id={$batch_id}")) {
        echo "Job instances deleted.";
        $jobs = BossaJob::enum("batch_id={$batch_id}");
        foreach ($jobs as $job) {
            $job->update("priority_0=1");
        }
    } else {
        echo "Database error.";
    }
    $jobs = BossaJob::enum("batch_id={$batch_id}");
    foreach ($jobs as $job) {
        $job->update("state=1");
    }
    admin_page_tail();
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:18,代码来源:bossa_admin.php

示例5: show_form

function show_form()
{
    admin_page_head("Revalidate jobs");
    echo "\n        This form lets you re-validate jobs.\n        Use this if you changed your validator to a more permissive policy,\n        and you want to rerun it on some jobs\n        (e.g. to grant credit to instances previously marked as invalid).\n        <p>\n        <form method=get action=revalidate.php>\n        <p>\n        Enter a SQL 'where' clause indicating which workunits\n        you want to revalidate\n        (e.g., <b>id >= 1000 and id < 2000</b>).\n        <p>\n        where <input name=clause size=60>\n        <p>\n        <input type=submit value=OK>\n        </form>\n    ";
    admin_page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:6,代码来源:revalidate.php

示例6: show_manage_user_form

function show_manage_user_form($user)
{
    global $special_user_bitfield;
    $Nbf = sizeof($special_user_bitfield);
    admin_page_head("Management {$user->name}");
    if (!defined("POST_REPORT_EMAILS")) {
        echo "<p><font color='RED'>\n       There is no administrative email address defined for reporting problems\n    or abuse in the forums.  Please define POST_REPORT_EMAILS in project.inc\n            </font></p>\n";
    }
    echo "<form name='manage_user' action=manage_user.php method='POST'>\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("<b>User: </b> {$user->name} <div align='right'>\n            <input name=\"delete_user\" type=\"submit\" value=\"Delete user\">\n            </div>");
    show_user_summary_public($user);
    show_profile_link_ops($user);
    row2("Email:", "{$user->email_addr}");
    project_user_summary($user);
    end_table();
    project_user_page_private($user);
    echo "</form>\n";
    // Special User status:
    echo "\n\n<P>\n       <table width='100%'><tr>\n       <td width='50%' valign='TOP'> \n";
    echo "<form name='special_user' action=manage_user.php method=\"POST\">\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("Special User Status");
    echo "<tr>\n";
    for ($i = 0; $i < $Nbf; $i++) {
        $bit = substr($user->prefs->special_user, $i, 1);
        echo "<tr><td><input type='checkbox'' name='special_user_" . $i . "' value='1'";
        if ($bit == 1) {
            echo " checked='checked'";
        }
        echo ">" . $special_user_bitfield[$i] . "</td></tr>\n";
    }
    echo "</tr>";
    echo "</tr><td colspan={$Nbf} align='RIGHT'>\n        <input name='special_user' type='SUBMIT' value='Update'>\n        </td></tr>\n    ";
    end_table();
    echo "</form>\n";
    echo "\n\n</td><td valign='TOP'>\n\n";
    // Suspended posting privileges
    echo "<form name='banishment' action=manage_user.php method=\"POST\">\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("Suspension");
    if ($user->prefs->banished_until) {
        $dt = $user->prefs->banished_until - time();
        if ($dt > 0) {
            $x = " Suspended until " . time_str($user->prefs->banished_until) . "<br/> (Expires in " . time_diff($dt) . ")";
        } else {
            $x = " last suspended " . time_str($user->prefs->banished_until);
        }
        row1($x);
    } else {
        $dt = 0;
    }
    echo "<tr><td>\n    Suspend user for:\n     <blockquote>\n            <input type='radio' name='suspend_for' value='3600'> 1 hour   <br/>\n            <input type='radio' name='suspend_for' value='7200'> 2 hours  <br/>\n            <input type='radio' name='suspend_for' value='18000'> 6 hours  <br/>\n            <input type='radio' name='suspend_for' value='36000'> 12 hours  <br/>\n            <input type='radio' name='suspend_for' value='86400'> 24 hours  <br/>\n    ";
    echo "\n        <input type='radio' name='suspend_for' value='172800'> 48 hours  <br/>\n        <input type='radio' name='suspend_for' value='", 86400 * 7, "'> 1 week  <br/>\n        <input type='radio' name='suspend_for' value='", 86400 * 14, "'> 2 weeks  <br/>\n    ";
    if ($dt > 0) {
        echo "\n            <input type='radio' name='suspend_for' value='-1'>  <b>unsuspend</b>   <br/>";
    }
    echo "\n     </blockquote>\n\n    ";
    echo "<P>Reason (required):\n";
    echo "<textarea name='suspend_reason' cols='40' rows='4'></textarea>";
    echo "<br><font size='-2' >The reason will be sent to both the user\n            and to the project administrators.</font>\n";
    echo "<p align='RIGHT'><input name='suspend_submit' type='SUBMIT' value='Update'></P>\n";
    echo " </td></tr>\n";
    end_table();
    echo "</form>\n";
    echo "</td></tr> </table>\n";
    admin_page_tail();
}
开发者ID:entibasse,项目名称:superhost,代码行数:68,代码来源:manage_user.php

示例7: show_form

function show_form($appid)
{
    admin_page_head("Show FLOPS distribution");
    echo "\n        <form method=get action=job_times.php>\n        <input type=hidden name=appid value={$appid}>\n    ";
    start_table();
    row2("App version:", version_select($appid));
    row2("Resolution:<br><span class=note>(if you see only one bar, use a smaller value)</span>", "<input name=quantum value=1e12>");
    row2("Sample size (# of jobs):", "<input name=nresults value=1000>");
    row2("", "<input type=submit name=submit value=OK>");
    end_table();
    echo "\n        </form>\n    ";
    admin_page_tail();
}
开发者ID:entibasse,项目名称:superhost,代码行数:13,代码来源:job_times.php

示例8: show_choice

function show_choice($top_unit)
{
    global $course_id;
    admin_page_head("Unit comparison");
    echo "\n\t\t<form action=bolt_compare.php>\n\t\t<input type=hidden name=course_id value={$course_id}>\n\t\tThis tool lets you compare alternative lessons.\n\t\tThese lessons must be included in a 'select' unit,\n\t\ttypically with a random selection function.\n\t\tThis must be followed by an exercise set\n\t\tthat tests for the concepts in the lessons.\n\t\t<p>\n\t\tPlease choose a select unit\n\t";
    choose_select($top_unit);
    echo "\n\t\tand an exercise set\n\t";
    choose_xset($top_unit);
    echo "\n\t\t<input type=hidden name=action value=snap_form>\n\t\t<p>\n\t\t<input type=submit value=OK>\n\t";
    admin_page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:11,代码来源:bolt_compare.php

示例9: show_form

function show_form($updated)
{
    admin_page_head("Manage Applications");
    if ($updated) {
        echo "Updates were done.\n            <p>\n            <b>You must stop and restart the project\n            for these changes to take effect</b>.\n        ";
    }
    $self = $_SERVER['PHP_SELF'];
    echo "\n        <h2>Edit applications</h2>\n        <form action='{$self}' method='POST'>\n    ";
    start_table();
    table_header("ID", "Name and description<br><span class=note>Click for details</span>", "Created", "weight<br><a href=http://boinc.berkeley.edu/trac/wiki/BackendPrograms#feeder><span class=note>details</span></a>", "homogeneous redundancy type<br><a href=http://boinc.berkeley.edu/trac/wiki/HomogeneousRedundancy><span class=note>details</span></a>", "homogeneous app version?<br><a href=http://boinc.berkeley.edu/trac/wiki/HomogeneousAppVersion><span class=note>details</span></a>", "deprecated?", "Non-CPU-intensive?");
    $total_weight = mysql_query('SELECT SUM(weight) AS total_weight FROM app WHERE deprecated=0');
    $total_weight = mysql_fetch_assoc($total_weight);
    $total_weight = $total_weight['total_weight'];
    $q = "SELECT * FROM app ORDER BY id";
    $result = mysql_query($q);
    $Nrow = mysql_num_rows($result);
    for ($j = 1; $j <= $Nrow; $j++) {
        $item = mysql_fetch_object($result);
        $id = $item->id;
        // grey-out deprecated versions
        $f1 = $f2 = '';
        if ($item->deprecated == 1) {
            $f1 = "<font color='GREY'>";
            $f2 = "</font>";
        }
        echo "<tr> ";
        echo "  <TD align='center'>{$f1} {$id} {$f2}</TD>\n";
        $name = $item->name;
        $full_name = $item->user_friendly_name;
        echo "  <TD align='left'>{$f1}<a href=app_details.php?appid={$id}>{$name}</a><br> {$full_name} {$f2}</TD>\n";
        $time = $item->create_time;
        echo "  <TD align='center'>{$f1} " . date_str($time) . "{$f2}</TD>\n";
        $field = "weight_" . $id;
        $v = $item->weight;
        echo "  <TD align='center'>\n        <input type='text' size='4' name='{$field}' value='{$v}'></TD>\n";
        $field = "homogeneous_redundancy_" . $id;
        $v = $item->homogeneous_redundancy;
        echo "  <TD align='center'>\n            <input name='{$field}' value='{$v}'></TD>\n        ";
        $field = "homogeneous_app_version_" . $id;
        $v = '';
        if ($item->homogeneous_app_version) {
            $v = ' CHECKED ';
        }
        echo "  <TD align='center'>\n            <input name='{$field}' type='checkbox' {$v}></TD>\n        ";
        $field = "deprecated_" . $id;
        $v = '';
        if ($item->deprecated) {
            $v = ' CHECKED ';
        }
        echo "  <TD align='center'>\n            <input name='{$field}' type='checkbox' {$v}></TD>\n        ";
        $field = "non_cpu_intensive_" . $id;
        $v = '';
        if ($item->non_cpu_intensive) {
            $v = ' CHECKED ';
        }
        echo "  <TD align='center'>\n            <input name='{$field}' type='checkbox' {$v}></TD>\n        ";
        echo "</tr> ";
    }
    mysql_free_result($result);
    echo "<tr><td colspan=7></td><td><input type='submit' name='update' value='Update'></td></tr>";
    end_table();
    // Entry form to create a new application
    //
    echo "<P>\n         <h2>Add an application</h2>\n      To add an application enter the short name and description\n      ('user friendly name') below.  You can then edit the\n      application when it appears in the table above.\n     </p>\n";
    start_table("align='center' ");
    echo "<TR><TH>Name</TH>\n              <TH>Description</TH>\n              <TH> &nbsp;   </TH>\n          </TR>\n";
    echo "<TR>\n            <TD> <input type='text' size='12' name='add_name' value=''></TD>\n            <TD> <input type='text' size='35' name='add_user_friendly_name' value=''></TD>\n            <TD align='center' >\n                 <input type='submit' name='add_app' value='Add Application'></TD>\n            </TR>\n";
    end_table();
    echo "</form><p>\n";
    admin_page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:71,代码来源:manage_apps.php

示例10: show_questions

function show_questions()
{
    global $course_id;
    $name = get_str('name');
    $mode = get_int('mode');
    get_filters_from_form();
    $snap = read_map_snapshot($course_id);
    $qs = $snap->questions[$name];
    admin_page_head("Questions about {$name}");
    start_table();
    echo "<tr>\n\t\t<th>When</th>\n\t\t<th>Who</th>\n\t\t<th>Question</th>\n\t\t</tr>\n\t";
    foreach ($qs as $q) {
        if ($q->mode != $mode) {
            continue;
        }
        $user = $snap->users[$q->user_id];
        echo "<tr>\n\t\t\t<td>" . time_str($q->create_time) . "</td>\n\t\t\t<td><a href=student>{$user->name}</td>\n\t\t\t<td>{$q->question}</td>\n\t\t\t</tr>\n\t\t";
    }
    end_table();
    admin_page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:21,代码来源:bolt_map.php


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