From 912e94abef222ad26380220fdb601e2b400ed849 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Tue, 28 Sep 2004 18:58:14 +0000 Subject: Frontend improvements. git-svn-id: svn://svn.zabbix.com/trunk@1441 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/sysmap.php | 101 ++++++++++++----------------------------------- 1 file changed, 26 insertions(+), 75 deletions(-) (limited to 'frontends/php/sysmap.php') diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index e17fce12..7f73d1f2 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -114,105 +114,56 @@ echo ""; show_table_header("DISPLAYED HOSTS"); - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + table_begin(); + table_header(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=".$_GET["sysmapid"]." and h.hostid=sh.hostid order by h.host"); $col=0; - for($i=0;$i"; - $col=0; - } else - { - echo ""; - $col=1; - } - - $host=DBget_field($result,$i,0); - $shostid_=DBget_field($result,$i,1); - $sysmapid_=DBget_field($result,$i,2); - $hostid_=DBget_field($result,$i,3); - $label_=DBget_field($result,$i,4); - $x_=DBget_field($result,$i,5); - $y_=DBget_field($result,$i,6); - $icon_=DBget_field($result,$i,7); - - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + table_row(array( + $row["host"], + $row["label"], + $row["x"], + $row["y"], + nbsp($row["icon"]), + "Change - Delete" + ),$col++); } - echo "
HostLabelXYIconActions
$host$label_$x_$y_".nbsp($icon_)."Change - Delete
"; + table_end(); ?> "; - echo ""; - echo "Host 1"; - echo "Host 2"; - echo "Link status indicator"; - echo "Actions"; - echo ""; + table_begin(); + table_header(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=".$_GET["sysmapid"]." order by linkid"); $col=0; - for($i=0;$i"; - $col=0; - } else - { - echo ""; - $col=1; - } - - $linkid=DBget_field($result,$i,0); - $shostid1=DBget_field($result,$i,1); - $shostid2=DBget_field($result,$i,2); - $triggerid=DBget_field($result,$i,3); - - $result1=DBselect("select label from sysmaps_hosts where shostid=$shostid1"); + $result1=DBselect("select label from sysmaps_hosts where shostid=".$row["shostid1"]); $label1=DBget_field($result1,0,0); - $result1=DBselect("select label from sysmaps_hosts where shostid=$shostid2"); + $result1=DBselect("select label from sysmaps_hosts where shostid=".$row["shostid2"]); $label2=DBget_field($result1,0,0); - if(isset($triggerid)) + if(isset($row["triggerid"])) { -// $trigger=get_trigger_by_triggerid($triggerid); -// $description=$trigger["description"]; -// if( strstr($description,"%s")) -// { - $description=expand_trigger_description($triggerid); -// } + $description=expand_trigger_description($row["triggerid"]); } else { $description="-"; } - echo "$label1"; - echo "$label2"; - echo "$description"; - echo "Delete"; - echo ""; + table_row(array( + $label1, + $label2, + $description, + "Delete" + ),$col++); } - echo ""; + table_end(); ?>