diff --git a/app/ring_groups/app_config.php b/app/ring_groups/app_config.php index cffbffe1f1..67062c8744 100644 --- a/app/ring_groups/app_config.php +++ b/app/ring_groups/app_config.php @@ -122,16 +122,16 @@ $apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; $z++; - //schema details + $y = 1; //table array index $z = 0; //field array index + $apps[$x]['db'][$y]['table'] = 'v_ring_group_extensions'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'ring_group_extension_uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary'; $z++; - $apps[$x]['db'][$y]['table'] = 'v_ring_group_extensions'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; @@ -158,4 +158,43 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; $z++; + + $y = 2; //table array index + $z = 0; //field array index + $apps[$x]['db'][$y]['table'] = 'v_ring_group_destinations'; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'ring_group_destination_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary'; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign'; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'ring_group_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign'; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'destination_number'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'destination_delay'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'destination_timeout'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'destination_prompt'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric'; //confirm,announce + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; ?> \ No newline at end of file diff --git a/app/ring_groups/app_languages.php b/app/ring_groups/app_languages.php index 473dbe8a21..ed4683889f 100644 --- a/app/ring_groups/app_languages.php +++ b/app/ring_groups/app_languages.php @@ -37,9 +37,7 @@ $text['label-description']['en-us'] = 'Description'; - $text['message-delete']['en-us'] = 'Do you really want to delete this?'; - - $text['message-delete-done']['en-us'] = 'Delete Complete'; + $text['message-delete']['en-us'] = 'Delete Complete'; $text['message-name']['en-us'] = 'Please provide: Name'; @@ -53,9 +51,9 @@ $text['message-enabled']['en-us'] = 'Please provide: Enabled'; - $text['message-add-complete']['en-us'] = 'Add Complete'; + $text['message-add']['en-us'] = 'Add Complete'; - $text['message-update-complete']['en-us'] = 'Update Complete'; + $text['message-update']['en-us'] = 'Update Complete'; $text['label-ring-group']['en-us'] = 'Ring Group'; @@ -81,8 +79,6 @@ $text['description-extensions']['en-us'] = 'Add an extension and ring parameters to the ring group.'; - $text['button-add']['en-us'] = 'Add'; - $text['description-extension']['en-us'] = 'Define an extension number for this ring group.'; $text['label-duration']['en-us'] = 'Duration'; @@ -91,9 +87,9 @@ $text['description-timeout']['en-us'] = 'Enter the total call timeout in seconds'; - $text['label-destination']['en-us'] = 'Timeout Destination'; + $text['label-timeout_destination']['en-us'] = 'Timeout Destination'; - $text['description-destination']['en-us'] = 'Select the timeout destination for this ring group.'; + $text['description-timeout_destination']['en-us'] = 'Select the timeout destination for this ring group.'; $text['label-cid-prefix']['en-us'] = 'CID Prefix'; @@ -125,4 +121,40 @@ $text['label-timeout']['en-us'] = 'Timeout'; $text['label-timeout']['pt-pt'] = ''; + $text['label-destinations']['en-us'] = 'Destinations'; + $text['label-destinations']['pt-pt'] = ''; + + $text['label-destination_number']['en-us'] = 'Destination'; + $text['label-destination_number']['pt-pt'] = ''; + + $text['label-destination_delay']['en-us'] = 'Delay'; + $text['label-destination_delay']['pt-pt'] = ''; + + $text['label-destination_timeout']['en-us'] = 'Timeout'; + $text['label-destination_timeout']['pt-pt'] = ''; + + $text['label-destination_prompt']['en-us'] = 'Prompt'; + $text['label-destination_prompt']['pt-pt'] = ''; + + $text['label-destination_prompt_confirm']['en-us'] = 'Confirm'; + $text['label-destination_prompt_confirm']['pt-pt'] = ''; + + $text['label-destination_prompt_announce']['en-us'] = 'Announce'; + $text['label-destination_prompt_announce']['pt-pt'] = ''; + + $text['description-destinations']['en-us'] = 'Add destinations and parameters to the ring group.'; + $text['description-destinations']['pt-pt'] = ''; + + $text['button-add']['en-us'] = 'Add'; + $text['button-add']['pt-pt'] = ''; + + $text['button-save']['en-us'] = 'Save'; + $text['button-save']['pt-pt'] = ''; + + $text['confirm-delete']['en-us'] = 'Do you really want to delete this?'; + $text['confirm-delete']['pt-pt'] = ''; + + $text['confirm-copy']['en-us'] = 'Do you really want to copy this?'; + $text['confirm-copy']['en-us'] = ''; + ?> \ No newline at end of file diff --git a/app/ring_groups/ring_group_destination_delete.php b/app/ring_groups/ring_group_destination_delete.php new file mode 100644 index 0000000000..1a69e9aad3 --- /dev/null +++ b/app/ring_groups/ring_group_destination_delete.php @@ -0,0 +1,68 @@ + + Portions created by the Initial Developer are Copyright (C) 2013 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('ring_group_delete')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get the id + if (count($_GET)>0) { + $id = check_str($_GET["id"]); + $ring_group_uuid = check_str($_GET["ring_group_uuid"]); + } + +if (strlen($id)>0) { + //delete ring_group_destination + $sql = "delete from v_ring_group_destinations "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and ring_group_destination_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); +} + +//redirect the user + require_once "resources/header.php"; + echo "\n"; + echo "
\n"; + echo $text['message-delete']."\n"; + echo "
\n"; + require_once "resources/footer.php"; + return; + +?> \ No newline at end of file diff --git a/app/ring_groups/ring_group_destination_edit.php b/app/ring_groups/ring_group_destination_edit.php new file mode 100644 index 0000000000..0f17412718 --- /dev/null +++ b/app/ring_groups/ring_group_destination_edit.php @@ -0,0 +1,257 @@ + + Portions created by the Initial Developer are Copyright (C) 2013 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('ring_group_add') || permission_exists('ring_group_edit')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $ring_group_destination_uuid = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//set the parent uuid + if (strlen($_GET["ring_group_uuid"]) > 0) { + $ring_group_uuid = check_str($_GET["ring_group_uuid"]); + } + +//get http post variables and set them to php variables + if (count($_POST)>0) { + $ring_group_uuid = check_str($_POST["ring_group_uuid"]); + $destination_number = check_str($_POST["destination_number"]); + $destination_delay = check_str($_POST["destination_delay"]); + $destination_timeout = check_str($_POST["destination_timeout"]); + $destination_prompt = check_str($_POST["destination_prompt"]); + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + $msg = ''; + if ($action == "update") { + $ring_group_destination_uuid = check_str($_POST["ring_group_destination_uuid"]); + } + + //check for all required data + //if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."
\n"; } + //if (strlen($ring_group_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-ring_group_uuid']."
\n"; } + //if (strlen($destination_number) == 0) { $msg .= $text['message-required']." ".$text['label-destination_number']."
\n"; } + //if (strlen($destination_delay) == 0) { $msg .= $text['message-required']." ".$text['label-destination_delay']."
\n"; } + //if (strlen($destination_timeout) == 0) { $msg .= $text['message-required']." ".$text['label-destination_timeout']."
\n"; } + //if (strlen($destination_prompt) == 0) { $msg .= $text['message-required']." ".$text['label-destination_prompt']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persistformvar.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add" && permission_exists('ring_group_add')) { + $sql = "insert into v_ring_group_destinations "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "ring_group_destination_uuid, "; + $sql .= "ring_group_uuid, "; + $sql .= "domain_uuid, "; + $sql .= "ring_group_uuid, "; + $sql .= "destination_number, "; + $sql .= "destination_delay, "; + $sql .= "destination_timeout, "; + $sql .= "destination_prompt "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'$domain_uuid', "; + $sql .= "'".uuid()."', "; + $sql .= "'$ring_group_uuid', "; + $sql .= "'$domain_uuid', "; + $sql .= "'$ring_group_uuid', "; + $sql .= "'$destination_number', "; + $sql .= "'$destination_delay', "; + $sql .= "'$destination_timeout', "; + $sql .= "'$destination_prompt' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); + + require_once "resources/header.php"; + echo "\n"; + echo "
\n"; + echo " ".$text['message-add']."\n"; + echo "
\n"; + require_once "resources/footer.php"; + return; + } //if ($action == "add") + + if ($action == "update" && permission_exists('ring_group_edit')) { + $sql = "update v_ring_group_destinations set "; + $sql .= "ring_group_uuid = '$ring_group_uuid', "; + $sql .= "domain_uuid = '$domain_uuid', "; + $sql .= "ring_group_uuid = '$ring_group_uuid', "; + $sql .= "destination_number = '$destination_number', "; + $sql .= "destination_delay = '$destination_delay', "; + $sql .= "destination_timeout = '$destination_timeout', "; + $sql .= "destination_prompt = '$destination_prompt' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and ring_group_destination_uuid = '$ring_group_destination_uuid'"; + $db->exec(check_sql($sql)); + unset($sql); + + require_once "resources/header.php"; + echo "\n"; + echo "
\n"; + echo " ".$text['message-update']."\n"; + echo "
\n"; + require_once "resources/footer.php"; + return; + } //if ($action == "update") + } //if ($_POST["persistformvar"] != "true") +} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (count($_GET)>0 && $_POST["persistformvar"] != "true") { + $ring_group_destination_uuid = check_str($_GET["id"]); + $sql = "select * from v_ring_group_destinations "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and ring_group_destination_uuid = '$ring_group_destination_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $ring_group_uuid = $row["ring_group_uuid"]; + $destination_number = $row["destination_number"]; + $destination_delay = $row["destination_delay"]; + $destination_timeout = $row["destination_timeout"]; + $destination_prompt = $row["destination_prompt"]; + break; //limit to 1 row + } + unset ($prep_statement); + } + +//show the header + require_once "resources/header.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
"; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " "; + echo "
".$text['title-ring_group_destination']."
\n"; + echo " ".$text['label-destination_number'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_number']."\n"; + echo "
\n"; + echo " ".$text['label-destination_delay'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_delay']."\n"; + echo "
\n"; + echo " ".$text['label-destination_timeout'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_timeout']."\n"; + echo "
\n"; + echo " ".$text['label-destination_prompt'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_prompt']."\n"; + echo "
\n"; + echo " \n"; + if ($action == "update") { + echo " \n"; + } + echo " \n"; + echo "
"; + echo ""; + + echo "
"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/ring_groups/ring_groups.php b/app/ring_groups/ring_groups.php index 6c28657d44..db177a31f0 100644 --- a/app/ring_groups/ring_groups.php +++ b/app/ring_groups/ring_groups.php @@ -137,7 +137,7 @@ require_once "resources/paging.php"; echo " ".$row['ring_group_description']." \n"; echo " \n"; echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } diff --git a/app/ring_groups/ring_groups_delete.php b/app/ring_groups/ring_groups_delete.php index 37ba92d7fe..38253350a9 100644 --- a/app/ring_groups/ring_groups_delete.php +++ b/app/ring_groups/ring_groups_delete.php @@ -99,7 +99,7 @@ else { require_once "resources/header.php"; echo "\n"; echo "
\n"; - echo $text['message-delete-done']."\n"; + echo $text['message-delete']."\n"; echo "
\n"; require_once "resources/footer.php"; return; diff --git a/app/ring_groups/ring_groups_edit.php b/app/ring_groups/ring_groups_edit.php index 359e8a359e..a215504675 100644 --- a/app/ring_groups/ring_groups_edit.php +++ b/app/ring_groups/ring_groups_edit.php @@ -43,6 +43,7 @@ else { //delete the user from the v_extension_users if ($_GET["a"] == "delete" && permission_exists("user_delete")) { + /* //set the variables $ring_group_extension_uuid = check_str($_REQUEST["id"]); $ring_group_uuid = check_str($_REQUEST["ring_group_uuid"]); @@ -52,6 +53,16 @@ else { $sql .= "and ring_group_extension_uuid = '$ring_group_extension_uuid' "; $db->exec(check_sql($sql)); unset($sql); + */ + //set the variables + $ring_group_destination_uuid = check_str($_REQUEST["id"]); + $ring_group_uuid = check_str($_REQUEST["ring_group_uuid"]); + //delete the extension from the ring_group + $sql = "delete from v_ring_group_destinations "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and ring_group_destination_uuid = '$ring_group_destination_uuid' "; + $db->exec(check_sql($sql)); + unset($sql); //redirect the browser require_once "resources/header.php"; echo "\n"; @@ -106,9 +117,13 @@ else { $ring_group_timeout_array = explode(":", $ring_group_timeout_action); $ring_group_timeout_app = array_shift($ring_group_timeout_array); $ring_group_timeout_data = join(':', $ring_group_timeout_array); - $extension_uuid = check_str($_POST["extension_uuid"]); - $extension_delay = check_str($_POST["extension_delay"]); - $extension_timeout = check_str($_POST["extension_timeout"]); +// $extension_uuid = check_str($_POST["extension_uuid"]); +// $extension_delay = check_str($_POST["extension_delay"]); +// $extension_timeout = check_str($_POST["extension_timeout"]); + $destination_number = check_str($_POST["destination_number"]); + $destination_delay = check_str($_POST["destination_delay"]); + $destination_timeout = check_str($_POST["destination_timeout"]); + $destination_prompt = check_str($_POST["destination_prompt"]); //set the context for users that are not in the superadmin group if (!if_group("superadmin")) { @@ -119,7 +134,6 @@ else { $ring_group_context = "default"; } } - } if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { @@ -221,7 +235,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update" || $action == "add") { //if extension_uuid then add it to ring group extensions - if (strlen($extension_uuid) > 0) { + /* if (strlen($extension_uuid) > 0) { $ring_group_extension_uuid = uuid(); $sql = "insert into v_ring_group_extensions "; $sql .= "("; @@ -247,6 +261,43 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= ")"; $db->exec(check_sql($sql)); unset($sql); + } */ + + //if destination then add it to ring group destinations + if (strlen($destination_number) > 0) { + $ring_group_destination_uuid = uuid(); + $sql = "insert into v_ring_group_destinations "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "ring_group_uuid, "; + $sql .= "ring_group_destination_uuid, "; + $sql .= "destination_delay, "; + $sql .= "destination_timeout, "; + $sql .= "destination_prompt, "; + $sql .= "destination_number "; + $sql .= ") "; + $sql .= "values "; + $sql .= "("; + $sql .= "'".$_SESSION['domain_uuid']."', "; + $sql .= "'$ring_group_uuid', "; + $sql .= "'$ring_group_destination_uuid', "; + $sql .= "'$destination_delay', "; + if (strlen($destination_timeout) > 0) { + $sql .= "'$destination_timeout', "; + } + else { + $sql .= "'30', "; + } + if (strlen($destination_prompt) > 0) { + $sql .= "'$destination_prompt', "; + } + else { + $sql .= "null, "; + } + $sql .= "'$destination_number' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); } //if it does not exist in the dialplan then add it @@ -302,7 +353,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $database->fields['dialplan_detail_uuid'] = uuid(); $database->fields['dialplan_detail_tag'] = 'action'; //condition, action, antiaction $database->fields['dialplan_detail_type'] = 'lua'; - $database->fields['dialplan_detail_data'] = 'ring_group.lua'; + $database->fields['dialplan_detail_data'] = 'app.lua ring_groups'; $database->fields['dialplan_detail_order'] = '030'; $database->add(); @@ -469,7 +520,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo $text['description-strategy']."\n"; echo "\n"; echo "\n"; - +/* echo " "; echo " ".$text['label-extensions'].":"; echo " "; @@ -540,6 +591,89 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; echo " "; echo " "; +*/ + echo " "; + echo " ".$text['label-destinations'].":"; + echo " "; + if ($action == "update") { + echo " \n"; + $sql = "SELECT * FROM v_ring_group_destinations "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and ring_group_uuid = '".$ring_group_uuid."' "; + $sql .= "order by destination_number asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $result_count = count($result); + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + foreach($result as $field) { + if (strlen($field['destination_delay']) == 0) { $field['destination_delay'] = "0"; } + if (strlen($field['destination_timeout']) == 0) { $field['destination_timeout'] = "30"; } + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['label-destination_number']."".$text['label-destination_delay']."".$text['label-destination_timeout']."".$text['label-destination_prompt']."
\n"; + echo " ".$field['destination_number']; + echo " \n"; + echo " ".$field['destination_delay']." \n"; + echo " \n"; + echo " ".$field['destination_timeout']." \n"; + echo " \n"; + if ($field['destination_prompt'] == "1") { + echo " ".$text['label-destination_prompt_confirm']." \n"; + } + elseif ($field['destination_prompt'] == "2") { + echo " ".$text['label-destination_prompt_announce']." \n"; + } + else { + echo "  \n"; + } + echo " \n"; + echo " $v_link_label_edit\n"; + echo " $v_link_label_delete\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + destination_select('destination_delay', $destination_delay, '0'); + echo " \n"; + destination_select('destination_timeout', $destination_timeout, '30'); + echo " \n"; + echo " \n"; + echo " \n"; + if ($action == "update") { + echo " \n"; + } + echo "
\n"; + } + unset($sql, $result); + echo " ".$text['description-destinations']."\n"; + echo "
\n"; + echo " "; + echo " "; echo "\n"; echo "\n"; @@ -554,13 +688,13 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo " ".$text['label-destination'].":\n"; + echo " ".$text['label-timeout_destination'].":\n"; echo "\n"; echo "\n"; //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); switch_select_destination("dialplan", "", "ring_group_timeout_action", $ring_group_timeout_action, "", ""); echo "
\n"; - echo " ".$text['description-destination']."\n"; + echo " ".$text['description-timeout_destination']."\n"; echo "\n"; echo "\n";