From 546e672bbc33aae643ff0ed08275db89da9bde31 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sat, 4 Jun 2005 12:45:23 +0000 Subject: Minor changes. git-svn-id: svn://svn.zabbix.com/trunk@1815 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/escalations.inc.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'frontends/php/include/escalations.inc.php') 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; + } ?> -- cgit