summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/escalations.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-04 12:45:23 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-04 12:45:23 +0000
commit546e672bbc33aae643ff0ed08275db89da9bde31 (patch)
tree642923d9ac4467debb0dd2b3c2ad5bb3043bddb8 /frontends/php/include/escalations.inc.php
parent4aa6a1f2f879f2564386c713e3e601e3012db512 (diff)
downloadzabbix-546e672bbc33aae643ff0ed08275db89da9bde31.tar.gz
zabbix-546e672bbc33aae643ff0ed08275db89da9bde31.tar.xz
zabbix-546e672bbc33aae643ff0ed08275db89da9bde31.zip
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1815 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/escalations.inc.php')
-rw-r--r--frontends/php/include/escalations.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/frontends/php/include/escalations.inc.php b/frontends/php/include/escalations.inc.php
index 32c70e96..7f0576b8 100644
--- a/frontends/php/include/escalations.inc.php
+++ b/frontends/php/include/escalations.inc.php
@@ -101,4 +101,25 @@
return $result;
}
+
+ # Add escalation rule definition
+
+ function add_escalation_rule($escalationid,$level,$period,$delay,$actiontype)
+ {
+ if(!check_right("Configuration of Zabbix","U",0))
+ {
+ error("Insufficient permissions");
+ return 0;
+ }
+
+ $sql="insert into escalation_rules (escalationid,level,period,delay,actiontype) values ($escalationid,$level,'$period',$delay,$actiontype)";
+ $result=DBexecute($sql);
+ if(!$result)
+ {
+ return $result;
+ }
+ $escalationruleid=DBinsert_id($result,"escalation_rules","escalationruleid");
+
+ return $result;
+ }
?>