本文整理汇总了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>
示例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";