summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-06-22 20:20:43 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-06-22 20:20:43 +0000
commit15377955b388639cbfdcbbe684e09f2bde30cafa (patch)
treedfe3bb8d62fb51ee9756456ebc48b377310f1efd /frontends/php
parentcbe4739969d86c162f2815b2913de514716d5d8b (diff)
downloadzabbix-15377955b388639cbfdcbbe684e09f2bde30cafa.tar.gz
zabbix-15377955b388639cbfdcbbe684e09f2bde30cafa.tar.xz
zabbix-15377955b388639cbfdcbbe684e09f2bde30cafa.zip
Support for table sysmaps.
git-svn-id: svn://svn.zabbix.com/trunk@104 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/include/config.inc32
-rw-r--r--frontends/php/sysmaps.html93
2 files changed, 125 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc
index 7a786647..ad2c4fdc 100644
--- a/frontends/php/include/config.inc
+++ b/frontends/php/include/config.inc
@@ -414,6 +414,22 @@
?>
</font>
</td>
+ <td colspan=1 bgcolor=FFFFFF align=center valign="top" width="15%">
+ <font face="Arial,Helvetica" size=2>
+ <a href="sysmaps.html">
+<?
+ if( ($page["file"]=="sysmaps.html")||
+ ($page["file"]=="<change>.html"))
+ {
+ echo "<b>[SYSTEM MAPS]</b></a>";
+ }
+ else
+ {
+ echo "SYSTEM MAPS</a>";
+ }
+?>
+ </font>
+ </td>
</tr>
</table>
</td>
@@ -643,6 +659,14 @@
$result=DBexecute($sql);
}
+ # Delete System Map
+
+ function delete_sysmap( $sysmapid )
+ {
+ $sql="delete from sysmaps where sysmapid=$sysmapid";
+ $result=DBexecute($sql);
+ }
+
# Delete Action by userid
function delete_actions_by_userid( $userid )
@@ -831,6 +855,14 @@
}
}
+ # Add System Map
+
+ function add_sysmap($name,$width,$height)
+ {
+ $sql="insert into sysmaps (name,width,height) values ('$name',$width,$height)";
+ $result=DBexecute($sql);
+ }
+
# Add Host definition
function add_host($host,$port,$status)
diff --git a/frontends/php/sysmaps.html b/frontends/php/sysmaps.html
new file mode 100644
index 00000000..ed105bc9
--- /dev/null
+++ b/frontends/php/sysmaps.html
@@ -0,0 +1,93 @@
+<?
+ include "include/config.inc";
+ $page["title"] = "System maps";
+ $page["file"] = "sysmaps.html";
+ show_header($page["title"],0);
+?>
+
+<?
+ show_table_header("CONFIGURATION OF SYSTEM MAPS");
+ echo "<br>";
+?>
+
+<?
+ if(isset($register))
+ {
+ if($register=="add")
+ {
+ add_sysmap($name,$width,$height);
+ }
+ if($register=="delete")
+ {
+ delete_sysmap($sysmapid);
+ }
+ }
+?>
+
+<?
+ show_table_header("SYSTEM MAPS");
+ echo "<TABLE BORDER=0 COLS=4 WIDTH=\"100%\" BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
+ echo "<TD WIDTH=\"10%\" NOSAVE><B>Name</B></TD>";
+ echo "<TD WIDTH=\"10%\" NOSAVE><B>Width</B></TD>";
+ echo "<TD WIDTH=\"10%\" NOSAVE><B>Height</B></TD>";
+ echo "<TD WIDTH=\"10%\" NOSAVE><B>Actions</B></TD>";
+ echo "</TR>";
+
+ $result=DBselect("select s.sysmapid,s.name,s.width,s.height from sysmaps s order by s.name");
+ echo "<CENTER>";
+ $col=0;
+ for($i=0;$i<DBnum_rows($result);$i++)
+ {
+ if($col==1)
+ {
+ echo "<TR BGCOLOR=#EEEEEE>";
+ $col=0;
+ } else
+ {
+ echo "<TR BGCOLOR=#DDDDDD>";
+ $col=1;
+ }
+
+ $sysmapid=DBget_field($result,$i,0);
+ $name=DBget_field($result,$i,1);
+ $width=DBget_field($result,$i,2);
+ $height=DBget_field($result,$i,3);
+ echo "<TD><a href=\"sysmaps.html?sysmapid=$sysmapid\">$name</a></TD>";
+ echo "<TD>$width</TD>";
+ echo "<TD>$height</TD>";
+ echo "<TD><A HREF=\"sysmaps.html?register=delete&sysmapid=$sysmapid\">Delete</A></TD>";
+ echo "</TR>";
+ }
+ echo "</TABLE>";
+?>
+
+<?
+ echo "<br>";
+ show_table2_header_begin();
+ echo "New system map";
+
+ show_table2_v_delimiter();
+ echo "<form method=\"post\" action=\"sysmaps.html\">";
+ echo "Name";
+ show_table2_h_delimiter();
+ echo "<input name=\"name\" size=20>";
+
+ show_table2_v_delimiter();
+ echo "Width";
+ show_table2_h_delimiter();
+ echo "<input name=\"width\" size=5 value=\"800\">";
+
+ show_table2_v_delimiter();
+ echo "Height";
+ show_table2_h_delimiter();
+ echo "<input name=\"height\" size=5 value=\"600\">";
+
+ show_table2_v_delimiter2();
+ echo "<input type=\"submit\" name=\"register\" value=\"add\">";
+
+ show_table2_header_end();
+?>
+
+<?
+ show_footer();
+?>