Multilinguified IVR Menus

This commit is contained in:
Nate Jones
2013-05-29 17:20:50 +00:00
parent 9fbab08a53
commit 2179b9ebd1
8 changed files with 233 additions and 149 deletions

View File

@@ -1,5 +1,93 @@
<?php <?php
$text['opt-default']['en-us'] = 'Default'; $text['title-ivr_menus']['en-us'] = 'IVR Menus';
$text['title-ivr_menu']['en-us'] = 'IVR Menu';
$text['title-option_add']['en-us'] = 'IVR Menu Option Add';
$text['title-option_edit']['en-us'] = 'IVR Menu Option Edit';
$text['header-ivr_menus']['en-us'] = 'IVR Menus';
$text['header-ivr_menu']['en-us'] = 'IVR Menu';
$text['header-option_list']['en-us'] = 'Option List';
$text['header-option_add']['en-us'] = 'IVR Menu Option Add';
$text['header-option_edit']['en-us'] = 'IVR Menu Option Edit';
$text['description-ivr_menus']['en-us'] = 'The IVR Menu plays a recording or a pre-defined phrase that presents the caller with options to choose from. Each option has a corresponding destination. The destinations can be extensions, voicemail, other IVR menus, call groups, FAX extensions, and more.';
$text['description-ivr_menu']['en-us'] = 'The IVR Menu plays a recording or a pre-defined phrase that presents the caller with options to choose from. Each option has a corresponding destination. The destinations can be extensions, voicemail, other IVR menus, call groups, FAX extensions, and more.';
$text['description-option_list']['en-us'] = 'The recording presents options to the caller. Options match key presses (DTMF digits) from the caller which directs the call to the destinations.';
$text['description-option_add_edit']['en-us'] = 'The recording presents options to the caller. Options match key presses (DTMF digits) from the caller which directs the call to the destinations. ';
$text['label-name']['en-us'] = 'Name';
$text['label-extension']['en-us'] = 'Extension';
$text['label-greet_long']['en-us'] = 'Greet Long';
$text['label-greet_short']['en-us'] = 'Greet Short';
$text['label-timeout']['en-us'] = 'Timeout';
$text['label-exit_action']['en-us'] = 'Exit Action';
$text['label-direct_dial']['en-us'] = 'Direct Dial';
$text['label-ring_back']['en-us'] = 'Ring Back';
$text['label-caller_id_name_prefix']['en-us'] = 'Caller ID Name Prefix';
$text['label-invalid_sound']['en-us'] = 'Invalid Sound';
$text['label-exit_sound']['en-us'] = 'Exit Sound';
$text['label-comfirm_macro']['en-us'] = 'Confirm Macro';
$text['label-comfirm_key']['en-us'] = 'Confirm Key';
$text['label-tts_engine']['en-us'] = 'TTS Engine';
$text['label-tts_voice']['en-us'] = 'TTS Voice';
$text['label-comfirm_attempts']['en-us'] = 'Confirm Attempts';
$text['label-inter-digit_timeout']['en-us'] = 'Inter-Digit Timeout';
$text['label-max_failures']['en-us'] = 'Max Failures';
$text['label-max_timeouts']['en-us'] = 'Max Timeouts';
$text['label-digit_length']['en-us'] = 'Digit Length';
$text['label-enabled']['en-us'] = 'Enabled';
$text['label-description']['en-us'] = 'Description';
$text['label-advanced']['en-us'] = 'Show Advanced';
$text['label-option']['en-us'] = 'Option';
$text['label-destination']['en-us'] = 'Destination';
$text['label-order']['en-us'] = 'Order';
$text['description-name']['en-us'] = 'Enter a name for the IVR menu.';
$text['description-extension']['en-us'] = 'Enter the extension number.';
$text['description-greet_long']['en-us'] = 'The long greeting is played when entering the menu.';
$text['description-greet_short']['en-us'] = 'The short greeting is played when returning to the menu.';
$text['description-timeout']['en-us'] = 'The number of milliseconds to wait after playing the greeting or the confirm macro.';
$text['description-exit_action']['en-us'] = 'Select the exit action to be performed if the IVR exits.';
$text['description-direct_dial']['en-us'] = 'Define whether callers can dial directly to extensions and feature codes.';
$text['description-ring_back']['en-us'] = 'Defines what the caller will hear while the destination is being called.';
$text['description-caller_id_name_prefix']['en-us'] = 'Set a prefix on the caller ID name.';
$text['description-invalid_sound']['en-us'] = 'Played when and invalid option is chosen.';
$text['description-exit_sound']['en-us'] = 'Played when leaving the menu.';
$text['description-comfirm_macro']['en-us'] = 'Enter the confirm macro.';
$text['description-comfirm_key']['en-us'] = 'Enter the confirm key.';
$text['description-tts_engine']['en-us'] = 'Text to speech engine.';
$text['description-tts_voice']['en-us'] = 'Text to speech voice.';
$text['description-comfirm_attempts']['en-us'] = 'The maximum number of confirm attempts allowed.';
$text['description-inter-digit_timeout']['en-us'] = 'The number of milliseconds to wait between digits.';
$text['description-max_failures']['en-us'] = 'Maximum number of retries before exit.';
$text['description-max_timeouts']['en-us'] = 'Maximum number of timeouts before exit.';
$text['description-digit_length']['en-us'] = 'Maximum number of digits allowed.';
$text['description-enabled']['en-us'] = 'Set the status of this IVR Menu.';
$text['description-description']['en-us'] = 'Enter a description, if desired.';
$text['description-option']['en-us'] = 'Any number between 1-5 digits or regular expressions.';
$text['description-destination']['en-us'] = 'Select the destination.';
$text['description-order']['en-us'] = 'Select the order.';
$text['option-true']['en-us'] = 'True';
$text['option-false']['en-us'] = 'False';
$text['button-add']['en-us'] = 'Add';
$text['button-edit']['en-us'] = 'Edit';
$text['button-delete']['en-us'] = 'Delete';
$text['button-advanced']['en-us'] = 'Advanced';
$text['button-back']['en-us'] = 'Back';
$text['button-copy']['en-us'] = 'Copy';
$text['button-save']['en-us'] = 'Save';
$text['button-restore']['en-us'] = 'Restore Default';
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
$text['confirm-copy']['en-us'] = 'Do you really want to copy this?';
$text['message-add']['en-us'] = 'Add Completed';
$text['message-update']['en-us'] = 'Update Completed';
$text['message-delete']['en-us'] = 'Delete Completed';
$text['message-copy']['en-us'] = 'Copy Completed';
$text['message-required']['en-us'] = 'Please provide: ';
?> ?>

