2012-06-04 16:58:40 +02:00
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
FusionPBX
|
|
|
|
|
Version: MPL 1.1
|
|
|
|
|
|
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
|
for the specific language governing rights and limitations under the
|
|
|
|
|
License.
|
|
|
|
|
|
|
|
|
|
The Original Code is FusionPBX
|
|
|
|
|
|
|
|
|
|
The Initial Developer of the Original Code is
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
|
|
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
2012-11-24 04:05:51 +01:00
|
|
|
James Rose <james.o.rose@gmail.com>
|
2012-06-04 16:58:40 +02:00
|
|
|
*/
|
|
|
|
|
include "root.php";
|
2013-07-06 08:03:27 +02:00
|
|
|
require_once "resources/require.php";
|
2013-07-06 07:50:55 +02:00
|
|
|
require_once "resources/check_auth.php";
|
2013-09-21 23:45:35 +02:00
|
|
|
if (permission_exists('setting_view') || if_group("superadmin")) {
|
2012-06-04 16:58:40 +02:00
|
|
|
//access granted
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "access denied";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
|
2012-11-24 04:05:51 +01:00
|
|
|
//add multi-lingual support
|
|
|
|
|
require_once "app_languages.php";
|
|
|
|
|
foreach($text as $key => $value) {
|
|
|
|
|
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-23 09:34:06 +01:00
|
|
|
//get the number of rows in v_extensions
|
2012-11-24 01:49:57 +01:00
|
|
|
$sql = " select count(*) as num_rows from v_settings ";
|
2012-06-04 16:58:40 +02:00
|
|
|
$prep_statement = $db->prepare(check_sql($sql));
|
|
|
|
|
$num_rows = 0;
|
|
|
|
|
if ($prep_statement) {
|
|
|
|
|
$prep_statement->execute();
|
|
|
|
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
|
|
|
|
if ($row['num_rows'] > 0) {
|
|
|
|
|
$num_rows = $row['num_rows'];
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$num_rows = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
unset($prep_statement, $result);
|
|
|
|
|
|
|
|
|
|
//set the action
|
|
|
|
|
if ($num_rows == 0) {
|
|
|
|
|
$action = "add";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$action = "update";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//get the http values and set them as php variables
|
|
|
|
|
if (count($_POST)>0) {
|
2012-08-18 11:51:33 +02:00
|
|
|
//$numbering_plan = check_str($_POST["numbering_plan"]);
|
|
|
|
|
//$default_gateway = check_str($_POST["default_gateway"]);
|
2012-06-04 16:58:40 +02:00
|
|
|
$event_socket_ip_address = check_str($_POST["event_socket_ip_address"]);
|
|
|
|
|
if (strlen($event_socket_ip_address) == 0) { $event_socket_ip_address = '127.0.0.1'; }
|
|
|
|
|
$event_socket_port = check_str($_POST["event_socket_port"]);
|
|
|
|
|
$event_socket_password = check_str($_POST["event_socket_password"]);
|
|
|
|
|
$xml_rpc_http_port = check_str($_POST["xml_rpc_http_port"]);
|
|
|
|
|
$xml_rpc_auth_realm = check_str($_POST["xml_rpc_auth_realm"]);
|
|
|
|
|
$xml_rpc_auth_user = check_str($_POST["xml_rpc_auth_user"]);
|
|
|
|
|
$xml_rpc_auth_pass = check_str($_POST["xml_rpc_auth_pass"]);
|
2012-08-18 11:51:33 +02:00
|
|
|
//$admin_pin = check_str($_POST["admin_pin"]);
|
|
|
|
|
//$smtp_host = check_str($_POST["smtp_host"]);
|
|
|
|
|
//$smtp_secure = check_str($_POST["smtp_secure"]);
|
|
|
|
|
//$smtp_auth = check_str($_POST["smtp_auth"]);
|
|
|
|
|
//$smtp_username = check_str($_POST["smtp_username"]);
|
|
|
|
|
//$smtp_password = check_str($_POST["smtp_password"]);
|
|
|
|
|
//$smtp_from = check_str($_POST["smtp_from"]);
|
|
|
|
|
//$smtp_from_name = check_str($_POST["smtp_from_name"]);
|
2012-06-04 16:58:40 +02:00
|
|
|
$mod_shout_decoder = check_str($_POST["mod_shout_decoder"]);
|
|
|
|
|
$mod_shout_volume = check_str($_POST["mod_shout_volume"]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|
|
|
|
|
|
|
|
|
//check for all required data
|
|
|
|
|
$msg = '';
|
|
|
|
|
//if (strlen($numbering_plan) == 0) { $msg .= "Please provide: Numbering Plan<br>\n"; }
|
|
|
|
|
//if (strlen($default_gateway) == 0) { $msg .= "Please provide: Default Gateway<br>\n"; }
|
|
|
|
|
if (strlen($event_socket_port) == 0) { $msg .= "Please provide: Event Socket Port<br>\n"; }
|
|
|
|
|
if (strlen($event_socket_password) == 0) { $msg .= "Please provide: Event Socket Password<br>\n"; }
|
|
|
|
|
//if (strlen($xml_rpc_http_port) == 0) { $msg .= "Please provide: XML RPC HTTP Port<br>\n"; }
|
|
|
|
|
//if (strlen($xml_rpc_auth_realm) == 0) { $msg .= "Please provide: XML RPC Auth Realm<br>\n"; }
|
|
|
|
|
//if (strlen($xml_rpc_auth_user) == 0) { $msg .= "Please provide: XML RPC Auth User<br>\n"; }
|
|
|
|
|
//if (strlen($xml_rpc_auth_pass) == 0) { $msg .= "Please provide: XML RPC Auth Password<br>\n"; }
|
|
|
|
|
//if (strlen($admin_pin) == 0) { $msg .= "Please provide: Admin PIN Number<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_host) == 0) { $msg .= "Please provide: SMTP Host<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_secure) == 0) { $msg .= "Please provide: SMTP Secure<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_auth) == 0) { $msg .= "Please provide: SMTP Auth<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_username) == 0) { $msg .= "Please provide: SMTP Username<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_password) == 0) { $msg .= "Please provide: SMTP Password<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_from) == 0) { $msg .= "Please provide: SMTP From<br>\n"; }
|
|
|
|
|
//if (strlen($smtp_from_name) == 0) { $msg .= "Please provide: SMTP From Name<br>\n"; }
|
|
|
|
|
//if (strlen($mod_shout_decoder) == 0) { $msg .= "Please provide: Mod Shout Decoder<br>\n"; }
|
|
|
|
|
//if (strlen($mod_shout_volume) == 0) { $msg .= "Please provide: Mod Shout Volume<br>\n"; }
|
|
|
|
|
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/header.php";
|
2013-07-06 08:21:12 +02:00
|
|
|
require_once "resources/persist_form_var.php";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "<div align='center'>\n";
|
|
|
|
|
echo "<table><tr><td>\n";
|
|
|
|
|
echo $msg."<br />";
|
|
|
|
|
echo "</td></tr></table>\n";
|
|
|
|
|
persistformvar($_POST);
|
|
|
|
|
echo "</div>\n";
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/footer.php";
|
2012-06-04 16:58:40 +02:00
|
|
|
return;
|
|
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
|
2012-06-04 16:58:40 +02:00
|
|
|
//add or update the database
|
|
|
|
|
if ($_POST["persistformvar"] != "true") {
|
2013-09-21 23:45:35 +02:00
|
|
|
if ($action == "add" && permission_exists('setting_edit')) {
|
2012-06-04 16:58:40 +02:00
|
|
|
$sql = "insert into v_settings ";
|
|
|
|
|
$sql .= "(";
|
|
|
|
|
$sql .= "event_socket_ip_address, ";
|
|
|
|
|
$sql .= "event_socket_port, ";
|
|
|
|
|
$sql .= "event_socket_password, ";
|
|
|
|
|
$sql .= "xml_rpc_http_port, ";
|
|
|
|
|
$sql .= "xml_rpc_auth_realm, ";
|
|
|
|
|
$sql .= "xml_rpc_auth_user, ";
|
|
|
|
|
$sql .= "xml_rpc_auth_pass, ";
|
|
|
|
|
$sql .= "mod_shout_decoder, ";
|
|
|
|
|
$sql .= "mod_shout_volume ";
|
|
|
|
|
$sql .= ")";
|
|
|
|
|
$sql .= "values ";
|
|
|
|
|
$sql .= "(";
|
|
|
|
|
$sql .= "'$event_socket_ip_address', ";
|
|
|
|
|
$sql .= "'$event_socket_port', ";
|
|
|
|
|
$sql .= "'$event_socket_password', ";
|
|
|
|
|
$sql .= "'$xml_rpc_http_port', ";
|
|
|
|
|
$sql .= "'$xml_rpc_auth_realm', ";
|
|
|
|
|
$sql .= "'$xml_rpc_auth_user', ";
|
|
|
|
|
$sql .= "'$xml_rpc_auth_pass', ";
|
|
|
|
|
$sql .= "'$mod_shout_decoder', ";
|
|
|
|
|
$sql .= "'$mod_shout_volume' ";
|
|
|
|
|
$sql .= ")";
|
|
|
|
|
$db->exec(check_sql($sql));
|
|
|
|
|
unset($sql);
|
|
|
|
|
|
|
|
|
|
//synchronize settings
|
2014-02-23 09:34:06 +01:00
|
|
|
save_setting_xml();
|
|
|
|
|
|
|
|
|
|
$_SESSION["message"] = $text['message-add'];
|
|
|
|
|
header("Location: setting_edit.php");
|
2012-06-04 16:58:40 +02:00
|
|
|
return;
|
|
|
|
|
} //if ($action == "add")
|
|
|
|
|
|
2013-09-21 23:45:35 +02:00
|
|
|
if ($action == "update" && permission_exists('setting_edit')) {
|
2012-06-04 16:58:40 +02:00
|
|
|
$sql = "update v_settings set ";
|
|
|
|
|
$sql .= "event_socket_ip_address = '$event_socket_ip_address', ";
|
|
|
|
|
$sql .= "event_socket_port = '$event_socket_port', ";
|
|
|
|
|
$sql .= "event_socket_password = '$event_socket_password', ";
|
|
|
|
|
$sql .= "xml_rpc_http_port = '$xml_rpc_http_port', ";
|
|
|
|
|
$sql .= "xml_rpc_auth_realm = '$xml_rpc_auth_realm', ";
|
|
|
|
|
$sql .= "xml_rpc_auth_user = '$xml_rpc_auth_user', ";
|
|
|
|
|
$sql .= "xml_rpc_auth_pass = '$xml_rpc_auth_pass', ";
|
|
|
|
|
$sql .= "mod_shout_decoder = '$mod_shout_decoder', ";
|
|
|
|
|
$sql .= "mod_shout_volume = '$mod_shout_volume' ";
|
|
|
|
|
$db->exec(check_sql($sql));
|
|
|
|
|
unset($sql);
|
|
|
|
|
|
|
|
|
|
//synchronize settings
|
2014-02-23 09:34:06 +01:00
|
|
|
save_setting_xml();
|
|
|
|
|
|
|
|
|
|
$_SESSION["message"] = $text['message-update'];
|
|
|
|
|
header("Location: setting_edit.php");
|
2012-06-04 16:58:40 +02:00
|
|
|
return;
|
|
|
|
|
} //if ($action == "update")
|
|
|
|
|
} //if ($_POST["persistformvar"] != "true")
|
|
|
|
|
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
|
|
|
|
|
|
|
|
|
//pre-populate the form
|
|
|
|
|
if ($_POST["persistformvar"] != "true") {
|
|
|
|
|
$sql = "";
|
|
|
|
|
$sql .= "select * from v_settings ";
|
|
|
|
|
$prep_statement = $db->prepare($sql);
|
|
|
|
|
if ($prep_statement) {
|
|
|
|
|
$prep_statement->execute();
|
|
|
|
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
|
|
|
|
foreach ($result as &$row) {
|
|
|
|
|
$event_socket_ip_address = $row["event_socket_ip_address"];
|
|
|
|
|
$event_socket_port = $row["event_socket_port"];
|
|
|
|
|
$event_socket_password = $row["event_socket_password"];
|
|
|
|
|
$xml_rpc_http_port = $row["xml_rpc_http_port"];
|
|
|
|
|
$xml_rpc_auth_realm = $row["xml_rpc_auth_realm"];
|
|
|
|
|
$xml_rpc_auth_user = $row["xml_rpc_auth_user"];
|
|
|
|
|
$xml_rpc_auth_pass = $row["xml_rpc_auth_pass"];
|
|
|
|
|
$mod_shout_decoder = $row["mod_shout_decoder"];
|
|
|
|
|
$mod_shout_volume = $row["mod_shout_volume"];
|
|
|
|
|
break; //limit to 1 row
|
|
|
|
|
}
|
|
|
|
|
unset ($prep_statement);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//show the header
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/header.php";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
|
|
|
|
//show the content
|
|
|
|
|
echo "<div align='center'>";
|
|
|
|
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
|
|
|
|
echo "<tr class='border'>\n";
|
|
|
|
|
echo " <td align=\"left\">\n";
|
|
|
|
|
echo " <br>";
|
|
|
|
|
|
|
|
|
|
echo "<form method='post' name='frm' action=''>\n";
|
|
|
|
|
echo "<div align='center'>\n";
|
|
|
|
|
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
if ($action == "add") {
|
2014-02-23 09:34:06 +01:00
|
|
|
echo "<td align='left' width='30%' nowrap><b>".$text['title-settings-add']."</b></td>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
|
|
|
|
if ($action == "update") {
|
2014-02-23 09:34:06 +01:00
|
|
|
echo "<td align='left' width='30%' nowrap><b>".$text['title-settings-update']."</b></td>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
//echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='javascript:history.go(-1)'\" value='".$text['button-back']."'></td>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-event-socket-ip']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='event_socket_ip_address' maxlength='255' value=\"$event_socket_ip_address\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-event-socket-ip']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-event-socket-port']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='event_socket_port' maxlength='255' value=\"$event_socket_port\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-event-socket-port']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-event-socket-pw']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo " <input class='formfld' type='password' name='event_socket_password' id='event_socket_password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"$event_socket_password\">\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "<br />\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo $text['description-event-socket-pw']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-xml-rpc-port']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='xml_rpc_http_port' maxlength='255' value=\"$xml_rpc_http_port\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-xml-rpc-port']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-xml-rpc-realm']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='xml_rpc_auth_realm' maxlength='255' value=\"$xml_rpc_auth_realm\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-xml-rpc-realm']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-xml-rpc-user']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='xml_rpc_auth_user' maxlength='255' value=\"$xml_rpc_auth_user\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-xml-rpc-user']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-xml-rpc-pw']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo " <input class='formfld' type='password' name='xml_rpc_auth_pass' id='xml_rpc_auth_pass' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"$xml_rpc_auth_pass\">\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "<br />\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo $text['description-xml-rpc-pw']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
2012-08-18 11:51:33 +02:00
|
|
|
/*
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP Host:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='smtp_host' maxlength='255' value=\"$smtp_host\">\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Enter the SMTP host address. TLS example: smtp.gmail.com:587\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP Secure:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <select class='formfld' name='smtp_secure'>\n";
|
|
|
|
|
echo " <option value=''></option>\n";
|
2014-02-23 09:34:06 +01:00
|
|
|
if ($smtp_secure == "none") {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <option value='none' SELECTED >none</option>\n";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo " <option value='none'>none</option>\n";
|
|
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
if ($smtp_secure == "tls") {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <option value='tls' SELECTED >tls</option>\n";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo " <option value='tls'>tls</option>\n";
|
|
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
if ($smtp_secure == "ssl") {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <option value='ssl' SELECTED >ssl</option>\n";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo " <option value='ssl'>ssl</option>\n";
|
|
|
|
|
}
|
|
|
|
|
echo " </select>\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Select the SMTP security. None, TLS, SSL\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP Auth:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <select class='formfld' name='smtp_auth'>\n";
|
|
|
|
|
echo " <option value=''></option>\n";
|
2014-02-23 09:34:06 +01:00
|
|
|
if ($smtp_auth == "true") {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <option value='true' SELECTED >true</option>\n";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo " <option value='true'>true</option>\n";
|
|
|
|
|
}
|
2014-02-23 09:34:06 +01:00
|
|
|
if ($smtp_auth == "false") {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <option value='false' SELECTED >false</option>\n";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo " <option value='false'>false</option>\n";
|
|
|
|
|
}
|
|
|
|
|
echo " </select>\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Use SMTP Authentication true or false.\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP Username:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='smtp_username' maxlength='255' value=\"$smtp_username\">\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Enter the SMTP authentication username.\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP Password:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo " <input class='formfld' type='password' name='smtp_password' id='smtp_password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"$smtp_password\">\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "<br />\n";
|
2014-03-07 03:59:20 +01:00
|
|
|
echo "Enter the SMTP authentication password.\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP From:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='smtp_from' maxlength='255' value=\"$smtp_from\">\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Enter the SMTP From email address.\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
|
|
|
|
echo " SMTP From Name:\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='smtp_from_name' maxlength='255' value=\"$smtp_from_name\">\n";
|
|
|
|
|
echo "<br />\n";
|
|
|
|
|
echo "Enter the SMTP From Name.\n";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
2012-08-18 11:51:33 +02:00
|
|
|
*/
|
2012-06-04 16:58:40 +02:00
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-shout-decoder']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='mod_shout_decoder' maxlength='255' value=\"$mod_shout_decoder\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-shout-decoder']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo " ".$text['label-shout-volume']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td class='vtable' align='left'>\n";
|
|
|
|
|
echo " <input class='formfld' type='text' name='mod_shout_volume' maxlength='255' value=\"$mod_shout_volume\">\n";
|
|
|
|
|
echo "<br />\n";
|
2012-11-24 04:05:51 +01:00
|
|
|
echo $text['description-shout-volume']."\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
2013-09-21 23:45:35 +02:00
|
|
|
if (permission_exists('setting_edit')) {
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " <tr>\n";
|
|
|
|
|
echo " <td colspan='2' align='right'>\n";
|
2014-01-23 22:15:49 +01:00
|
|
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
echo " </td>\n";
|
|
|
|
|
echo " </tr>";
|
|
|
|
|
}
|
|
|
|
|
echo "</table>";
|
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
|
|
echo " </td>";
|
|
|
|
|
echo " </tr>";
|
|
|
|
|
echo "</table>";
|
|
|
|
|
echo "</div>";
|
|
|
|
|
|
|
|
|
|
//show the footer
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/footer.php";
|
2012-06-04 16:58:40 +02:00
|
|
|
?>
|