From 1ad5d81dff9ab714d1ca992c9a7344f192eeaa61 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Mon, 17 Jan 2005 19:07:17 +0000 Subject: - configurable format of icon labels for maps (Alexei) - added column sysmaps.label_type (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1615 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/sysmaps.php | 60 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'frontends/php/sysmaps.php') diff --git a/frontends/php/sysmaps.php b/frontends/php/sysmaps.php index 2f6d6f88..886658ae 100644 --- a/frontends/php/sysmaps.php +++ b/frontends/php/sysmaps.php @@ -40,12 +40,12 @@ { if($_GET["register"]=="add") { - $result=add_sysmap($_GET["name"],$_GET["width"],$_GET["height"],$_GET["background"]); + $result=add_sysmap($_GET["name"],$_GET["width"],$_GET["height"],$_GET["background"],$_GET["label_type"]); show_messages($result,"Network map added","Cannot add network map"); } if($_GET["register"]=="update") { - $result=update_sysmap($_GET["sysmapid"],$_GET["name"],$_GET["width"],$_GET["height"],$_GET["background"]); + $result=update_sysmap($_GET["sysmapid"],$_GET["name"],$_GET["width"],$_GET["height"],$_GET["background"],$_GET["label_type"]); show_messages($result,"Network map updated","Cannot update network map"); } if($_GET["register"]=="delete") @@ -98,11 +98,13 @@ if(isset($_GET["sysmapid"])) { - $result=DBselect("select s.sysmapid,s.name,s.width,s.height,s.background from sysmaps s where sysmapid=".$_GET["sysmapid"]); - $name=DBget_field($result,0,1); - $width=DBget_field($result,0,2); - $height=DBget_field($result,0,3); - $background=DBget_field($result,0,4); + $result=DBselect("select * from sysmaps where sysmapid=".$_GET["sysmapid"]); + $row=DBfetch($result); + $name=$row["name"]; + $width=$row["width"]; + $height=$row["height"]; + $background=$row["background"]; + $label_type=$row["label_type"]; } else { @@ -110,6 +112,7 @@ $width=800; $height=600; $background=""; + $label_type=0; } show_form_begin("sysmaps.map"); @@ -123,22 +126,22 @@ { echo ""; } - echo "Name"; + echo S_NAME; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter($col++); - echo "Width"; + echo S_WIDTH; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter($col++); - echo "Height"; + echo S_HEIGHT; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter($col++); - echo "Background image"; + echo S_BACKGROUND_IMAGE; show_table2_h_delimiter(); echo ""; + show_table2_v_delimiter($col++); + echo S_ICON_LABEL_TYPE; + show_table2_h_delimiter(); + echo ""; + show_table2_v_delimiter2(); echo ""; if(isset($_GET["sysmapid"])) -- cgit