summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-03-23 09:21:41 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-03-23 09:21:41 +0000
commitdaa5481f0be02ef2aafba98cb9b8cd80a3ec5387 (patch)
tree449477321d479805a2da303d49018febe27a0277 /frontends/php/include/config.inc.php
parentc5fe18e5fcf909aee06437c7a89a2adcc2a25bd0 (diff)
downloadzabbix-daa5481f0be02ef2aafba98cb9b8cd80a3ec5387.tar.gz
zabbix-daa5481f0be02ef2aafba98cb9b8cd80a3ec5387.tar.xz
zabbix-daa5481f0be02ef2aafba98cb9b8cd80a3ec5387.zip
Support for screen builder. Thanks to Arturs Aboltins. (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@714 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 24b5de9e..d9cd38cd 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -3912,4 +3912,63 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
}
+
+ function add_screen($name,$cols,$rows)
+ {
+ global $ERROR_MSG;
+
+ if(!check_right("Screen","A",0))
+ {
+ $ERROR_MSG="Insufficient permissions";
+ return 0;
+ }
+
+ $sql="insert into screens (name,cols,rows) values ('$name',$cols,$rows)";
+ return DBexecute($sql);
+ }
+
+ function update_screen($scid,$name,$cols,$rows)
+ {
+ global $ERROR_MSG;
+
+ if(!check_right("Screen","U",0))
+ {
+ $ERROR_MSG="Insufficient permissions";
+ return 0;
+ }
+
+ $sql="update screens set name='$name',cols=$cols,rows=$rows where scid=$scid";
+ return DBexecute($sql);
+ }
+
+ function delete_screen($scid)
+ {
+ $sql="delete from screens_items where scid=$scid";
+ $result=DBexecute($sql);
+ if(!$result)
+ {
+ return $result;
+ }
+ $sql="delete from screens where scid=$scid";
+ return DBexecute($sql);
+ }
+
+ function add_screen_item($scid,$x,$y,$graphid,$width,$height)
+ {
+ $sql="insert into screens_items (scid,x,y,graphid,width,height) values ($scid,$x,$y,$graphid,$width,$height)";
+ return DBexecute($sql);
+ }
+
+ function update_screen_item($scitemid,$graphid,$width,$height)
+ {
+ $sql="update screens_items set graphid=$graphid,width=$width,height=$height where scitemid=$scitemid";
+ return DBexecute($sql);
+ }
+
+
+ function delete_screen_item($scitemid)
+ {
+ $sql="delete from screens_items where scitemid=$scitemid";
+ return DBexecute($sql);
+ }
?>