Enable the changes to do not disturb that make it far more efficient and no longer dependent on hunt groups. It is also compatible with the extensions and dialplan running from the database without any additional work for the system.
This commit is contained in:
parent
f233f207fb
commit
634f55f610
|
|
@ -34,23 +34,24 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
function destination_select($select_name, $select_value, $select_default) {
|
||||
if (strlen($select_value) == 0) { $select_value = $select_default; }
|
||||
echo " <select class='formfld' style='width: 45px;' name='$select_name'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
//define the destination_select function
|
||||
function destination_select($select_name, $select_value, $select_default) {
|
||||
if (strlen($select_value) == 0) { $select_value = $select_default; }
|
||||
echo " <select class='formfld' style='width: 45px;' name='$select_name'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
|
||||
$i=5;
|
||||
while($i<=100) {
|
||||
if ($select_value == $i) {
|
||||
echo " <option value='$i' selected='selected'>$i</option>\n";
|
||||
$i=5;
|
||||
while($i<=100) {
|
||||
if ($select_value == $i) {
|
||||
echo " <option value='$i' selected='selected'>$i</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
$i=$i+5;
|
||||
}
|
||||
else {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
$i=$i+5;
|
||||
echo "</select>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
}
|
||||
|
||||
//get the extension_uuid
|
||||
$extension_uuid = $_REQUEST["id"];
|
||||
|
|
@ -286,9 +287,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
unset ($prep_statement);
|
||||
|
||||
//include the classes
|
||||
include "includes/classes/call_forward.php";
|
||||
include "includes/classes/follow_me.php";
|
||||
include "includes/classes/do_not_disturb.php";
|
||||
include "includes/classes/switch_call_forward.php";
|
||||
include "includes/classes/switch_follow_me.php";
|
||||
include "includes/classes/switch_do_not_disturb.php";
|
||||
|
||||
//call forward config
|
||||
if (permission_exists('call_forward')) {
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ $order = $_GET["order"];
|
|||
echo " <br />";
|
||||
}
|
||||
|
||||
$sql = "";
|
||||
$sql .= " select * from v_extensions ";
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!(if_group("admin") || if_group("superadmin"))) {
|
||||
|
|
@ -96,8 +95,7 @@ $order = $_GET["order"];
|
|||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
$sql = "";
|
||||
$sql .= " select * from v_extensions ";
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!(if_group("admin") || if_group("superadmin"))) {
|
||||
|
|
@ -129,7 +127,6 @@ $order = $_GET["order"];
|
|||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -141,27 +138,24 @@ $order = $_GET["order"];
|
|||
echo "<th>Description</th>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($result_count == 0) {
|
||||
//no results
|
||||
}
|
||||
else { //received results
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[extension]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row[extension_uuid]."&a=call_forward' alt='Call Forward'>Call Forward</a> \n";
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row['extension_uuid']."&a=call_forward' alt='Call Forward'>Call Forward</a> \n";
|
||||
echo " \n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row[extension_uuid]."&a=follow_me' alt='Follow Me'>Follow Me</a> \n";
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row['extension_uuid']."&a=follow_me' alt='Follow Me'>Follow Me</a> \n";
|
||||
echo " \n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row[extension_uuid]."&a=do_not_disturb' alt='Do Not Disturb'>Do Not Disturb</a> \n";
|
||||
echo " <a href='".PROJECT_PATH."/app/calls/v_call_edit.php?id=".$row['extension_uuid']."&a=do_not_disturb' alt='Do Not Disturb'>Do Not Disturb</a> \n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='40%'>".$row[description]." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='40%'>".$row['description']." </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
|
|
@ -192,5 +186,4 @@ $order = $_GET["order"];
|
|||
require_once "includes/footer.php";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue