summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-14 11:01:08 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-14 11:01:08 +0000
commitc86a9791f2b5d097f011d41899009fb0946ce0bc (patch)
tree84a6a253428e88b58128f613f2f64f03d74adc48 /frontends/php/include/forms.inc.php
parent2d62dcd5944deea452509ee5a1067c34a0a4733d (diff)
downloadzabbix-c86a9791f2b5d097f011d41899009fb0946ce0bc.tar.gz
zabbix-c86a9791f2b5d097f011d41899009fb0946ce0bc.tar.xz
zabbix-c86a9791f2b5d097f011d41899009fb0946ce0bc.zip
- developed configuration of Jabber messaging (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3826 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index d37405c2..ce9aa963 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -2828,11 +2828,12 @@
$smtp_email = get_request("smtp_email","zabbix@localhost");
$exec_path = get_request("exec_path","");
$gsm_modem = get_request("gsm_modem","/dev/ttyS0");
+ $username = get_request("username","user@server");
+ $password = get_request("password","");
if(isset($_REQUEST["mediatypeid"]) && !isset($_REQUEST["form_refresh"]))
{
- $result = DBselect("select mediatypeid,type,description,smtp_server,smtp_helo,smtp_email,exec_path,gsm_modem ".
- "from media_type where mediatypeid=".$_REQUEST["mediatypeid"]);
+ $result = DBselect("select * from media_type where mediatypeid=".$_REQUEST["mediatypeid"]);
$row = DBfetch($result);
$mediatypeid = $row["mediatypeid"];
@@ -2843,6 +2844,8 @@
$smtp_email = $row["smtp_email"];
$exec_path = $row["exec_path"];
$gsm_modem = $row["gsm_modem"];
+ $username = $row["username"];
+ $password = $row["passwd"];
}
$frmMeadia = new CFormTable(S_MEDIA);
@@ -2856,32 +2859,27 @@
$frmMeadia->AddRow(S_DESCRIPTION,new CTextBox("description",$description,30));
$cmbType = new CComboBox("type",$type,"submit()");
$cmbType->AddItem(ALERT_TYPE_EMAIL,S_EMAIL);
- $cmbType->AddItem(ALERT_TYPE_EXEC,S_SCRIPT);
+ $cmbType->AddItem(ALERT_TYPE_JABBER,S_JABBER);
$cmbType->AddItem(ALERT_TYPE_SMS,S_SMS);
+ $cmbType->AddItem(ALERT_TYPE_EXEC,S_SCRIPT);
$frmMeadia->AddRow(S_TYPE,$cmbType);
- if($type==ALERT_TYPE_EMAIL)
+ switch($type)
{
- $frmMeadia->AddVar("exec_path",$exec_path);
- $frmMeadia->AddVar("gsm_modem",$gsm_modem);
+ case ALERT_TYPE_EMAIL:
$frmMeadia->AddRow(S_SMTP_SERVER,new CTextBox("smtp_server",$smtp_server,30));
$frmMeadia->AddRow(S_SMTP_HELO,new CTextBox("smtp_helo",$smtp_helo,30));
$frmMeadia->AddRow(S_SMTP_EMAIL,new CTextBox("smtp_email",$smtp_email,30));
- }elseif($type==ALERT_TYPE_SMS)
- {
- $frmMeadia->AddVar("exec_path",$exec_path);
- $frmMeadia->AddVar("smtp_server",$smtp_server);
- $frmMeadia->AddVar("smtp_helo",$smtp_helo);
- $frmMeadia->AddVar("smtp_email",$smtp_email);
+ break;
+ case ALERT_TYPE_SMS:
$frmMeadia->AddRow(S_GSM_MODEM,new CTextBox("gsm_modem",$gsm_modem,50));
- }elseif($type==ALERT_TYPE_EXEC)
- {
- $frmMeadia->AddVar("gsm_modem",$gsm_modem);
- $frmMeadia->AddVar("smtp_server",$smtp_server);
- $frmMeadia->AddVar("smtp_helo",$smtp_helo);
- $frmMeadia->AddVar("smtp_email",$smtp_email);
-
+ break;
+ case ALERT_TYPE_EXEC:
$frmMeadia->AddRow(S_SCRIPT_NAME,new CTextBox("exec_path",$exec_path,50));
+ break;
+ case ALERT_TYPE_JABBER:
+ $frmMeadia->AddRow(S_JABBER_IDENTIFIER, new CTextBox("username",$username,30));
+ $frmMeadia->AddRow(S_PASSWORD, new CPassBox("password",$password,30));
}
$frmMeadia->AddItemToBottomRow(new CButton("save",S_SAVE));