summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.html
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-08-11 19:30:44 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-08-11 19:30:44 +0000
commitcf2559acb311684a357fe7babdeebab265a3e820 (patch)
tree608f474b1d2dea77e830447916c5a2f302b79826 /frontends/php/items.html
parent6861ee9f6bbe77fc150813eb7d7e15856ace7779 (diff)
Error handling in PHP frontend.
git-svn-id: svn://svn.zabbix.com/trunk@164 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.html')
-rw-r--r--frontends/php/items.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/frontends/php/items.html b/frontends/php/items.html
index e9dad0a7..3c831786 100644
--- a/frontends/php/items.html
+++ b/frontends/php/items.html
@@ -11,19 +11,23 @@
{
if($register=="update")
{
- update_item($itemid,$description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid);
+ $result=update_item($itemid,$description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid);
+ show_messages($result,"Item updated","Cannot update item");
}
if($register=="changestatus")
{
- update_item_status($itemid,$status);
+ $result=update_item_status($itemid,$status);
+ show_messages($result,"Status of item changed","Cannot change item status");
}
if($register=="add")
{
- add_item($description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid);
+ $result=add_item($description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid);
+ show_messages($result,"Item added","Cannot add item");
}
if($register=="delete")
{
- delete_item($itemid);
+ $result=delete_item($itemid);
+ show_messages($result,"Item deleted","Cannot delete item");
unset($itemid);
}
}