diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-08-10 06:08:27 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-08-10 06:08:27 +0000 |
| commit | daad3ceb2e48d4c8531281f8ca0c6d867199f6e6 (patch) | |
| tree | 103cd85c4509cbc47898ca8675a34a674ecbd21d /frontends/php/config.php | |
| parent | 98266eb6f38bc622c258e8fe6a9cf553cf657546 (diff) | |
Minor fixes.
git-svn-id: svn://svn.zabbix.com/trunk@888 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/config.php')
| -rw-r--r-- | frontends/php/config.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php index c799ff77..3339fc7b 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -136,7 +136,14 @@ ?> <?php - if(isset($HTTP_GET_VARS["mediatypeid"])) + $type=@iif(isset($HTTP_GET_VARS["type"]),$HTTP_GET_VARS["type"],0); + $description=@iif(isset($HTTP_GET_VARS["description"]),$HTTP_GET_VARS["description"],""); + $smtp_server=@iif(isset($HTTP_GET_VARS["smtp_server"]),$HTTP_GET_VARS["smtp_server"],"localhost"); + $smtp_helo=@iif(isset($HTTP_GET_VARS["smtp_helo"]),$HTTP_GET_VARS["smtp_helo"],"localhost"); + $smtp_email=@iif(isset($HTTP_GET_VARS["smtp_email"]),$HTTP_GET_VARS["smtp_email"],"zabbix@localhost"); + $exec_path=@iif(isset($HTTP_GET_VARS["exec_path"]),$HTTP_GET_VARS["exec_path"],""); + + if(isset($HTTP_GET_VARS["mediatypeid"]) && !isset($HTTP_GET_VARS["type"])) { $result=DBselect("select mediatypeid,type,description,smtp_server,smtp_helo,smtp_email,exec_path from media_type where mediatypeid=".$HTTP_GET_VARS["mediatypeid"]); $mediatypeid=DBget_field($result,0,0); @@ -147,15 +154,7 @@ $smtp_email=DBget_field($result,0,5); $exec_path=DBget_field($result,0,6); } - else - { - $type=@iif(isset($HTTP_GET_VARS["type"]),$HTTP_GET_VARS["type"],0); - $description=@iif(isset($HTTP_GET_VARS["description"]),$HTTP_GET_VARS["description"],""); - $smtp_server=@iif(isset($HTTP_GET_VARS["smtp_server"]),$HTTP_GET_VARS["smtp_server"],"localhost"); - $smtp_helo=@iif(isset($HTTP_GET_VARS["smtp_helo"]),$HTTP_GET_VARS["smtp_helo"],"localhost"); - $smtp_email=@iif(isset($HTTP_GET_VARS["smtp_email"]),$HTTP_GET_VARS["smtp_email"],"zabbix@localhost"); - $exec_path=@iif(isset($HTTP_GET_VARS["exec_path"]),$HTTP_GET_VARS["exec_path"],""); - } + ?> <?php |
