Update destinations.php

This commit is contained in:
FusionPBX
2018-06-20 23:32:03 -06:00
committed by GitHub
parent d6b95cfa47
commit 484d9af444
+16 -3
View File
@@ -69,9 +69,15 @@
$order = check_str($_GET["order"]); $order = check_str($_GET["order"]);
//set the type //set the type
if ($_GET['type'] == 'outbound') { if ($_GET['type'] == 'inbound') {
$destination_type = 'inbound';
}
elseif ($_GET['type'] == 'outbound') {
$destination_type = 'outbound'; $destination_type = 'outbound';
} }
elseif ($_GET['type'] == 'local') {
$destination_type = 'local';
}
else { else {
$destination_type = 'inbound'; $destination_type = 'inbound';
} }
@@ -180,9 +186,16 @@
echo " <form method='get' action=''>\n"; echo " <form method='get' action=''>\n";
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n"; echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
if ($_GET['type'] == 'outbound') { if ($destination_type == 'inbound') {
echo " <input type='button' class='btn' value='".$text['button-outbound']."' onclick=\"window.location='destinations.php?type=outbound';\">\n";
echo " <input type='button' class='btn' value='".$text['button-local']."' onclick=\"window.location='destinations.php?type=local';\">\n";
}
if ($destination_type == 'outbound') {
echo " <input type='button' class='btn' value='".$text['button-inbound']."' onclick=\"window.location='destinations.php?type=inbound';\">\n";
echo " <input type='button' class='btn' value='".$text['button-local']."' onclick=\"window.location='destinations.php?type=local';\">\n";
}
if ($destination_type == 'local') {
echo " <input type='button' class='btn' value='".$text['button-inbound']."' onclick=\"window.location='destinations.php?type=inbound';\">\n"; echo " <input type='button' class='btn' value='".$text['button-inbound']."' onclick=\"window.location='destinations.php?type=inbound';\">\n";
} else {
echo " <input type='button' class='btn' value='".$text['button-outbound']."' onclick=\"window.location='destinations.php?type=outbound';\">\n"; echo " <input type='button' class='btn' value='".$text['button-outbound']."' onclick=\"window.location='destinations.php?type=outbound';\">\n";
} }