diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-27 13:28:14 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-27 13:28:14 +0000 |
| commit | ffce4b50729fa5ee0e11a666fb0ee4b76eebf342 (patch) | |
| tree | eaf9fe556248da6ca281ce8336f35d46bc45eb40 /frontends/php/actionconf.php | |
| parent | e6d3bc1a6eae3d6847198856e7e7f57eb8a0c98b (diff) | |
| download | zabbix-ffce4b50729fa5ee0e11a666fb0ee4b76eebf342.tar.gz zabbix-ffce4b50729fa5ee0e11a666fb0ee4b76eebf342.tar.xz zabbix-ffce4b50729fa5ee0e11a666fb0ee4b76eebf342.zip | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2431 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actionconf.php')
| -rw-r--r-- | frontends/php/actionconf.php | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php index 4bef6d5c..06e4737d 100644 --- a/frontends/php/actionconf.php +++ b/frontends/php/actionconf.php @@ -47,8 +47,15 @@ $_REQUEST["repeatdelay"]=600; } - $actionid=add_action( $_REQUEST["filter_triggerid"], $_REQUEST["userid"], $_REQUEST["good"], $_REQUEST["delay"], $_REQUEST["subject"], $_REQUEST["message"],$_REQUEST["severity"],$_REQUEST["recipient"],$_REQUEST["usrgrpid"],$_REQUEST["maxrepeats"],$_REQUEST["repeatdelay"]); - add_action_to_linked_hosts($actionid); + $actionid=add_action($_REQUEST["userid"], $_REQUEST["good"], $_REQUEST["delay"], $_REQUEST["subject"], $_REQUEST["message"],$_REQUEST["recipient"],$_REQUEST["usrgrpid"],$_REQUEST["maxrepeats"],$_REQUEST["repeatdelay"]); +// add_action_to_linked_hosts($actionid); + for($i=1;$i<=1000;$i++) + { + if(isset($_REQUEST["conditiontype$i"])) + { + add_action_condition($actionid,$_REQUEST["conditiontype$i"], $_REQUEST["conditionop$i"], $_REQUEST["conditionvalue$i"]); + } + } show_messages($actionid,S_ACTION_ADDED,S_CANNOT_ADD_ACTION); if($actionid) { @@ -101,6 +108,32 @@ } unset($_REQUEST["actionid"]); } + if($_REQUEST["register"]=="add condition") + { + for($i=1;$i<=1000;$i++) + { + if(!isset($_REQUEST["conditiontype$i"])) + { + $num=$i; + break; + } + } + $_REQUEST["conditionop$num"]=$_REQUEST["operator"]; + $_REQUEST["conditiontype$num"]=$_REQUEST["conditiontype"]; + $_REQUEST["conditionvalue$num"]=$_REQUEST["value"]; + } + if($_REQUEST["register"]=="delete selected") + { + for($i=1;$i<=1000;$i++) + { + if(isset($_REQUEST["conditionchecked$i"])) + { + unset($_REQUEST["conditionop$i"]); + unset($_REQUEST["conditiontype$i"]); + unset($_REQUEST["conditionvalue$i"]); + } + } + } } ?> |
