mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-11 11:08:45 +00:00
Rename the hardware phones to devices.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2008-2012 All Rights Reserved.
|
||||
Copyright (C) 2008-2013 All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
@@ -27,7 +27,7 @@ require_once "includes/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('phone_add') || permission_exists('phone_edit')) {
|
||||
if (permission_exists('device_add') || permission_exists('device_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
@@ -38,7 +38,7 @@ require_once "includes/require.php";
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$hardware_phone_uuid = check_str($_REQUEST["id"]);
|
||||
$device_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
@@ -46,52 +46,52 @@ require_once "includes/require.php";
|
||||
|
||||
//get the http post values and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
$phone_mac_address = check_str($_POST["phone_mac_address"]);
|
||||
$phone_mac_address = strtolower($phone_mac_address);
|
||||
$phone_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $phone_mac_address);
|
||||
$phone_label = check_str($_POST["phone_label"]);
|
||||
$phone_vendor = check_str($_POST["phone_vendor"]);
|
||||
$phone_model = check_str($_POST["phone_model"]);
|
||||
$phone_firmware_version = check_str($_POST["phone_firmware_version"]);
|
||||
$phone_provision_enable = check_str($_POST["phone_provision_enable"]);
|
||||
$phone_template = check_str($_POST["phone_template"]);
|
||||
$phone_username = check_str($_POST["phone_username"]);
|
||||
$phone_password = check_str($_POST["phone_password"]);
|
||||
$phone_time_zone = check_str($_POST["phone_time_zone"]);
|
||||
$phone_description = check_str($_POST["phone_description"]);
|
||||
$device_mac_address = check_str($_POST["device_mac_address"]);
|
||||
$device_mac_address = strtolower($device_mac_address);
|
||||
$device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address);
|
||||
$device_label = check_str($_POST["device_label"]);
|
||||
$device_vendor = check_str($_POST["device_vendor"]);
|
||||
$device_model = check_str($_POST["device_model"]);
|
||||
$device_firmware_version = check_str($_POST["device_firmware_version"]);
|
||||
$device_provision_enable = check_str($_POST["device_provision_enable"]);
|
||||
$device_template = check_str($_POST["device_template"]);
|
||||
$device_username = check_str($_POST["device_username"]);
|
||||
$device_password = check_str($_POST["device_password"]);
|
||||
$device_time_zone = check_str($_POST["device_time_zone"]);
|
||||
$device_description = check_str($_POST["device_description"]);
|
||||
}
|
||||
|
||||
//use the mac address to find the vendor
|
||||
if (strlen($phone_vendor) == 0) {
|
||||
switch (substr($phone_mac_address, 0, 6)) {
|
||||
if (strlen($device_vendor) == 0) {
|
||||
switch (substr($device_mac_address, 0, 6)) {
|
||||
case "00085d":
|
||||
$phone_vendor = "aastra";
|
||||
$device_vendor = "aastra";
|
||||
break;
|
||||
case "000e08":
|
||||
$phone_vendor = "linksys";
|
||||
$device_vendor = "linksys";
|
||||
break;
|
||||
case "0004f2":
|
||||
$phone_vendor = "polycom";
|
||||
$device_vendor = "polycom";
|
||||
break;
|
||||
case "00907a":
|
||||
$phone_vendor = "polycom";
|
||||
$device_vendor = "polycom";
|
||||
break;
|
||||
case "001873":
|
||||
$phone_vendor = "cisco";
|
||||
$device_vendor = "cisco";
|
||||
break;
|
||||
case "00045a":
|
||||
$phone_vendor = "linksys";
|
||||
$device_vendor = "linksys";
|
||||
break;
|
||||
case "000625":
|
||||
$phone_vendor = "linksys";
|
||||
$device_vendor = "linksys";
|
||||
break;
|
||||
case "001565":
|
||||
$phone_vendor = "yealink";
|
||||
$device_vendor = "yealink";
|
||||
break;
|
||||
case "000413":
|
||||
$phone_vendor = "snom";
|
||||
$device_vendor = "snom";
|
||||
default:
|
||||
$phone_vendor = "";
|
||||
$device_vendor = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,21 +100,21 @@ require_once "includes/require.php";
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$hardware_phone_uuid = check_str($_POST["hardware_phone_uuid"]);
|
||||
$device_uuid = check_str($_POST["device_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($phone_mac_address) == 0) { $msg .= "Please provide: MAC Address<br>\n"; }
|
||||
//if (strlen($phone_label) == 0) { $msg .= "Please provide: Label<br>\n"; }
|
||||
//if (strlen($phone_vendor) == 0) { $msg .= "Please provide: Vendor<br>\n"; }
|
||||
//if (strlen($phone_model) == 0) { $msg .= "Please provide: Model<br>\n"; }
|
||||
//if (strlen($phone_firmware_version) == 0) { $msg .= "Please provide: Firmware Version<br>\n"; }
|
||||
//if (strlen($phone_provision_enable) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($phone_template) == 0) { $msg .= "Please provide: Template<br>\n"; }
|
||||
//if (strlen($phone_username) == 0) { $msg .= "Please provide: Username<br>\n"; }
|
||||
//if (strlen($phone_password) == 0) { $msg .= "Please provide: Password<br>\n"; }
|
||||
//if (strlen($phone_time_zone) == 0) { $msg .= "Please provide: Time Zone<br>\n"; }
|
||||
//if (strlen($phone_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($device_mac_address) == 0) { $msg .= "Please provide: MAC Address<br>\n"; }
|
||||
//if (strlen($device_label) == 0) { $msg .= "Please provide: Label<br>\n"; }
|
||||
//if (strlen($device_vendor) == 0) { $msg .= "Please provide: Vendor<br>\n"; }
|
||||
//if (strlen($device_model) == 0) { $msg .= "Please provide: Model<br>\n"; }
|
||||
//if (strlen($device_firmware_version) == 0) { $msg .= "Please provide: Firmware Version<br>\n"; }
|
||||
//if (strlen($device_provision_enable) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($device_template) == 0) { $msg .= "Please provide: Template<br>\n"; }
|
||||
//if (strlen($device_username) == 0) { $msg .= "Please provide: Username<br>\n"; }
|
||||
//if (strlen($device_password) == 0) { $msg .= "Please provide: Password<br>\n"; }
|
||||
//if (strlen($device_time_zone) == 0) { $msg .= "Please provide: Time Zone<br>\n"; }
|
||||
//if (strlen($device_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
@@ -130,40 +130,40 @@ require_once "includes/require.php";
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if ($action == "add" && permission_exists('phone_add')) {
|
||||
if ($action == "add" && permission_exists('device_add')) {
|
||||
//sql add
|
||||
$hardware_phone_uuid = uuid();
|
||||
$sql = "insert into v_hardware_phones ";
|
||||
$device_uuid = uuid();
|
||||
$sql = "insert into v_devices ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "hardware_phone_uuid, ";
|
||||
$sql .= "phone_mac_address, ";
|
||||
$sql .= "phone_label, ";
|
||||
$sql .= "phone_vendor, ";
|
||||
$sql .= "phone_model, ";
|
||||
$sql .= "phone_firmware_version, ";
|
||||
$sql .= "phone_provision_enable, ";
|
||||
$sql .= "phone_template, ";
|
||||
$sql .= "phone_username, ";
|
||||
$sql .= "phone_password, ";
|
||||
$sql .= "phone_time_zone, ";
|
||||
$sql .= "phone_description ";
|
||||
$sql .= "device_uuid, ";
|
||||
$sql .= "device_mac_address, ";
|
||||
$sql .= "device_label, ";
|
||||
$sql .= "device_vendor, ";
|
||||
$sql .= "device_model, ";
|
||||
$sql .= "device_firmware_version, ";
|
||||
$sql .= "device_provision_enable, ";
|
||||
$sql .= "device_template, ";
|
||||
$sql .= "device_username, ";
|
||||
$sql .= "device_password, ";
|
||||
$sql .= "device_time_zone, ";
|
||||
$sql .= "device_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$hardware_phone_uuid', ";
|
||||
$sql .= "'$phone_mac_address', ";
|
||||
$sql .= "'$phone_label', ";
|
||||
$sql .= "'$phone_vendor', ";
|
||||
$sql .= "'$phone_model', ";
|
||||
$sql .= "'$phone_firmware_version', ";
|
||||
$sql .= "'$phone_provision_enable', ";
|
||||
$sql .= "'$phone_template', ";
|
||||
$sql .= "'$phone_username', ";
|
||||
$sql .= "'$phone_password', ";
|
||||
$sql .= "'$phone_time_zone', ";
|
||||
$sql .= "'$phone_description' ";
|
||||
$sql .= "'$device_uuid', ";
|
||||
$sql .= "'$device_mac_address', ";
|
||||
$sql .= "'$device_label', ";
|
||||
$sql .= "'$device_vendor', ";
|
||||
$sql .= "'$device_model', ";
|
||||
$sql .= "'$device_firmware_version', ";
|
||||
$sql .= "'$device_provision_enable', ";
|
||||
$sql .= "'$device_template', ";
|
||||
$sql .= "'$device_username', ";
|
||||
$sql .= "'$device_password', ";
|
||||
$sql .= "'$device_time_zone', ";
|
||||
$sql .= "'$device_description' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
@@ -173,7 +173,7 @@ require_once "includes/require.php";
|
||||
|
||||
//redirect the user
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=hardware_phones.php\">\n";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=devices.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Add Complete\n";
|
||||
echo "</div>\n";
|
||||
@@ -181,22 +181,22 @@ require_once "includes/require.php";
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update" && permission_exists('phone_edit')) {
|
||||
if ($action == "update" && permission_exists('device_edit')) {
|
||||
//sql update
|
||||
$sql = "update v_hardware_phones set ";
|
||||
$sql .= "phone_mac_address = '$phone_mac_address', ";
|
||||
$sql .= "phone_label = '$phone_label', ";
|
||||
$sql .= "phone_vendor = '$phone_vendor', ";
|
||||
$sql .= "phone_model = '$phone_model', ";
|
||||
$sql .= "phone_firmware_version = '$phone_firmware_version', ";
|
||||
$sql .= "phone_provision_enable = '$phone_provision_enable', ";
|
||||
$sql .= "phone_template = '$phone_template', ";
|
||||
$sql .= "phone_username = '$phone_username', ";
|
||||
$sql .= "phone_password = '$phone_password', ";
|
||||
$sql .= "phone_time_zone = '$phone_time_zone', ";
|
||||
$sql .= "phone_description = '$phone_description' ";
|
||||
$sql = "update v_devices set ";
|
||||
$sql .= "device_mac_address = '$device_mac_address', ";
|
||||
$sql .= "device_label = '$device_label', ";
|
||||
$sql .= "device_vendor = '$device_vendor', ";
|
||||
$sql .= "device_model = '$device_model', ";
|
||||
$sql .= "device_firmware_version = '$device_firmware_version', ";
|
||||
$sql .= "device_provision_enable = '$device_provision_enable', ";
|
||||
$sql .= "device_template = '$device_template', ";
|
||||
$sql .= "device_username = '$device_username', ";
|
||||
$sql .= "device_password = '$device_password', ";
|
||||
$sql .= "device_time_zone = '$device_time_zone', ";
|
||||
$sql .= "device_description = '$device_description' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and hardware_phone_uuid = '$hardware_phone_uuid'";
|
||||
$sql .= "and device_uuid = '$device_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
@@ -205,7 +205,7 @@ require_once "includes/require.php";
|
||||
|
||||
//redirect the user
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=hardware_phones.php\">\n";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=devices.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo "</div>\n";
|
||||
@@ -217,26 +217,26 @@ require_once "includes/require.php";
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
$hardware_phone_uuid = $_GET["id"];
|
||||
$sql = "select * from v_hardware_phones ";
|
||||
$device_uuid = $_GET["id"];
|
||||
$sql = "select * from v_devices ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and hardware_phone_uuid = '$hardware_phone_uuid' ";
|
||||
$sql .= "and device_uuid = '$device_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$phone_mac_address = $row["phone_mac_address"];
|
||||
$phone_mac_address = substr($phone_mac_address, 0,2).'-'.substr($phone_mac_address, 2,2).'-'.substr($phone_mac_address, 4,2).'-'.substr($phone_mac_address, 6,2).'-'.substr($phone_mac_address, 8,2).'-'.substr($phone_mac_address, 10,2);
|
||||
$phone_label = $row["phone_label"];
|
||||
$phone_vendor = $row["phone_vendor"];
|
||||
$phone_model = $row["phone_model"];
|
||||
$phone_firmware_version = $row["phone_firmware_version"];
|
||||
$phone_provision_enable = $row["phone_provision_enable"];
|
||||
$phone_template = $row["phone_template"];
|
||||
$phone_username = $row["phone_username"];
|
||||
$phone_password = $row["phone_password"];
|
||||
$phone_time_zone = $row["phone_time_zone"];
|
||||
$phone_description = $row["phone_description"];
|
||||
$device_mac_address = $row["device_mac_address"];
|
||||
$device_mac_address = substr($device_mac_address, 0,2).'-'.substr($device_mac_address, 2,2).'-'.substr($device_mac_address, 4,2).'-'.substr($device_mac_address, 6,2).'-'.substr($device_mac_address, 8,2).'-'.substr($device_mac_address, 10,2);
|
||||
$device_label = $row["device_label"];
|
||||
$device_vendor = $row["device_vendor"];
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_template = $row["device_template"];
|
||||
$device_username = $row["device_username"];
|
||||
$device_password = $row["device_password"];
|
||||
$device_time_zone = $row["device_time_zone"];
|
||||
$device_description = $row["device_description"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
@@ -255,17 +255,12 @@ require_once "includes/require.php";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
if ($action == "add") {
|
||||
echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>Hardware Phone Add</b></td>\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>Hardware Phone Edit</b></td>\n";
|
||||
}
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='hardware_phones.php'\" value='Back'></td>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>Device</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='devices.php'\" value='Back'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='2' align='left'>\n";
|
||||
echo "The following information is used to provision phones.<br /><br />\n";
|
||||
echo "The following information is used to provision endpoints.<br /><br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -274,7 +269,7 @@ require_once "includes/require.php";
|
||||
echo " MAC Address:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_mac_address' maxlength='255' value=\"$phone_mac_address\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_mac_address' maxlength='255' value=\"$device_mac_address\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the MAC address.\n";
|
||||
echo "</td>\n";
|
||||
@@ -285,9 +280,9 @@ require_once "includes/require.php";
|
||||
echo " Label:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_label' maxlength='255' value=\"$phone_label\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_label' maxlength='255' value=\"$device_label\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the phone label.\n";
|
||||
echo "Enter the device label.\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -297,7 +292,7 @@ require_once "includes/require.php";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
echo "<select id='phone_template' name='phone_template' class='formfld'>\n";
|
||||
echo "<select id='device_template' name='device_template' class='formfld'>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
$temp_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/templates/provision";
|
||||
if($dh = opendir($temp_dir)) {
|
||||
@@ -309,7 +304,7 @@ require_once "includes/require.php";
|
||||
while($dir_sub = readdir($dh_sub)) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($temp_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($phone_template == $dir."/".$dir_sub) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
echo "<option value='".$dir."/".$dir_sub."' selected='selected'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -337,7 +332,7 @@ require_once "includes/require.php";
|
||||
echo " Vendor:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_vendor' maxlength='255' value=\"$phone_vendor\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_vendor' maxlength='255' value=\"$device_vendor\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the vendor name.\n";
|
||||
echo "</td>\n";
|
||||
@@ -348,7 +343,7 @@ require_once "includes/require.php";
|
||||
echo " Model:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_model' maxlength='255' value=\"$phone_model\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_model' maxlength='255' value=\"$device_model\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the model number.\n";
|
||||
echo "</td>\n";
|
||||
@@ -359,7 +354,7 @@ require_once "includes/require.php";
|
||||
echo " Firmware Version:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_firmware_version' maxlength='255' value=\"$phone_firmware_version\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_firmware_version' maxlength='255' value=\"$device_firmware_version\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the firmware version.\n";
|
||||
echo "</td>\n";
|
||||
@@ -371,7 +366,7 @@ require_once "includes/require.php";
|
||||
echo " Username:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_username' maxlength='255' value=\"$phone_username\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_username' maxlength='255' value=\"$device_username\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the username.\n";
|
||||
echo "</td>\n";
|
||||
@@ -382,7 +377,7 @@ require_once "includes/require.php";
|
||||
echo " Password:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_password' maxlength='255' value=\"$phone_password\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_password' maxlength='255' value=\"$device_password\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the password.\n";
|
||||
echo "</td>\n";
|
||||
@@ -394,15 +389,15 @@ require_once "includes/require.php";
|
||||
echo " Enabled:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='phone_provision_enable'>\n";
|
||||
echo " <select class='formfld' name='device_provision_enable'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($phone_provision_enable == "true" || strlen($phone_provision_enable) == 0) {
|
||||
if ($device_provision_enable == "true" || strlen($device_provision_enable) == 0) {
|
||||
echo " <option value='true' selected >true</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
}
|
||||
if ($phone_provision_enable == "false") {
|
||||
if ($device_provision_enable == "false") {
|
||||
echo " <option value='false' selected >false</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -410,7 +405,7 @@ require_once "includes/require.php";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "Enable or disable provisioning for this phone.\n";
|
||||
echo "Enable or disable provisioning for this device.\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -419,7 +414,7 @@ require_once "includes/require.php";
|
||||
echo " Time Zone:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_time_zone' maxlength='255' value=\"$phone_time_zone\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_time_zone' maxlength='255' value=\"$device_time_zone\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the time zone.\n";
|
||||
echo "</td>\n";
|
||||
@@ -430,7 +425,7 @@ require_once "includes/require.php";
|
||||
echo " Description:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_description' maxlength='255' value=\"$phone_description\">\n";
|
||||
echo " <input class='formfld' type='text' name='device_description' maxlength='255' value=\"$device_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the description.\n";
|
||||
echo "</td>\n";
|
||||
@@ -438,7 +433,7 @@ require_once "includes/require.php";
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='hardware_phone_uuid' value='$hardware_phone_uuid'>\n";
|
||||
echo " <input type='hidden' name='device_uuid' value='$device_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " </td>\n";
|
||||
|
||||
Reference in New Issue
Block a user