diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 18:46:41 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 18:46:41 +0000 |
commit | 804a1b0eb7096d491f997fcafc4c545d9498618f (patch) | |
tree | ce471010ab8e105c3ba4ec55e366c949bef1f1fe /frontends/php/include | |
parent | 546e672bbc33aae643ff0ed08275db89da9bde31 (diff) | |
download | zabbix-804a1b0eb7096d491f997fcafc4c545d9498618f.tar.gz zabbix-804a1b0eb7096d491f997fcafc4c545d9498618f.tar.xz zabbix-804a1b0eb7096d491f997fcafc4c545d9498618f.zip |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1816 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r-- | frontends/php/include/escalations.inc.php | 35 | ||||
-rw-r--r-- | frontends/php/include/forms.inc.php | 8 | ||||
-rw-r--r-- | frontends/php/include/html.inc.php | 5 | ||||
-rw-r--r-- | frontends/php/include/local_en.inc.php | 6 |
4 files changed, 50 insertions, 4 deletions
diff --git a/frontends/php/include/escalations.inc.php b/frontends/php/include/escalations.inc.php index 7f0576b8..3879d825 100644 --- a/frontends/php/include/escalations.inc.php +++ b/frontends/php/include/escalations.inc.php @@ -122,4 +122,39 @@ return $result; } + + # Update escalation rule definition + + function update_escalation_rule($escalationruleid,$level,$period,$delay,$actiontype) + { + if(!check_right("Configuration of Zabbix","U",0)) + { + error("Insufficient permissions"); + return 0; + } + + $sql="update escalation_rules set level=$level,period='$period',delay=$delay,actiontype=$actiontype where escalationruleid=$escalationruleid"; + $result=DBexecute($sql); + return $result; + } + + # Delete escalation rule definition + + function delete_escalation_rule($escalationruleid) + { + if(!check_right("Configuration of Zabbix","U",0)) + { + error("Insufficient permissions"); + return 0; + } + + $sql="delete from escalation_rules where escalationruleid=$escalationruleid"; + $result=DBexecute($sql); + if(!$result) + { + return $result; + } + + return $result; + } ?> diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index 80a3253a..fcb3b675 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -1149,20 +1149,20 @@ echo S_LEVEL; show_table2_h_delimiter(); - echo "<input class=\"biginput\" name=\"level\" size=2 value=\"$level\">"; + echo form_input("level",$level,2); show_table2_v_delimiter($col++); echo S_PERIOD; show_table2_h_delimiter(); - echo "<input class=\"biginput\" name=\"period\" size=32 value=\"$period\">"; + echo form_input("period",$period,32); show_table2_v_delimiter($col++); echo S_DELAY; show_table2_h_delimiter(); - echo "<input class=\"biginput\" name=\"delay\" size=32 value=\"$delay\">"; + echo form_input("delay",$delay,32); show_table2_v_delimiter($col++); - echo S_ACTION; + echo S_DO; show_table2_h_delimiter(); echo "<SELECT class=\"biginput\" NAME=\"actiontype\" size=\"1\">"; echo "<OPTION VALUE=\"0\" "; if($actiontype==0) echo "SELECTED"; echo ">Do nothing"; diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php index 1ddd76b6..c636cf84 100644 --- a/frontends/php/include/html.inc.php +++ b/frontends/php/include/html.inc.php @@ -31,6 +31,11 @@ return "<option value=\"$value\" ".iif(isset($_GET[$var])&&$_GET[$var]==$value,"selected","").">$label"; } + function form_input($name, $value, $size) + { + return "<input class=\"biginput\" name=\"$name\" size=$size value=\"$value\">"; + } + function url1_param($parameter) { global $_GET; diff --git a/frontends/php/include/local_en.inc.php b/frontends/php/include/local_en.inc.php index 1b100c33..32309800 100644 --- a/frontends/php/include/local_en.inc.php +++ b/frontends/php/include/local_en.inc.php @@ -173,10 +173,16 @@ define("S_ESCALATION_WAS_NOT_ADDED", "Escalation was not added"); define("S_ESCALATION_RULE_ADDED", "Escalation rule added"); define("S_ESCALATION_RULE_WAS_NOT_ADDED", "Escalation rule was not added"); + define("S_ESCALATION_RULE_UPDATED", "Escalation rule updated"); + define("S_ESCALATION_RULE_WAS_NOT_UPDATED", "Escalation rule was not updated"); + define("S_ESCALATION_RULE_DELETED", "Escalation rule deleted"); + define("S_ESCALATION_RULE_WAS_NOT_DELETED", "Escalation rule was not deleted"); define("S_ESCALATION_UPDATED", "Escalation updated"); define("S_ESCALATION_WAS_NOT_UPDATED", "Escalation was not updated"); define("S_ESCALATION_DELETED", "Escalation deleted"); define("S_ESCALATION_WAS_NOT_DELETED", "Escalation was not deleted"); + define("S_ESCALATION_RULE", "Escalation rule"); + define("S_DO", "Do"); define("S_DEFAULT", "Default"); define("S_IS_DEFAULT", "Is default"); define("S_LEVEL", "Level"); |