diff options
Diffstat (limited to 'frontends/php/include/escalations.inc.php')
| -rw-r--r-- | frontends/php/include/escalations.inc.php | 21 |
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; + } ?> |
