summaryrefslogtreecommitdiffstats
path: root/frontends/php/hostprofiles.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-03 10:03:54 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-03 10:03:54 +0000
commit26905a61d0cec458a04a971a6751e18a021d1c92 (patch)
tree5f601cc98feb07330cfc0ba280841929d1a042fe /frontends/php/hostprofiles.php
parentbebbe1e18bdd25e6f976f8a39a308e65728b957d (diff)
downloadzabbix-26905a61d0cec458a04a971a6751e18a021d1c92.tar.gz
zabbix-26905a61d0cec458a04a971a6751e18a021d1c92.tar.xz
zabbix-26905a61d0cec458a04a971a6751e18a021d1c92.zip
PHP code cleanup. Use of class Ctable.
git-svn-id: svn://svn.zabbix.com/trunk@2484 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hostprofiles.php')
-rw-r--r--frontends/php/hostprofiles.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/frontends/php/hostprofiles.php b/frontends/php/hostprofiles.php
index c231b22e..ee3d4fb3 100644
--- a/frontends/php/hostprofiles.php
+++ b/frontends/php/hostprofiles.php
@@ -116,13 +116,12 @@
}
else
{
- table_begin();
+ $table = new Ctable();
$header=array();
$header=array_merge($header,array(S_HOST,S_NAME,S_OS,S_SERIALNO,S_TAG,S_MACADDRESS));
- table_header($header);
+ $table->setHeader($header);
- $col=0;
if(isset($_REQUEST["groupid"])&&($_REQUEST["groupid"]!=0))
{
$sql="select h.hostid,h.host,p.name,p.os,p.serialno,p.tag,p.macaddress from hosts h,hosts_profiles p,hosts_groups hg where h.hostid=p.hostid and h.hostid=hg.hostid and hg.groupid=".$_REQUEST["groupid"]." order by h.host";
@@ -140,20 +139,16 @@
continue;
}
- table_row(array(
+ $table->addRow(array(
$row["host"],
$row["name"],
$row["os"],
$row["serialno"],
$row["tag"],
$row["macaddress"]
- ),
- $col++);
+ ));
}
-
-
- table_end();
- show_table_header_end();
+ $table->show();
}
?>