diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 16:16:07 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 16:16:07 +0000 |
commit | e3e3632751622ce56a891d98b3c4d19b336812ff (patch) | |
tree | 9759a9343d2224b8786d98f2eafb69f7c132fab6 /frontends/php/sysmap.php | |
parent | cf25f64f2acd722c391ecb8fff1ec4d058a27ff3 (diff) | |
download | zabbix-e3e3632751622ce56a891d98b3c4d19b336812ff.tar.gz zabbix-e3e3632751622ce56a891d98b3c4d19b336812ff.tar.xz zabbix-e3e3632751622ce56a891d98b3c4d19b336812ff.zip |
PHP code cleanup. Taking advantage of class Ctable.
git-svn-id: svn://svn.zabbix.com/trunk@2486 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r-- | frontends/php/sysmap.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 16fd870a..22e3e235 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -115,32 +115,30 @@ echo "</TABLE>"; show_table_header("DISPLAYED HOSTS"); - table_begin(); - table_header(array(S_HOST,S_LABEL,S_X,S_Y,S_ICON,S_ACTIONS)); + $table = new Ctable(); + $table->setHeader(array(S_HOST,S_LABEL,S_X,S_Y,S_ICON,S_ACTIONS)); $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,sh.icon from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_REQUEST["sysmapid"]." and h.status not in (".HOST_STATUS_DELETED.") and h.hostid=sh.hostid order by h.host"); - $col=0; while($row=DBfetch($result)) { - table_row(array( + $table->addRow(array( $row["host"], $row["label"], $row["x"], $row["y"], nbsp($row["icon"]), "<A HREF=\"sysmap.php?sysmapid=".$row["sysmapid"]."&shostid=".$row["shostid"]."#form\">Change</A> - <A HREF=\"sysmap.php?register=delete&sysmapid=".$row["sysmapid"]."&shostid=".$row["shostid"]."\">Delete</A>" - ),$col++); + )); } - table_end(); + $table->show(); ?> <?php show_table_header("CONNECTORS"); - table_begin(); - table_header(array(S_HOST_1,S_HOST_2,S_LINK_STATUS_INDICATOR,S_ACTIONS)); + $table = new Ctable(); + $table->setHeader(array(S_HOST_1,S_HOST_2,S_LINK_STATUS_INDICATOR,S_ACTIONS)); $result=DBselect("select linkid,shostid1,shostid2,triggerid from sysmaps_links where sysmapid=".$_REQUEST["sysmapid"]." order by linkid"); - $col=0; while($row=DBfetch($result)) { $result1=DBselect("select label from sysmaps_hosts where shostid=".$row["shostid1"]); @@ -159,14 +157,14 @@ $description="-"; } - table_row(array( + $table->addRow(array( $label1, $label2, $description, "<A HREF=\"sysmap.php?sysmapid=".$_REQUEST["sysmapid"]."®ister=delete_link&linkid=".$row["linkid"]."\">Delete</A>" - ),$col++); + )); } - table_end(); + $table->show(); ?> <?php |