View File

@@ -46,7 +46,7 @@ else {
$ivr_menu_uuid = $_GET["id"]; $ivr_menu_uuid = $_GET["id"];
} }
//get the ivr_menus data //get the ivr_menus data
$sql = "select * from v_ivr_menus "; $sql = "select * from v_ivr_menus ";
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and ivr_menu_uuid = '$ivr_menu_uuid' "; $sql .= "and ivr_menu_uuid = '$ivr_menu_uuid' ";
@@ -179,7 +179,7 @@ else {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Copy Complete\n"; echo $text['message-copy']."\n";
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@@ -61,7 +61,7 @@ if (strlen($id)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Delete Complete\n"; echo $text['message-delete']."\n";
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@@ -137,29 +137,27 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
} }
//check for all required data //check for all required data
//if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid<br>\n"; } if (strlen($ivr_menu_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
if (strlen($ivr_menu_name) == 0) { $msg .= "Please provide: Name<br>\n"; } if (strlen($ivr_menu_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
if (strlen($ivr_menu_extension) == 0) { $msg .= "Please provide: Extension<br>\n"; } if (strlen($ivr_menu_greet_long) == 0) { $msg .= $text['message-required'].$text['label-greet_long']."<br>\n"; }
if (strlen($ivr_menu_greet_long) == 0) { $msg .= "Please provide: Greet Long<br>\n"; } //if (strlen($ivr_menu_greet_short) == 0) { $msg .= $text['message-required'].$text['label-greet_short']."<br>\n"; }
//if (strlen($ivr_menu_greet_short) == 0) { $msg .= "Please provide: Greet Short<br>\n"; } if (strlen($ivr_menu_invalid_sound) == 0) { $msg .= $text['message-required'].$text['label-invalid_sound']."<br>\n"; }
if (strlen($ivr_menu_invalid_sound) == 0) { $msg .= "Please provide: Invalid Sound<br>\n"; } //if (strlen($ivr_menu_exit_sound) == 0) { $msg .= $text['message-required'].$text['label-exit_sound']."<br>\n"; }
//if (strlen($ivr_menu_exit_sound) == 0) { $msg .= "Please provide: Exit Sound<br>\n"; } //if (strlen($ivr_menu_confirm_macro) == 0) { $msg .= $text['message-required'].$text['label-comfirm_macro']."<br>\n"; }
//if (strlen($ivr_menu_confirm_macro) == 0) { $msg .= "Please provide: Confirm Macro<br>\n"; } //if (strlen($ivr_menu_confirm_key) == 0) { $msg .= $text['message-required'].$text['label-comfirm_key']."<br>\n"; }
//if (strlen($ivr_menu_confirm_key) == 0) { $msg .= "Please provide: Confirm Key<br>\n"; } //if (strlen($ivr_menu_tts_engine) == 0) { $msg .= $text['message-required'].$text['label-tts_engine']."<br>\n"; }
//if (strlen($ivr_menu_tts_engine) == 0) { $msg .= "Please provide: TTS Engine<br>\n"; } //if (strlen($ivr_menu_tts_voice) == 0) { $msg .= $text['message-required'].$text['label-tts_voice']."<br>\n"; }
//if (strlen($ivr_menu_tts_voice) == 0) { $msg .= "Please provide: TTS Voice<br>\n"; } if (strlen($ivr_menu_confirm_attempts) == 0) { $msg .= $text['message-required'].$text['label-comfirm_attempts']."<br>\n"; }
if (strlen($ivr_menu_confirm_attempts) == 0) { $msg .= "Please provide: Confirm Attempts<br>\n"; } if (strlen($ivr_menu_timeout) == 0) { $msg .= $text['message-required'].$text['label-timeout']."<br>\n"; }
if (strlen($ivr_menu_timeout) == 0) { $msg .= "Please provide: Timeout<br>\n"; } //if (strlen($ivr_menu_exit_app) == 0) { $msg .= $text['message-required'].$text['label-exit_action']."<br>\n"; }
//if (strlen($ivr_menu_exit_app) == 0) { $msg .= "Please provide: Exit Action<br>\n"; } if (strlen($ivr_menu_inter_digit_timeout) == 0) { $msg .= $text['message-required'].$text['label-inter_digit_timeout']."<br>\n"; }
//if (strlen($ivr_menu_exit_data) == 0) { $msg .= "Please provide: Timeout Data<br>\n"; } if (strlen($ivr_menu_max_failures) == 0) { $msg .= $text['message-required'].$text['label-max_failures']."<br>\n"; }
if (strlen($ivr_menu_inter_digit_timeout) == 0) { $msg .= "Please provide: Inter Digit Timeout<br>\n"; } if (strlen($ivr_menu_max_timeouts) == 0) { $msg .= $text['message-required'].$text['label-max_timeouts']."<br>\n"; }
if (strlen($ivr_menu_max_failures) == 0) { $msg .= "Please provide: Max Failures<br>\n"; } if (strlen($ivr_menu_digit_len) == 0) { $msg .= $text['message-required'].$text['label-digit_length']."<br>\n"; }
if (strlen($ivr_menu_max_timeouts) == 0) { $msg .= "Please provide: Max Timeouts<br>\n"; } if (strlen($ivr_menu_direct_dial) == 0) { $msg .= $text['message-required'].$text['label-direct_dial']."<br>\n"; }
if (strlen($ivr_menu_digit_len) == 0) { $msg .= "Please provide: Digit Length<br>\n"; } //if (strlen($ivr_menu_ringback) == 0) { $msg .= $text['message-required'].$text['label-ring_back']."<br>\n"; }
if (strlen($ivr_menu_direct_dial) == 0) { $msg .= "Please provide: Direct Dial<br>\n"; } if (strlen($ivr_menu_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."<br>\n"; }
//if (strlen($ivr_menu_ringback) == 0) { $msg .= "Please provide: Ringback<br>\n"; } //if (strlen($ivr_menu_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
if (strlen($ivr_menu_enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
//if (strlen($ivr_menu_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php"; require_once "includes/header.php";
require_once "includes/persistformvar.php"; require_once "includes/persistformvar.php";
@@ -229,7 +227,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Update Complete\n"; echo $text['message-update']."\n";
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@@ -296,6 +294,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//content //content
require_once "includes/header.php"; require_once "includes/header.php";
$page["title"] = $text['title-ivr_menu'];
echo "<script type=\"text/javascript\" language=\"JavaScript\">\n"; echo "<script type=\"text/javascript\" language=\"JavaScript\">\n";
echo "\n"; echo "\n";
@@ -329,43 +328,41 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo " <td align='left' width='30%' nowrap='nowrap' align='left'><b>IVR Menu</b></td>\n"; echo " <td align='left' width='30%' nowrap='nowrap' align='left'><b>".$text['header-ivr_menu']."</b></td>\n";
echo " <td width='70%' align='right'>\n"; echo " <td width='70%' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('Do you really want to copy this?')){window.location='ivr_menu_copy.php?id=".$ivr_menu_uuid."';}\" value='Copy'>\n"; echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='ivr_menu_copy.php?id=".$ivr_menu_uuid."';}\" value='".$text['button-copy']."'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='ivr_menus.php'\" value='Back'>\n"; echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='ivr_menus.php'\" value='".$text['button-back']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td colspan='2' align='left'>\n"; echo "<td colspan='2' align='left'>".$text['description-ivr_menu']."</td>\n";
echo "The IVR Menu plays a recording or a pre-defined phrase that presents the caller with options to choose from. Each option has a corresponding destination. The destinations can be extensions, voicemail, IVR menus, hunt groups, FAX extensions, and more. <br /><br />\n";
echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Name:\n"; echo " ".$text['label-name'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_name' maxlength='255' value=\"$ivr_menu_name\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_name' maxlength='255' value=\"$ivr_menu_name\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter a name for the IVR menu.\n"; echo $text['description-name']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Extension:\n"; echo " ".$text['label-extension'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_extension' maxlength='255' value='$ivr_menu_extension'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_extension' maxlength='255' value='$ivr_menu_extension'>\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter the extension number. \n"; echo $text['description-extension']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Greet Long:\n"; echo " ".$text['label-greet_long'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
@@ -473,13 +470,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
} }
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo "The long greeting is played when entering the menu.\n"; echo $text['description-greet_long']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Greet Short:\n"; echo " ".$text['label-greet_short'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
@@ -554,66 +551,66 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo "The short greeting is played when returning to the menu.\n"; echo $text['description-greet_short']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Timeout:\n"; echo " ".$text['label-timeout'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_timeout' maxlength='255' value='$ivr_menu_timeout'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_timeout' maxlength='255' value='$ivr_menu_timeout'>\n";
echo "<br />\n"; echo "<br />\n";
echo "The number of milliseconds to wait after playing the greeting or the confirm macro.\n"; echo $text['description-timeout']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Exit Action:\n"; echo " ".$text['label-exit_action'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
//switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action);
switch_select_destination("dialplan", "", "ivr_menu_exit_action", $ivr_menu_exit_action, "", ""); switch_select_destination("dialplan", "", "ivr_menu_exit_action", $ivr_menu_exit_action, "", "");
echo " <br />\n"; echo " <br />\n";
echo " Select the exit action to be performed if the IVR exits.\n"; echo " ".$text['description-exit_action']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Direct Dial:\n"; echo " ".$text['label-direct_dial'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='ivr_menu_direct_dial'>\n"; echo " <select class='formfld' name='ivr_menu_direct_dial'>\n";
echo " <option value=''></option>\n"; echo " <option value=''></option>\n";
if ($ivr_menu_direct_dial == "true") { if ($ivr_menu_direct_dial == "true") {
echo " <option value='true' selected='selected'>true</option>\n"; echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
} }
else { else {
echo " <option value='true'>true</option>\n"; echo " <option value='true'>".$text['option-true']."</option>\n";
} }
if ($ivr_menu_direct_dial == "false") { if ($ivr_menu_direct_dial == "false") {
echo " <option value='false' selected='selected'>false</option>\n"; echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
} }
else { else {
echo " <option value='false'>false</option>\n"; echo " <option value='false'>".$text['option-false']."</option>\n";
} }
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo "Define whether callers can dial directly to extensions and feature codes.\n"; echo $text['description-direct_dial']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n"; echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Ring Back:\n"; echo " ".$text['label-ring_back'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
$select_options = ""; $select_options = "";
if ($ivr_menu_ringback == "\${us-ring}" || $ivr_menu_ringback == "us-ring") { if ($ivr_menu_ringback == "\${us-ring}" || $ivr_menu_ringback == "us-ring") {
$select_options .= " <option value='\${us-ring}' selected='selected'>us-ring</option>\n"; $select_options .= " <option value='\${us-ring}' selected='selected'>us-ring</option>\n";
} }
else { else {
@@ -625,13 +622,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
else { else {
$select_options .= " <option value='\${fr-ring}'>fr-ring</option>\n"; $select_options .= " <option value='\${fr-ring}'>fr-ring</option>\n";
} }
if ($ivr_menu_ringback == "\${uk-ring}" || $ivr_menu_ringback == "uk-ring") { if ($ivr_menu_ringback == "\${uk-ring}" || $ivr_menu_ringback == "uk-ring") {
$select_options .= " <option value='\${uk-ring}' selected='selected'>uk-ring</option>\n"; $select_options .= " <option value='\${uk-ring}' selected='selected'>uk-ring</option>\n";
} }
else { else {
$select_options .= " <option value='\${uk-ring}'>uk-ring</option>\n"; $select_options .= " <option value='\${uk-ring}'>uk-ring</option>\n";
} }
if ($ivr_menu_ringback == "\${rs-ring}" || $ivr_menu_ringback == "rs-ring") { if ($ivr_menu_ringback == "\${rs-ring}" || $ivr_menu_ringback == "rs-ring") {
$select_options .= " <option value='\${rs-ring}' selected='selected'>rs-ring</option>\n"; $select_options .= " <option value='\${rs-ring}' selected='selected'>rs-ring</option>\n";
} }
else { else {
@@ -645,18 +642,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo $moh->select(); echo $moh->select();
echo "<br />\n"; echo "<br />\n";
echo "Defines what the caller will hear while the destination is being called.\n"; echo $text['description-ring_back']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " CID Prefix:\n"; echo " ".$text['label-caller_id_name_prefix'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_cid_prefix' maxlength='255' value=\"$ivr_menu_cid_prefix\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_cid_prefix' maxlength='255' value=\"$ivr_menu_cid_prefix\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Set a prefix on the caller ID name.\n"; echo $text['description-caller_id_name_prefix']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -667,9 +664,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <div id=\"show_advanced_box\">\n"; echo " <div id=\"show_advanced_box\">\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"6\" cellspacing=\"0\">\n"; echo " <table width=\"100%\" border=\"0\" cellpadding=\"6\" cellspacing=\"0\">\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td width=\"30%\" valign=\"top\" class=\"vncell\">Show Advanced</td>\n"; echo " <td width=\"30%\" valign=\"top\" class=\"vncell\">".$text['label-advanced']."</td>\n";
echo " <td width=\"70%\" class=\"vtable\">\n"; echo " <td width=\"70%\" class=\"vtable\">\n";
echo " <input type=\"button\" class='btn' onClick=\"show_advanced_config()\" value=\"Advanced\"></input></a>\n"; echo " <input type=\"button\" class='btn' onClick=\"show_advanced_config()\" value=\"".$text['button-advanced']."\"></input></a>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " </table>\n"; echo " </table>\n";
@@ -680,122 +677,122 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Invalid Sound:\n"; echo " ".$text['label-invalid_sound'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_invalid_sound' maxlength='255' value=\"$ivr_menu_invalid_sound\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_invalid_sound' maxlength='255' value=\"$ivr_menu_invalid_sound\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Played when and invalid option is chosen.\n"; echo $text['description-invalid_sound']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Exit Sound:\n"; echo " ".$text['label-exit_sound'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_exit_sound' maxlength='255' value=\"$ivr_menu_exit_sound\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_exit_sound' maxlength='255' value=\"$ivr_menu_exit_sound\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Played when leaving the menu.\n"; echo $text['description-exit_sound']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Confirm Macro:\n"; echo " ".$text['label-comfirm_macro'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_confirm_macro' maxlength='255' value=\"$ivr_menu_confirm_macro\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_confirm_macro' maxlength='255' value=\"$ivr_menu_confirm_macro\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter the confirm macro.\n"; echo $text['description-comfirm_macro']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Confirm Key:\n"; echo " ".$text['label-comfirm_key'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_confirm_key' maxlength='255' value=\"$ivr_menu_confirm_key\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_confirm_key' maxlength='255' value=\"$ivr_menu_confirm_key\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter the confirm key.\n"; echo $text['description-comfirm_key']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " TTS Engine:\n"; echo " ".$text['label-tts_engine'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_tts_engine' maxlength='255' value=\"$ivr_menu_tts_engine\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_tts_engine' maxlength='255' value=\"$ivr_menu_tts_engine\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Text to speech engine.\n"; echo $text['description-tts_engine']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " TTS Voice:\n"; echo " ".$text['label-tts_voice'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_tts_voice' maxlength='255' value=\"$ivr_menu_tts_voice\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_tts_voice' maxlength='255' value=\"$ivr_menu_tts_voice\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Text to speech voice.\n"; echo $text['description-tts_voice']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Confirm Attempts:\n"; echo " ".$text['label-comfirm_attempts'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_confirm_attempts' maxlength='255' value='$ivr_menu_confirm_attempts'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_confirm_attempts' maxlength='255' value='$ivr_menu_confirm_attempts'>\n";
echo "<br />\n"; echo "<br />\n";
echo "The maximum number of confirm attempts allowed.\n"; echo $text['description-comfirm_attempts']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Inter Digit Timeout:\n"; echo " ".$text['label-inter-digit_timeout'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_inter_digit_timeout' maxlength='255' value='$ivr_menu_inter_digit_timeout'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_inter_digit_timeout' maxlength='255' value='$ivr_menu_inter_digit_timeout'>\n";
echo "<br />\n"; echo "<br />\n";
echo "The number of milliseconds to wait between digits.\n"; echo $text['description-inter-digit_timeout']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Max Failures:\n"; echo " ".$text['label-max_failures'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_max_failures' maxlength='255' value='$ivr_menu_max_failures'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_max_failures' maxlength='255' value='$ivr_menu_max_failures'>\n";
echo "<br />\n"; echo "<br />\n";
echo "Maximum number of retries before exit.\n"; echo $text['description-max_failures']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Max Timeouts:\n"; echo " ".$text['label-max_timeouts'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_max_timeouts' maxlength='255' value='$ivr_menu_max_timeouts'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_max_timeouts' maxlength='255' value='$ivr_menu_max_timeouts'>\n";
echo "<br />\n"; echo "<br />\n";
echo "Maximum number of timeouts before exit.\n"; echo $text['description-max_timeouts']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Digit Length:\n"; echo " ".$text['label-digit_length'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_digit_len' maxlength='255' value='$ivr_menu_digit_len'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_digit_len' maxlength='255' value='$ivr_menu_digit_len'>\n";
echo "<br />\n"; echo "<br />\n";
echo "Maximum number of digits allowed.\n"; echo $text['description-digit_length']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -808,37 +805,37 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Enabled:\n"; echo " ".$text['label-enabled'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='ivr_menu_enabled'>\n"; echo " <select class='formfld' name='ivr_menu_enabled'>\n";
echo " <option value=''></option>\n"; echo " <option value=''></option>\n";
if ($ivr_menu_enabled == "true") { if ($ivr_menu_enabled == "true") {
echo " <option value='true' selected='selected'>true</option>\n"; echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
} }
else { else {
echo " <option value='true'>true</option>\n"; echo " <option value='true'>".$text['option-true']."</option>\n";
} }
if ($ivr_menu_enabled == "false") { if ($ivr_menu_enabled == "false") {
echo " <option value='false' selected='selected'>false</option>\n"; echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
} }
else { else {
echo " <option value='false'>false</option>\n"; echo " <option value='false'>".$text['option-false']."</option>\n";
} }
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo "Define whether the IVR Menu is enabled or disabled.\n"; echo $text['description-enabled']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Description:\n"; echo " ".$text['label-description'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_description' maxlength='255' value=\"$ivr_menu_description\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_description' maxlength='255' value=\"$ivr_menu_description\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter a description.\n"; echo $text['description-description']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo " <tr>\n"; echo " <tr>\n";
@@ -846,7 +843,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") { if ($action == "update") {
echo " <input type='hidden' name='ivr_menu_uuid' value='$ivr_menu_uuid'>\n"; echo " <input type='hidden' name='ivr_menu_uuid' value='$ivr_menu_uuid'>\n";
} }
echo " <input type='submit' name='submit' class='btn' value='Save'>\n"; echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";

View File

@@ -61,7 +61,7 @@ else {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menu_edit.php?id=$ivr_menu_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menu_edit.php?id=$ivr_menu_uuid\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Delete Complete\n"; echo $text['message-delete']."\n";
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@@ -83,13 +83,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
} }
//check for all required data //check for all required data
//if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid<br>\n"; } if (strlen($ivr_menu_option_digits) == 0) { $msg .= $text['message-required'].$text['label-option']."<br>\n"; }
//if (strlen($ivr_menu_uuid) == 0) { $msg .= "Please provide: ivr_menu_uuid<br>\n"; } //if (strlen($ivr_menu_option_param) == 0) { $msg .= $text['message-required'].$text['label-destination']."<br>\n"; }
if (strlen($ivr_menu_option_digits) == 0) { $msg .= "Please provide: Option<br>\n"; } if (strlen($ivr_menu_option_order) == 0) { $msg .= $text['message-required'].$text['label-order']."<br>\n"; }
//if (strlen($ivr_menu_option_action) == 0) { $msg .= "Please provide: Type<br>\n"; } //if (strlen($ivr_menu_option_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
//if (strlen($ivr_menu_option_param) == 0) { $msg .= "Please provide: Destination<br>\n"; }
if (strlen($ivr_menu_option_order) == 0) { $msg .= "Please provide: Order<br>\n"; }
//if (strlen($ivr_menu_option_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php"; require_once "includes/header.php";
require_once "includes/persistformvar.php"; require_once "includes/persistformvar.php";
@@ -143,7 +140,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menu_edit.php?id=$ivr_menu_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menu_edit.php?id=$ivr_menu_uuid\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Update Complete\n"; echo $text['message-add']."\n";
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@@ -186,6 +183,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//send the content to the browser //send the content to the browser
require_once "includes/header.php"; require_once "includes/header.php";
if ($action == "add") {
$page["title"] = $text['title-option_add'];
}
if ($action == "update") {
$page["title"] = $text['title-option_edit'];
}
echo "<div align='center'>"; echo "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
@@ -199,27 +202,27 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n"; echo "<tr>\n";
if ($action == "add") { if ($action == "add") {
echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>IVR Menu Option Add</b></td>\n"; echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>".$text['header-option_add']."</b></td>\n";
} }
if ($action == "update") { if ($action == "update") {
echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>IVR Menu Option Edit</b></td>\n"; echo "<td align='left' width='30%' nowrap='nowrap' align='left'><b>".$text['header-option_edit']."</b></td>\n";
} }
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='ivr_menu_edit.php?id=$ivr_menu_uuid'\" value='Back'></td>\n"; echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='ivr_menu_edit.php?id=$ivr_menu_uuid'\" value='".$text['button-back']."'></td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td colspan='2' align='left'>\n"; echo "<td colspan='2' align='left'>\n";
echo "The recording presents options to the caller. Options match key presses (DTMF digits) from the caller which directs the call to the destinations. <br /><br />\n"; echo $text['description-option_add_edit']."<br /><br />\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Option:\n"; echo " ".$text['label-option'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_option_digits' maxlength='255' value='$ivr_menu_option_digits'>\n"; echo " <input class='formfld' type='text' name='ivr_menu_option_digits' maxlength='255' value='$ivr_menu_option_digits'>\n";
echo "<br />\n"; echo "<br />\n";
echo "Any number between 1-5 digits or regular expressions.\n"; echo $text['description-option']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -285,7 +288,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Destination:\n"; echo " ".$text['label-destination'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
@@ -298,13 +301,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset($tmp_select_value); unset($tmp_select_value);
echo "<br />\n"; echo "<br />\n";
echo "Select the destination.\n"; echo $text['description-destination']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " Order:\n"; echo " ".$text['label-order'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <select name='ivr_menu_option_order' class='formfld'>\n"; echo " <select name='ivr_menu_option_order' class='formfld'>\n";
@@ -327,18 +330,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
} }
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo "Select the order.\n"; echo $text['description-order']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Description:\n"; echo " ".$text['label-description'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='ivr_menu_option_description' maxlength='255' value=\"$ivr_menu_option_description\">\n"; echo " <input class='formfld' type='text' name='ivr_menu_option_description' maxlength='255' value=\"$ivr_menu_option_description\">\n";
echo "<br />\n"; echo "<br />\n";
echo "Enter a description here for your reference.\n"; echo $text['description-description']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo " <tr>\n"; echo " <tr>\n";
@@ -347,7 +350,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") { if ($action == "update") {
echo " <input type='hidden' name='ivr_menu_option_uuid' value='$ivr_menu_option_uuid'>\n"; echo " <input type='hidden' name='ivr_menu_option_uuid' value='$ivr_menu_option_uuid'>\n";
} }
echo " <input type='submit' name='submit' class='btn' value='Save'>\n"; echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>"; echo " </tr>";

View File

@@ -52,16 +52,14 @@ else {
echo "<table width='100%' border='0'>\n"; echo "<table width='100%' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='50%' nowrap='nowrap' align='left'><b>IVR Menu Option List</b></td>\n"; echo "<td width='50%' nowrap='nowrap' align='left'><b>".$text['header-option_list']."</b></td>\n";
echo "<td width='50%' align='right'>&nbsp;</td>\n"; echo "<td width='50%' align='right'>&nbsp;</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td colspan='2' align='left'>\n"; echo "<td colspan='2' align='left'>".$text['description-option_list']."</td>\n";
echo "The recording presents options to the caller. Options match key presses (DTMF digits) from the caller which directs the call to the destinations. <br /><br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "<br>\n";
//get the number of rows in ivr_menu_options //get the number of rows in ivr_menu_options
$sql = "select count(*) as num_rows from v_ivr_menu_options "; $sql = "select count(*) as num_rows from v_ivr_menu_options ";
@@ -92,7 +90,7 @@ else {
$sql = "select * from v_ivr_menu_options "; $sql = "select * from v_ivr_menu_options ";
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and ivr_menu_uuid = '$ivr_menu_uuid' "; $sql .= "and ivr_menu_uuid = '$ivr_menu_uuid' ";
$sql .= "order by ivr_menu_option_digits, ivr_menu_option_order asc "; $sql .= "order by ivr_menu_option_digits, ivr_menu_option_order asc ";
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute(); $prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
@@ -105,13 +103,13 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<th>Option</th>\n"; echo "<th>".$text['label-option']."</th>\n";
echo "<th>Destination</th>\n"; echo "<th>".$text['label-destination']."</th>\n";
echo "<th>Order</th>\n"; echo "<th>".$text['label-order']."</th>\n";
echo "<th>Description</th>\n"; echo "<th>".$text['label-description']."</th>\n";
echo "<td align='right' width='42'>\n"; echo "<td align='right' width='42'>\n";
if (permission_exists('ivr_menu_add')) { if (permission_exists('ivr_menu_add')) {
echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$ivr_menu_uuid."' alt='add'>$v_link_label_add</a>\n"; echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$ivr_menu_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
} }
echo "</td>\n"; echo "</td>\n";
echo "<tr>\n"; echo "<tr>\n";
@@ -139,10 +137,10 @@ else {
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_option_description']."&nbsp;</td>\n"; echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_option_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n"; echo " <td valign='top' align='right'>\n";
if (permission_exists('ivr_menu_edit')) { if (permission_exists('ivr_menu_edit')) {
echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$row['ivr_menu_uuid']."&id=".$row['ivr_menu_option_uuid']."' alt='edit'>$v_link_label_edit</a>\n"; echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$row['ivr_menu_uuid']."&id=".$row['ivr_menu_option_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
} }
if (permission_exists('ivr_menu_delete')) { if (permission_exists('ivr_menu_delete')) {
echo " <a href='ivr_menu_option_delete.php?ivr_menu_uuid=".$row['ivr_menu_uuid']."&id=".$row['ivr_menu_option_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n"; echo " <a href='ivr_menu_option_delete.php?ivr_menu_uuid=".$row['ivr_menu_uuid']."&id=".$row['ivr_menu_option_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
} }
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -159,7 +157,7 @@ else {
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n"; echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n"; echo " <td width='33.3%' align='right'>\n";
if (permission_exists('ivr_menu_add')) { if (permission_exists('ivr_menu_add')) {
echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$ivr_menu_uuid."' alt='add'>$v_link_label_add</a>\n"; echo " <a href='ivr_menu_option_edit.php?ivr_menu_uuid=".$ivr_menu_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
} }
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";

View File

@@ -42,6 +42,8 @@ else {
//additional includes //additional includes
require_once "includes/header.php"; require_once "includes/header.php";
$page["title"] = $text['title-ivr_menus'];
require_once "includes/paging.php"; require_once "includes/paging.php";
//get the http values and set them as variables //get the http values and set them as variables
@@ -64,17 +66,13 @@ else {
//show the content header //show the content header
echo "<table width='100%' border='0'>\n"; echo "<table width='100%' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='50%' nowrap='nowrap' align='left'><b>IVR Menu</b></td>\n"; echo "<td width='50%' nowrap='nowrap' align='left'><b>".$text['header-ivr_menus']."</b></td>\n";
echo "<td width='50%' align='right'>&nbsp;</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td colspan='2' align='left'>\n"; echo "<td align='left'>".$text['description-ivr_menus']."</td>\n";
echo "The IVR Menu plays a recording or a pre-defined phrase that presents the caller with options to choose from. \n";
echo "Each option has a corresponding destination. The destinations can be extensions, voicemail, other IVR menus, call groups, FAX extensions, and more. <br /><br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "<br>\n";
//get the count //get the count
require_once "includes/classes/database.php"; require_once "includes/classes/database.php";
@@ -93,8 +91,8 @@ else {
$param = ""; $param = "";
if (!isset($_GET['page'])) { $_GET['page'] = 0; } if (!isset($_GET['page'])) { $_GET['page'] = 0; }
$_GET['page'] = check_str($_GET['page']); $_GET['page'] = check_str($_GET['page']);
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $_GET['page']; $offset = $rows_per_page * $_GET['page'];
//get the list from the db //get the list from the db
if (isset($order_by)) { if (isset($order_by)) {
@@ -113,14 +111,14 @@ else {
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo th_order_by('ivr_menu_name', 'Name', $order_by[0]['name'], $order_by[0]['order']); echo th_order_by('ivr_menu_name', $text['label-name'], $order_by[0]['name'], $order_by[0]['order']);
echo th_order_by('ivr_menu_extension', 'Extension', $order_by[0]['name'], $order_by[0]['order']); echo th_order_by('ivr_menu_extension', $text['label-extension'], $order_by[0]['name'], $order_by[0]['order']);
echo th_order_by('ivr_menu_direct_dial', 'Direct Dial', $order_by[0]['name'], $order_by[0]['order']); echo th_order_by('ivr_menu_direct_dial', $text['label-direct_dial'], $order_by[0]['name'], $order_by[0]['order']);
echo th_order_by('ivr_menu_enabled', 'Enabled', $order_by[0]['name'], $order_by[0]['order']); echo th_order_by('ivr_menu_enabled', $text['label-enabled'], $order_by[0]['name'], $order_by[0]['order']);
echo th_order_by('ivr_menu_description', 'Description', $order_by[0]['name'], $order_by[0]['order']); echo th_order_by('ivr_menu_description', $text['label-description'], $order_by[0]['name'], $order_by[0]['order']);
echo "<td align='right' width='42'>\n"; echo "<td align='right' width='42'>\n";
if (permission_exists('ivr_menu_add')) { if (permission_exists('ivr_menu_add')) {
echo " <a href='ivr_menu_edit.php' alt='add'>$v_link_label_add</a>\n"; echo " <a href='ivr_menu_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
} }
echo "</td>\n"; echo "</td>\n";
echo "<tr>\n"; echo "<tr>\n";
@@ -136,10 +134,10 @@ else {
echo " <td valign='top' class='row_stylebg'>".$row['ivr_menu_description']."&nbsp;</td>\n"; echo " <td valign='top' class='row_stylebg'>".$row['ivr_menu_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n"; echo " <td valign='top' align='right'>\n";
if (permission_exists('ivr_menu_edit')) { if (permission_exists('ivr_menu_edit')) {
echo " <a href='ivr_menu_edit.php?id=".$row['ivr_menu_uuid']."' alt='edit'>$v_link_label_edit</a>\n"; echo " <a href='ivr_menu_edit.php?id=".$row['ivr_menu_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
} }
if (permission_exists('ivr_menu_delete')) { if (permission_exists('ivr_menu_delete')) {
echo " <a href='ivr_menu_delete.php?id=".$row['ivr_menu_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n"; echo " <a href='ivr_menu_delete.php?id=".$row['ivr_menu_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
} }
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -156,7 +154,7 @@ else {
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n"; echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n"; echo " <td width='33.3%' align='right'>\n";
if (permission_exists('ivr_menu_add')) { if (permission_exists('ivr_menu_add')) {
echo " <a href='ivr_menu_edit.php' alt='add'>$v_link_label_add</a>\n"; echo " <a href='ivr_menu_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
} }
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";