本文整理汇总了PHP中HTML_Table::getColCount方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Table::getColCount方法的具体用法?PHP HTML_Table::getColCount怎么用?PHP HTML_Table::getColCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Table
的用法示例。
在下文中一共展示了HTML_Table::getColCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$colHeaders = array("License Server", "Description", "Status", "Current Usage", "Available features/license", "Master", "Version");
$table->addRow($colHeaders, $headerStyle, "TH");
# set width on description col
$table->setColAttributes(1, "width=\"180\"");
# grab all the different server types
foreach ($server as $host) {
$type[] = $host['type'];
}
# return only unique types
$types = array_unique($type);
# loop thru each unique type and make up status table
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