diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 12:45:23 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 12:45:23 +0000 |
| commit | 546e672bbc33aae643ff0ed08275db89da9bde31 (patch) | |
| tree | 642923d9ac4467debb0dd2b3c2ad5bb3043bddb8 /frontends/php/include/forms.inc.php | |
| parent | 4aa6a1f2f879f2564386c713e3e601e3012db512 (diff) | |
| download | zabbix-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/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index f25fd897..80a3253a 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -1110,4 +1110,76 @@ show_table2_header_end(); } + + # Insert escalation rule form + function insert_escalation_rule_form($escalationid,$escalationruleid) + { + if(isset($escalationruleid)) + { + $result=DBselect("select * from escalation_rules where escalationruleid=$escalationruleid"); + + $row=DBfetch($result); + + $level=$row["level"]; + $period=$row["period"]; + $delay=$row["delay"]; + $actiontype=$row["actiontype"]; + } + else + { + $level=1; + $period="1-7,00:00-23:59"; + $delay=0; + $actiontype=0; + } + + $col=0; + + show_form_begin("escalationrule"); + echo S_ESCALATION_RULE; + + show_table2_v_delimiter($col++); + echo "<form method=\"get\" action=\"config.php\">"; + echo "<input class=\"biginput\" name=\"config\" type=\"hidden\" value=\"".$_GET["config"]."\" size=8>"; + echo "<input class=\"biginput\" name=\"escalationid\" type=\"hidden\" value=\"$escalationid\" size=8>"; + if(isset($escalationruleid)) + { + echo "<input class=\"biginput\" name=\"escalationruleid\" type=\"hidden\" value=\"$escalationruleid\" size=8>"; + } + + echo S_LEVEL; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"level\" size=2 value=\"$level\">"; + + show_table2_v_delimiter($col++); + echo S_PERIOD; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"period\" size=32 value=\"$period\">"; + + show_table2_v_delimiter($col++); + echo S_DELAY; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"delay\" size=32 value=\"$delay\">"; + + show_table2_v_delimiter($col++); + echo S_ACTION; + show_table2_h_delimiter(); + echo "<SELECT class=\"biginput\" NAME=\"actiontype\" size=\"1\">"; + echo "<OPTION VALUE=\"0\" "; if($actiontype==0) echo "SELECTED"; echo ">Do nothing"; + echo "<OPTION VALUE=\"1\" "; if($actiontype==1) echo "SELECTED"; echo ">Execute actions"; + echo "<OPTION VALUE=\"2\" "; if($actiontype==2) echo "SELECTED"; echo ">Increase severity"; + echo "<OPTION VALUE=\"3\" "; if($actiontype==3) echo "SELECTED"; echo ">Increase administrative hierarcy"; + echo "</SELECT>"; + + + show_table2_v_delimiter2($col++); + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"add rule\">"; + if(isset($escalationid)) + { + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update rule\">"; + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"delete rule\" onClick=\"return Confirm('Delete selected escalation rule?');\">"; + } + + show_table2_header_end(); + } ?> |
