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


PHP show_summary函数代码示例

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


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

示例1: show_computer_summary

function show_computer_summary($computer)
{
    global $l;
    $urls = $_SESSION['OCS']['url_service'];
    $labels = array('SYSTEM' => array('USERID' => $l->g(24), 'OSNAME' => $l->g(274), 'OSVERSION' => $l->g(275), 'OSCOMMENTS' => $l->g(286), 'DESCRIPTION' => $l->g(53), 'WINCOMPANY' => $l->g(51), 'WINOWNER' => $l->g(348), 'WINPRODID' => $l->g(111), 'WINPRODKEY' => $l->g(553), 'VMTYPE' => $l->g(1267)), 'NETWORK' => array('WORKGROUP' => $l->g(33), 'USERDOMAIN' => $l->g(557), 'IPADDR' => $l->g(34), 'NAME_RZ' => $l->g(304)), 'HARDWARE' => array('SWAP' => $l->g(50), 'MEMORY' => $l->g(26), 'UUID' => $l->g(1268), 'ARCH' => $l->g(1247)), 'AGENT' => array('USERAGENT' => $l->g(357), 'LASTDATE' => $l->g(46), 'LASTCOME' => $l->g(820)));
    $cat_labels = array('SYSTEM' => $l->g(1387), 'NETWORK' => $l->g(1388), 'HARDWARE' => $l->g(1389), 'AGENT' => $l->g(1390));
    foreach ($labels as $cat_key => $cat) {
        foreach ($cat as $key => $lbl) {
            if ($key == "MEMORY") {
                $sqlMem = "SELECT SUM(capacity) AS 'capa' FROM memories WHERE hardware_id=%s";
                $argMem = $computer->ID;
                $resMem = mysql2_query_secure($sqlMem, $_SESSION['OCS']["readServer"], $argMem);
                $valMem = mysqli_fetch_array($resMem);
                if ($valMem["capa"] > 0) {
                    $memory = $valMem["capa"];
                } else {
                    $memory = $computer->{$key};
                }
                $data[$key] = $memory;
            } elseif ($key == "LASTDATE" or $key == "LASTCOME") {
                $data[$key] = dateTimeFromMysql($computer->{$key});
            } elseif ($key == "NAME_RZ") {
                $data[$key] = "";
                $data_RZ = subnet_name($computer->ID);
                $nb_val = count($data_RZ);
                if ($nb_val == 1) {
                    $data[$key] = $data_RZ[0];
                } elseif (isset($data_RZ)) {
                    foreach ($data_RZ as $index => $value) {
                        $data[$key] .= $index . " => " . $value . "<br>";
                    }
                }
            } elseif ($key == "VMTYPE" and $computer->UUID != '') {
                $sqlVM = "select vm.hardware_id,vm.vmtype, h.name from virtualmachines vm left join hardware h on vm.hardware_id=h.id where vm.uuid='%s' order by h.name DESC";
                $argVM = $computer->UUID;
                $resVM = mysql2_query_secure($sqlVM, $_SESSION['OCS']["readServer"], $argVM);
                $valVM = mysqli_fetch_array($resVM);
                $data[$key] = $valVM['vmtype'];
                $link_vm = "<a href='index.php?" . PAG_INDEX . "=" . $urls->getUrl('ms_computer') . "&head=1&systemid=" . $valVM['hardware_id'] . "'  target='_blank'><font color=red>" . $valVM['name'] . "</font></a>";
                $link[$key] = true;
                if ($data[$key] != '') {
                    msg_info($l->g(1266) . "<br>" . $l->g(1269) . ': ' . $link_vm);
                }
            } elseif ($key == "IPADDR" and $_SESSION['OCS']['profile']->getRestriction('WOL', 'NO') == "NO") {
                $data[$key] = $computer->{$key} . " <a href=# OnClick='confirme(\"\",\"WOL\",\"bandeau\",\"WOL\",\"" . $l->g(1283) . "\");'><i>WOL</i></a>";
                $link[$key] = true;
            } elseif ($computer->{$key} != '') {
                $data[$key] = $computer->{$key};
            }
        }
    }
    echo open_form("bandeau");
    show_summary($data, $labels, $cat_labels, $link);
    echo "<input type='hidden' id='WOL' name='WOL' value=''>";
    echo close_form();
}
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:56,代码来源:ms_computer_views.php

示例2: show_start

show_start($start_time);
$test_cnt = count($test_files);
$test_idx = 0;
run_all_tests($test_files, $environment);
$end_time = time();
if ($failed_tests_file) {
    fclose($failed_tests_file);
}
// Summarize results
if (0 == count($test_results)) {
    echo "No tests were run.\n";
    return;
}
compute_summary();
show_end($end_time);
show_summary();
if ($html_output) {
    fclose($html_file);
}
save_or_mail_results();
if (getenv('REPORT_EXIT_STATUS') == 1 and $sum_results['FAILED']) {
    exit(1);
}
exit(0);
//
// Send Email to QA Team
//
function mail_qa_team($data, $compression, $status = false)
{
    $url_bits = parse_url(QA_SUBMISSION_PAGE);
    if (empty($url_bits['port'])) {
开发者ID:wgy0323,项目名称:ffmpeg-php,代码行数:31,代码来源:run-tests.php

示例3: getopt

$options = getopt('f:hi:');
if (isset($options['h'])) {
    help();
    exit;
}
if (!empty($options['f'])) {
    $csv_file = $options['f'];
    if (preg_match('/[.]csv$/i', $csv_file) <= 0) {
        $csv_file .= '.csv';
    }
}
if (!empty($options['i']) && is_numeric($options['i'])) {
    $base = $options['i'];
}
if ($base < MIN_BASE) {
    die('Min iterations = ' . MIN_BASE . "\n");
}
if (empty($options)) {
    help();
}
echo 'Starting the benchmark with ' . $base . ' iterations.' . "\n\n";
$tests_list = array();
$results = array();
if (load_tests($TESTS_DIRS, $tests_list) === FALSE) {
    die('Unable to load tests');
}
echo "\n";
do_tests($base, $tests_list, $results);
echo "\n";
show_summary($base, $results, $csv_file);
echo "\n";
开发者ID:michaelprem,项目名称:phc,代码行数:31,代码来源:phpbench.php


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