diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-08-29 07:20:50 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-08-29 07:20:50 +0000 |
| commit | e051f8e9cbe4475ef1e18a888100054575268d63 (patch) | |
| tree | 51c2f8bf137bf340ee52b351d34291678320ab67 /frontends/php/items.php | |
| parent | c447c7bdc5033fd351706a16ceddda7f0c505c3e (diff) | |
| download | zabbix-e051f8e9cbe4475ef1e18a888100054575268d63.tar.gz zabbix-e051f8e9cbe4475ef1e18a888100054575268d63.tar.xz zabbix-e051f8e9cbe4475ef1e18a888100054575268d63.zip | |
- group functions for item manipulations (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2005 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
| -rw-r--r-- | frontends/php/items.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php index 35e903e0..1c7b2bda 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -59,6 +59,28 @@ <?php if(isset($_GET["register"])) { + if($_GET["register"]=="do") + { + if($_GET["action"]=="add to group") + { + $itemid=add_item_to_group($_GET["groupid"],$_GET["description"],$_GET["key"],$_GET["hostid"],$_GET["delay"],$_GET["history"],$_GET["status"],$_GET["type"],$_GET["snmp_community"],$_GET["snmp_oid"],$_GET["value_type"],$_GET["trapper_hosts"],$_GET["snmp_port"],$_GET["units"],$_GET["multiplier"],$_GET["delta"],$_GET["snmpv3_securityname"],$_GET["snmpv3_securitylevel"],$_GET["snmpv3_authpassphrase"],$_GET["snmpv3_privpassphrase"],$_GET["formula"],$_GET["trends"]); + show_messages($itemid, S_ITEM_ADDED, S_CANNOT_ADD_ITEM); + unset($_GET["itemid"]); + unset($itemid); + } + if($_GET["action"]=="update in group") + { + $result=update_item_in_group($_GET["groupid"],$_GET["itemid"],$_GET["description"],$_GET["key"],$_GET["hostid"],$_GET["delay"],$_GET["history"],$_GET["status"],$_GET["type"],$_GET["snmp_community"],$_GET["snmp_oid"],$_GET["value_type"],$_GET["trapper_hosts"],$_GET["snmp_port"],$_GET["units"],$_GET["multiplier"],$_GET["delta"],$_GET["snmpv3_securityname"],$_GET["snmpv3_securitylevel"],$_GET["snmpv3_authpassphrase"],$_GET["snmpv3_privpassphrase"],$_GET["formula"],$_GET["trends"]); + show_messages($result, S_ITEM_UPDATED, S_CANNOT_UPDATE_ITEM); + unset($_GET["itemid"]); + } + if($_GET["action"]=="delete from group") + { + $result=delete_item_from_group($_GET["groupid"],$_GET["itemid"]); + show_messages($result, S_ITEM_DELETED, S_CANNOT_DELETE_ITEM); + unset($_GET["itemid"]); + } + } if($_GET["register"]=="update") { $result=update_item($_GET["itemid"],$_GET["description"],$_GET["key"],$_GET["hostid"],$_GET["delay"],$_GET["history"],$_GET["status"],$_GET["type"],$_GET["snmp_community"],$_GET["snmp_oid"],$_GET["value_type"],$_GET["trapper_hosts"],$_GET["snmp_port"],$_GET["units"],$_GET["multiplier"],$_GET["delta"],$_GET["snmpv3_securityname"],$_GET["snmpv3_securitylevel"],$_GET["snmpv3_authpassphrase"],$_GET["snmpv3_privpassphrase"],$_GET["formula"],$_GET["trends"]); @@ -105,7 +127,7 @@ delete_item_from_templates($_GET["itemid"]); $result=delete_item($_GET["itemid"]); show_messages($result, S_ITEM_DELETED, S_CANNOT_DELETE_ITEM); - unset($itemid); + unset($_GET["itemid"]); } if($_GET["register"]=="Delete selected") { |
