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


PHP HTML_Table::AddRow方法代码示例

本文整理汇总了PHP中HTML_Table::AddRow方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Table::AddRow方法的具体用法?PHP HTML_Table::AddRow怎么用?PHP HTML_Table::AddRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_Table的用法示例。


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

示例1: die

if ($_GET['sortby'] == "date") {
    $sql = "SELECT `flmevent_date`,`flmevent_user`,MAX(`flmevent_feature`),count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_date`,`flmevent_user` ORDER BY `flmevent_date`,`flmevent_user`,`flmevent_feature` DESC;";
} else {
    if ($_GET['sortby'] == "user") {
        $sql = "SELECT `flmevent_date`,`flmevent_user`,MAX(`flmevent_feature`),count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_user`,`flmevent_date` ORDER BY `flmevent_user`,`flmevent_date`,`flmevent_feature` DESC;";
    } else {
        $sql = "SELECT `flmevent_date`,MAX(flmevent_user),`flmevent_feature`,count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_feature`,`flmevent_date` ORDER BY `flmevent_feature`,`flmevent_date`,`flmevent_user` DESC;";
    }
}
if (isset($debug) && $debug == 1) {
    print_sql($sql);
}
$recordset = $db->query($sql);
if (DB::isError($recordset)) {
    die($recordset->getMessage());
}
while ($row = $recordset->fetchRow()) {
    $table->AddRow($row, "style=\"background: " . $features_color[$row[2]] . ";\"");
}
$table->updateColAttributes(3, "align=\"center\"");
$recordset->free();
$db->disconnect();
################################################################
# Right align the 3 column
################################################################
$table->updateColAttributes(2, "align=\"right\"");
$table->display();
include './version.php';
?>
</body></html>
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:30,代码来源:checkouts.php

示例2: findServers

foreach ($types as $type) {
    $servers = findServers($type, "type");
    if (sizeof($servers) > 0) {
        $table->addRow(array(strtoupper($type) . " Servers"), $headerStyle, "TH");
        $table->setCellAttributes($table->getRowCount() - 1, 0, "colspan='" . $table->getColCount() . "'");
        for ($i = 0; $i < sizeof($servers); $i++) {
            $cur = current($servers);
            $status_array = getDetails($cur);
            # does this host contain a webui?
            # currently only RLM offers webui
            if (isset($cur["webui"])) {
                $host = "<a href=\"" . $cur["webui"] . "\">" . $cur["hostname"] . "</a>";
            } else {
                $host = $cur["hostname"];
            }
            $table->AddRow(array($host, $cur["desc"], strtoupper($status_array["status"]["service"]), $status_array["status"]["clients"], $status_array["status"]["listing"], $status_array["status"]["master"], $status_array["status"]["version"]));
            # Set the background color of status cell
            $table->updateCellAttributes($table->getRowCount() - 1, 2, "class='" . $status_array["status"]["service"] . "'");
            $table->updateCellAttributes(1, 0, "");
            # fetch status
            $statusMsg = AppendStatusMsg($statusMsg, $status_array["status"]["msg"]);
            # next!
            next($servers);
        }
    }
}
# Display the table
$table->display();
#footer
include_once 'version.php';
print "\n";
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:index.php


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