summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-24 19:33:15 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-24 19:33:15 +0000
commit9d08076018623e323faac5f2499304370d45f1ef (patch)
tree66ce90d34b389a2d9a69d33002f2968b16a8a826 /frontends/php/include
parent4ab66f7187844702e2abb62ea23e8d26af10d502 (diff)
downloadzabbix-9d08076018623e323faac5f2499304370d45f1ef.tar.gz
zabbix-9d08076018623e323faac5f2499304370d45f1ef.tar.xz
zabbix-9d08076018623e323faac5f2499304370d45f1ef.zip
- buttons "Activate selected" and "Disable selected" in item
maintenance form (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@861 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php16
-rw-r--r--frontends/php/include/defines.inc.php4
2 files changed, 20 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 27258313..bdc0ec97 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2084,6 +2084,22 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
return TRUE;
}
+ # Activate Item
+
+ function activate_item($itemid)
+ {
+ $sql="update items set status=".ITEM_STATUS_ACTIVE." where itemid=$itemid";
+ return DBexecute($sql);
+ }
+
+ # Disable Item
+
+ function disable_item($itemid)
+ {
+ $sql="update items set status=".ITEM_STATUS_DISABLED." where itemid=$itemid";
+ return DBexecute($sql);
+ }
+
# Delete Item definition
function delete_item($itemid)
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index cfc2f89e..fad2cbcf 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -1,4 +1,8 @@
<?php
+ define("ITEM_STATUS_ACTIVE",0);
+ define("ITEM_STATUS_DISABLED",1);
+ define("ITEM_STATUS_NOTSUPPORTED",3);
+
define("SERVICE_ALGORITHM_NONE",0);
define("SERVICE_ALGORITHM_MAX",1);
define("SERVICE_ALGORITHM_MIN",2);