From 151d2db73545fba0231dd1258d11896e3dad064b Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Sun, 15 Feb 2015 04:54:32 +0000 Subject: [PATCH] Voicemails: Initial GUI for adding IVR-style menu options to the voicemail system. Devices: Minor visual adjustment. IVR Menu: Minor visual and language adjustments. --- app/devices/device_profiles.php | 2 +- app/devices/devices.php | 2 +- app/ivr_menu/app_languages.php | 8 + app/ivr_menu/ivr_menu_edit.php | 93 ++++--- app/voicemails/app_config.php | 53 +++- app/voicemails/app_languages.php | 46 +++- app/voicemails/voicemail_edit.php | 270 ++++++++++++++++----- app/voicemails/voicemail_messages.php | 40 +-- app/voicemails/voicemail_option_delete.php | 60 +++++ app/voicemails/voicemail_option_edit.php | 244 +++++++++++++++++++ app/voicemails/voicemails.php | 44 +--- 11 files changed, 684 insertions(+), 178 deletions(-) create mode 100644 app/voicemails/voicemail_option_delete.php create mode 100644 app/voicemails/voicemail_option_edit.php diff --git a/app/devices/device_profiles.php b/app/devices/device_profiles.php index e8fa7fdf60..fd4e2c8262 100644 --- a/app/devices/device_profiles.php +++ b/app/devices/device_profiles.php @@ -59,7 +59,7 @@ else { echo " \n"; echo " \n"; echo "
\n"; - echo " \n"; + echo "     "; echo " "; echo " "; echo "
\n"; diff --git a/app/devices/devices.php b/app/devices/devices.php index f9c5f3832f..0b8f87bed0 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -59,7 +59,7 @@ else { echo " \n"; echo "
\n"; if (permission_exists('device_profile_view')) { - echo " "; + echo "     "; } echo " "; echo " "; diff --git a/app/ivr_menu/app_languages.php b/app/ivr_menu/app_languages.php index c738522ccb..0d2d8eca12 100644 --- a/app/ivr_menu/app_languages.php +++ b/app/ivr_menu/app_languages.php @@ -141,10 +141,12 @@ $text['label-tts_voice']['fr-fr'] = "Voix TTS"; $text['label-comfirm_attempts']['en-us'] = "Confirm Attempts"; + $text['label-comfirm_attempts']['es-cl'] = "confirme intentos"; $text['label-comfirm_attempts']['pt-pt'] = "Confirmar Tentativas"; $text['label-comfirm_attempts']['fr-fr'] = "Essais de Confirmation"; $text['label-inter-digit_timeout']['en-us'] = "Inter-Digit Timeout"; + $text['label-inter-digit_timeout']['es-cl'] = "Inter-Digit Tiempo de espera"; $text['label-inter-digit_timeout']['pt-pt'] = "Timeout Entre-Dígitos"; $text['label-inter-digit_timeout']['fr-fr'] = "Timeout Inter-Digit"; @@ -183,6 +185,11 @@ $text['label-options']['pt-pt'] = "Opções"; $text['label-options']['fr-fr'] = "Options"; + $text['description-options']['en-us'] = "Define caller options for the IVR menu."; + $text['description-options']['es-cl'] = "Definir opções de chamadas para o menu IVR."; + $text['description-options']['pt-pt'] = "Definir opções de chamadas para o menu IVR."; + $text['description-options']['fr-fr'] = "Définir les options de l'appelant pour le menu IVR."; + $text['label-destination']['en-us'] = "Destination"; $text['label-destination']['es-cl'] = "Destino"; $text['label-destination']['pt-pt'] = "Destino"; @@ -349,6 +356,7 @@ $text['button-advanced']['fr-fr'] = "Afficher les paramètres avancés"; $text['button-back']['en-us'] = "Back"; + $text['button-back']['es-cl'] = "espalda"; $text['button-back']['pt-pt'] = "Voltar"; $text['button-back']['fr-fr'] = "Retour"; diff --git a/app/ivr_menu/ivr_menu_edit.php b/app/ivr_menu/ivr_menu_edit.php index 80c35963b4..0ac925f2e6 100644 --- a/app/ivr_menu/ivr_menu_edit.php +++ b/app/ivr_menu/ivr_menu_edit.php @@ -316,32 +316,29 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "}\n"; echo ""; - 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 "
".$text['header-ivr_menu']."\n"; + echo " "; + echo " ".$text['header-ivr_menu'].""; + echo "

"; + echo " ".$text['description-ivr_menu']; + echo "

"; + echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo "
".$text['description-ivr_menu']."
"; + echo "\n"; + echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " "; - echo " "; + echo " "; echo " "; 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 "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; - echo " "; - echo "
\n"; - echo " ".$text['label-name'].":\n"; + echo "\n"; + echo " ".$text['label-name']."\n"; echo "\n"; + echo "\n"; echo " \n"; echo "
\n"; echo $text['description-name']."\n"; @@ -350,7 +347,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-extension'].":\n"; + echo " ".$text['label-extension']."\n"; echo "\n"; echo " \n"; @@ -361,7 +358,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-greet_long'].":\n"; + echo " ".$text['label-greet_long']."\n"; echo "\n"; @@ -489,17 +486,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-greet_short'].":\n"; + echo " ".$text['label-greet_short']."\n"; echo "\n"; - echo "\n"; - if (if_group("superadmin")) { - echo "\n"; - } + echo "
".$text['label-options'].":".$text['label-options'].""; echo " \n"; echo " \n"; @@ -642,9 +633,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; } } -unset($sql, $result); + unset($sql, $result); -for ($c = 0; $c < 1; $c++) { + for ($c = 0; $c < 1; $c++) { echo " \n"; echo "
\n"; echo " \n"; @@ -686,14 +677,14 @@ for ($c = 0; $c < 1; $c++) { } echo "
\n"; - echo " ".$text['description-destinations']."\n"; + echo " ".$text['description-options']."\n"; echo "
\n"; echo "
\n"; - echo " ".$text['label-timeout'].":\n"; + echo " ".$text['label-timeout']."\n"; echo "\n"; echo " \n"; @@ -704,7 +695,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-exit_action'].":\n"; + echo " ".$text['label-exit_action']."\n"; echo "\n"; //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); @@ -716,7 +707,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-direct_dial'].":\n"; + echo " ".$text['label-direct_dial']."\n"; echo "\n"; echo "
\n"; - echo " ".$text['label-ring_back'].":\n"; + echo " ".$text['label-ring_back']."\n"; echo "\n"; @@ -803,7 +794,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-caller_id_name_prefix'].":\n"; + echo " ".$text['label-caller_id_name_prefix']."\n"; echo "\n"; echo " \n"; @@ -830,7 +821,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-invalid_sound'].":\n"; + echo " ".$text['label-invalid_sound']."\n"; echo "\n"; echo " \n"; @@ -841,7 +832,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-exit_sound'].":\n"; + echo " ".$text['label-exit_sound']."\n"; echo "\n"; echo " \n"; @@ -852,7 +843,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-comfirm_macro'].":\n"; + echo " ".$text['label-comfirm_macro']."\n"; echo "\n"; echo " \n"; @@ -863,7 +854,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-comfirm_key'].":\n"; + echo " ".$text['label-comfirm_key']."\n"; echo "\n"; echo " \n"; @@ -874,7 +865,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-tts_engine'].":\n"; + echo " ".$text['label-tts_engine']."\n"; echo "\n"; echo " \n"; @@ -885,7 +876,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-tts_voice'].":\n"; + echo " ".$text['label-tts_voice']."\n"; echo "\n"; echo " \n"; @@ -896,7 +887,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-comfirm_attempts'].":\n"; + echo " ".$text['label-comfirm_attempts']."\n"; echo "\n"; echo " \n"; @@ -907,7 +898,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-inter-digit_timeout'].":\n"; + echo " ".$text['label-inter-digit_timeout']."\n"; echo "\n"; echo " \n"; @@ -918,7 +909,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-max_failures'].":\n"; + echo " ".$text['label-max_failures']."\n"; echo "\n"; echo " \n"; @@ -929,7 +920,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-max_timeouts'].":\n"; + echo " ".$text['label-max_timeouts']."\n"; echo "\n"; echo " \n"; @@ -940,7 +931,7 @@ for ($c = 0; $c < 1; $c++) { echo "
\n"; - echo " ".$text['label-digit_length'].":\n"; + echo " ".$text['label-digit_length']."\n"; echo "\n"; echo " \n"; @@ -957,7 +948,7 @@ for ($c = 0; $c < 1; $c++) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " "; echo "
\n"; - echo " ".$text['label-enabled'].":\n"; + echo " ".$text['label-enabled']."\n"; echo "\n"; echo "
\n"; - echo " ".$text['label-description'].":\n"; + echo " ".$text['label-description']."\n"; echo "\n"; echo " \n"; @@ -998,12 +989,10 @@ for ($c = 0; $c < 1; $c++) { echo "
"; + echo "
"; + echo ""; - echo "
"; - echo "
"; //include the footer require_once "resources/footer.php"; diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 2e4837efec..171757fa37 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -61,6 +61,8 @@ $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']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; @@ -109,6 +111,8 @@ $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']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_message_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; @@ -144,7 +148,7 @@ $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "message_status"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Voicemail message status"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Voicemail message status"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "message_priority"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; @@ -159,6 +163,8 @@ $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']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_destination_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; @@ -183,4 +189,49 @@ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "voicemail_uuid"; $z++; + $y = 3; //table array index + $z = 0; //field array index + $apps[$x]['db'][$y]['table'] = "v_voicemail_options"; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_option_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']['type'] = "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']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_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']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_voicemails"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "voicemail_uuid"; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "voicemail_option_digits"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "voicemail_option_action"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "voicemail_option_param"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "voicemail_option_order"; + $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']['text'] = "voicemail_option_description"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; ?> \ No newline at end of file diff --git a/app/voicemails/app_languages.php b/app/voicemails/app_languages.php index b9cb8cf32f..6d1c85791f 100644 --- a/app/voicemails/app_languages.php +++ b/app/voicemails/app_languages.php @@ -16,6 +16,16 @@ $text['description-voicemail']['pt-pt'] = "Definições do Correio de Voz"; $text['description-voicemail']['fr-fr'] = "Configuration messagerie."; + $text['title-voicemail_option']['en-us'] = "Voicemail Option"; + $text['title-voicemail_option']['es-cl'] = "Opción de correo de voz"; + $text['title-voicemail_option']['pt-pt'] = "Voicemail Opção"; + $text['title-voicemail_option']['fr-fr'] = "Option de messagerie vocale"; + + $text['header-voicemail_option']['en-us'] = "Voicemail Option"; + $text['header-voicemail_option']['es-cl'] = "Opción de correo de voz"; + $text['header-voicemail_option']['pt-pt'] = "Voicemail Opção"; + $text['header-voicemail_option']['fr-fr'] = "Option de messagerie vocale"; + $text['label-voicemail_id']['en-us'] = "Voicemail ID"; $text['label-voicemail_id']['es-cl'] = "ID de correo de voz"; $text['label-voicemail_id']['pt-pt'] = "ID de Correio de Voz"; @@ -102,9 +112,9 @@ $text['label-voicemail_description']['fr-fr'] = "Description"; $text['description-voicemail_description']['en-us'] = "Enter the description."; - $text['description-voicemail_description']['es-cl'] = "Ingrese una descripción"; - $text['description-voicemail_description']['pt-pt'] = "Introduza a descrição"; - $text['description-voicemail_description']['fr-fr'] = ""; + $text['description-voicemail_description']['es-cl'] = "Ingrese una descripción."; + $text['description-voicemail_description']['pt-pt'] = "Introduza a descrição."; + $text['description-voicemail_description']['fr-fr'] = "Entrez la description."; $text['label-count']['en-us'] = "Count"; $text['label-count']['es-cl'] = "Conteo"; @@ -156,6 +166,36 @@ $text['label-greetings']['pt-pt'] = "Saudações"; $text['label-greetings']['fr-fr'] = "Salutations"; + $text['label-description']['en-us'] = "Description"; + $text['label-description']['es-cl'] = "Descripción"; + $text['label-description']['pt-pt'] = "Descrição"; + $text['label-description']['fr-fr'] = "Description"; + + $text['label-option']['en-us'] = "Option"; + $text['label-option']['es-cl'] = "Opción"; + $text['label-option']['pt-pt'] = "Opção"; + $text['label-option']['fr-fr'] = "Option"; + + $text['label-options']['en-us'] = "Options"; + $text['label-options']['es-cl'] = "Opciones"; + $text['label-options']['pt-pt'] = "Opções"; + $text['label-options']['fr-fr'] = "Options"; + + $text['description-options']['en-us'] = "Define caller options for the voicemail greeting."; + $text['description-options']['es-cl'] = "Definir opciones del llamador para el saludo del correo de voz."; + $text['description-options']['pt-pt'] = "Definir opções de chamadas para a saudação de correio de voz."; + $text['description-options']['fr-fr'] = "Définir les options de l'appelant pour le message d'accueil."; + + $text['label-destination']['en-us'] = "Destination"; + $text['label-destination']['es-cl'] = "Destino"; + $text['label-destination']['pt-pt'] = "Destino"; + $text['label-destination']['fr-fr'] = "Destination"; + + $text['label-order']['en-us'] = "Order"; + $text['label-order']['es-cl'] = "Orden"; + $text['label-order']['pt-pt'] = "Ordem"; + $text['label-order']['fr-fr'] = "Ordre"; + $text['button-greetings']['en-us'] = "Greetings"; $text['button-greetings']['es-cl'] = "Bienvenida"; $text['button-greetings']['pt-pt'] = "Saudações"; diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 4246b4c13d..7d05035412 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -55,6 +55,7 @@ else { $voicemail_id = check_str($_POST["voicemail_id"]); $voicemail_password = check_str($_POST["voicemail_password"]); $greeting_id = check_str($_POST["greeting_id"]); + $voicemail_options = $_POST["voicemail_options"]; $voicemail_mail_to = check_str($_POST["voicemail_mail_to"]); $voicemail_attach_file = check_str($_POST["voicemail_attach_file"]); $voicemail_local_after_email = check_str($_POST["voicemail_local_after_email"]); @@ -62,6 +63,8 @@ else { $voicemail_description = check_str($_POST["voicemail_description"]); //remove the space $voicemail_mail_to = str_replace(" ", "", $voicemail_mail_to); + + echo "
"; print_r($voicemail_options); echo "
"; } //unassign the voicemail id copy from the voicemail id @@ -159,51 +162,100 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= ")"; $sql .= "values "; $sql .= "("; - $sql .= "'$domain_uuid', "; + $sql .= "'".$domain_uuid."', "; $sql .= "'".uuid()."', "; - $sql .= "'$voicemail_id', "; - $sql .= "'$voicemail_password', "; + $sql .= "'".$voicemail_id."', "; + $sql .= "'".$voicemail_password."', "; if (strlen($greeting_id) > 0) { - $sql .= "'$greeting_id', "; + $sql .= "'".$greeting_id."', "; } - $sql .= "'$voicemail_mail_to', "; - $sql .= "'$voicemail_attach_file', "; - $sql .= "'$voicemail_local_after_email', "; - $sql .= "'$voicemail_enabled', "; - $sql .= "'$voicemail_description' "; + $sql .= "'".$voicemail_mail_to."', "; + $sql .= "'".$voicemail_attach_file."', "; + $sql .= "'".$voicemail_local_after_email."', "; + $sql .= "'".$voicemail_enabled."', "; + $sql .= "'".$voicemail_description."' "; $sql .= ")"; $db->exec(check_sql($sql)); unset($sql); $_SESSION["message"] = $text['message-add']; - header("Location: voicemails.php"); - return; } //if ($action == "add") if ($action == "update" && permission_exists('voicemail_edit')) { $sql = "update v_voicemails set "; - $sql .= "voicemail_id = '$voicemail_id', "; - $sql .= "voicemail_password = '$voicemail_password', "; + $sql .= "voicemail_id = '".$voicemail_id."', "; + $sql .= "voicemail_password = '".$voicemail_password."', "; if (strlen($greeting_id) > 0) { - $sql .= "greeting_id = '$greeting_id', "; + $sql .= "greeting_id = '".$greeting_id."', "; } else { $sql .= "greeting_id = null, "; } - $sql .= "voicemail_mail_to = '$voicemail_mail_to', "; - $sql .= "voicemail_attach_file = '$voicemail_attach_file', "; - $sql .= "voicemail_local_after_email = '$voicemail_local_after_email', "; - $sql .= "voicemail_enabled = '$voicemail_enabled', "; - $sql .= "voicemail_description = '$voicemail_description' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and voicemail_uuid = '$voicemail_uuid'"; + $sql .= "voicemail_mail_to = '".$voicemail_mail_to."', "; + $sql .= "voicemail_attach_file = '".$voicemail_attach_file."', "; + $sql .= "voicemail_local_after_email = '".$voicemail_local_after_email."', "; + $sql .= "voicemail_enabled = '".$voicemail_enabled."', "; + $sql .= "voicemail_description = '".$voicemail_description."' "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and voicemail_uuid = '".$voicemail_uuid."'"; $db->exec(check_sql($sql)); unset($sql); $_SESSION["message"] = $text['message-update']; - header("Location: voicemail_edit.php?id=".$voicemail_uuid); - return; } //if ($action == "update") + + + // add voicemail options + if (sizeof($voicemail_options) > 0) { + foreach ($voicemail_options as $index => $voicemail_option) { + if ($voicemail_option['voicemail_option_digits'] == '' || $voicemail_option['voicemail_option_param'] == '') { unset($voicemail_options[$index]); } + } + } + if (sizeof($voicemail_options) > 0) { + $sql = "insert into v_voicemail_options "; + $sql .= "( "; + $sql .= "voicemail_option_uuid, "; + $sql .= "voicemail_uuid, "; + $sql .= "domain_uuid, "; + $sql .= "voicemail_option_digits, "; + $sql .= "voicemail_option_action, "; + $sql .= "voicemail_option_param, "; + $sql .= "voicemail_option_order, "; + $sql .= "voicemail_option_description "; + $sql .= ") "; + $sql .= "values "; + foreach ($voicemail_options as $index => $voicemail_option) { + $voicemail_option_uuid = uuid(); + //seperate the action and the param + $option_array = explode(":", $voicemail_option["voicemail_option_param"]); + $voicemail_option['voicemail_option_action'] = array_shift($option_array); + $voicemail_option['voicemail_option_param'] = join(':', $option_array); + //continue building insert query + $sql_record[$index] = "( "; + $sql_record[$index] .= "'".$voicemail_option_uuid."', "; + $sql_record[$index] .= "'".$voicemail_uuid."', "; + $sql_record[$index] .= "'".$domain_uuid."', "; + $sql_record[$index] .= "'".trim($voicemail_option['voicemail_option_digits'])."', "; + $sql_record[$index] .= "'".trim($voicemail_option['voicemail_option_action'])."', "; + $sql_record[$index] .= "'".trim($voicemail_option['voicemail_option_param'])."', "; + $sql_record[$index] .= $voicemail_option['voicemail_option_order'].", "; + $sql_record[$index] .= "'".trim($voicemail_option['voicemail_option_description'])."' "; + $sql_record[$index] .= ") "; + } + $sql .= implode(",", $sql_record); + $db->exec(check_sql($sql)); + unset($sql); + } + + //redirect user + if ($action == 'add') { + header("Location: voicemails.php"); + } + else if ($action == "update") { + header("Location: voicemail_edit.php?id=".$voicemail_uuid); + } + exit; + } //if ($_POST["persistformvar"] != "true") } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) @@ -211,8 +263,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (count($_GET)>0 && $_POST["persistformvar"] != "true") { $voicemail_uuid = check_str($_GET["id"]); $sql = "select * from v_voicemails "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and voicemail_uuid = '$voicemail_uuid' "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and voicemail_uuid = '".$voicemail_uuid."' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -240,20 +292,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //show the header require_once "resources/header.php"; + $document['title'] = $text['title-voicemail']; //show the content - echo "
"; - echo "\n"; - echo "\n"; - echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " "; echo "
\n"; - echo "
"; - echo "
\n"; - echo "
\n"; - echo "\n"; + echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; @@ -261,7 +310,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; + echo " "; + echo " "; + echo " "; + echo " "; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; - echo " "; + echo " "; echo "
".$text['title-voicemail']."\n"; + echo ""; + echo " ".$text['title-voicemail'].""; + echo "

"; + echo "
\n"; echo " \n"; echo " \n"; echo "
\n"; - echo " ".$text['label-voicemail_id'].":\n"; + echo " ".$text['label-voicemail_id']."\n"; echo "\n"; echo " \n"; @@ -272,7 +321,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-voicemail_password'].":\n"; + echo " ".$text['label-voicemail_password']."\n"; echo "\n"; echo " \n"; @@ -283,7 +332,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-greeting_id'].":\n"; + echo " ".$text['label-greeting_id']."\n"; echo "\n"; echo " \n"; @@ -292,9 +341,111 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
".$text['label-options'].""; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (strlen($voicemail_uuid) > 0) { + $sql = "select * from v_voicemail_options "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and voicemail_uuid = '".$voicemail_uuid."' "; + $sql .= "order by voicemail_option_digits, voicemail_option_order asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $result_count = count($result); + foreach($result as $field) { + $voicemail_option_param = $field['voicemail_option_param']; + if (strlen(trim($voicemail_option_param)) == 0) { + $voicemail_option_param = $field['voicemail_option_action']; + } + $voicemail_option_param = str_replace("menu-", "", $voicemail_option_param); + $voicemail_option_param = str_replace("XML", "", $voicemail_option_param); + $voicemail_option_param = str_replace("transfer", "", $voicemail_option_param); + $voicemail_option_param = str_replace("bridge", "", $voicemail_option_param); + $voicemail_option_param = str_replace($_SESSION['domain_name'], "", $voicemail_option_param); + $voicemail_option_param = str_replace("\${domain_name}", "", $voicemail_option_param); + $voicemail_option_param = str_replace("\${domain}", "", $voicemail_option_param); + $voicemail_option_param = ucfirst(trim($voicemail_option_param)); + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + } + unset($sql, $result); + + for ($c = 0; $c < 1; $c++) { + echo " \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + } + echo "
".$text['label-option']."".$text['label-destination']."".$text['label-order']."".$text['label-description']."
\n"; + echo " ".$field['voicemail_option_digits']; + echo " \n"; + echo " ".$voicemail_option_param." \n"; + echo " \n"; + echo " ".$field['voicemail_option_order']." \n"; + echo " \n"; + echo " ".$field['voicemail_option_description']." \n"; + echo " "; + echo "".$v_link_label_edit.""; + echo "".$v_link_label_delete.""; + echo "
\n"; + echo " \n"; + echo "\n"; + $tmp_select_value = ''; + switch_select_destination("ivr", $voicemail_options_label, 'voicemail_options['.$c.'][voicemail_option_param]', $tmp_select_value, "width:175px", $voicemail_option_action); + unset($tmp_select_value); + echo "\n"; + echo " \n"; + echo "\n"; + echo " \n"; + echo "\n"; + echo " \n"; + echo "
\n"; + + echo " ".$text['description-options']."\n"; + echo "
\n"; + echo "
\n"; - echo " ".$text['label-voicemail_mail_to'].":\n"; + echo " ".$text['label-voicemail_mail_to']."\n"; echo "\n"; echo " \n"; @@ -305,7 +456,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-voicemail_attach_file'].":\n"; + echo " ".$text['label-voicemail_attach_file']."\n"; echo "\n"; echo "
\n"; - echo " ".$text['label-voicemail_local_after_email'].":\n"; + echo " ".$text['label-voicemail_local_after_email']."\n"; echo "\n"; echo "
".$text['label-forward_destinations'].":".$text['label-forward_destinations'].""; - echo " \n"; $sql = " select v.voicemail_id, @@ -376,22 +526,26 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); - foreach($result as $field) { - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - $voicemail_uuid_copied[] = $field['voicemail_uuid_copy']; + if ($result_count > 0) { + echo "
".$field['voicemail_id']."\n"; - echo " $v_link_label_delete\n"; - echo "
\n"; + foreach($result as $field) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + $voicemail_uuid_copied[] = $field['voicemail_uuid_copy']; + } + echo "
".$field['voicemail_id']."\n"; + echo " $v_link_label_delete\n"; + echo "
\n"; + echo "
\n"; } - echo "
\n"; if (sizeof($voicemail_uuid_copied) > 0) { // modify sql to remove already copied voicemail uuids from the list $sql_mod = " and v.voicemail_uuid not in ('".implode("','", $voicemail_uuid_copied)."') "; } - echo "
\n"; + $sql = " select v.voicemail_id, @@ -425,7 +579,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " ".$text['label-voicemail_enabled'].":\n"; + echo " ".$text['label-voicemail_enabled']."\n"; echo "\n"; echo "
\n"; - echo " ".$text['label-voicemail_description'].":\n"; + echo " ".$text['label-voicemail_description']."\n"; echo "\n"; echo " \n"; @@ -465,17 +619,13 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $http_referer = parse_url($_SERVER["HTTP_REFERER"]); echo " \n"; echo " \n"; + echo "
"; echo " \n"; echo "
"; echo ""; - echo "
"; - echo "
"; - //include the footer require_once "resources/footer.php"; ?> \ No newline at end of file diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php index a534c5c0fa..a6b06d7447 100644 --- a/app/voicemails/voicemail_messages.php +++ b/app/voicemails/voicemail_messages.php @@ -80,21 +80,15 @@ else { require_once "resources/paging.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 "
".$text['title-voicemail_messages']." 
\n"; - echo " ".$text['description-voicemail_message']."
\n"; - echo "
"; + echo " ".$text['title-voicemail_messages'].""; + echo "

"; + echo " ".$text['description-voicemail_message']; + echo "

"; + echO "
 
\n"; @@ -103,19 +97,16 @@ else { $row_style["1"] = "row_style1"; $row_style["2"] = "row_style2"; - echo "
\n"; echo "\n"; //set the table header $table_header = "\n"; $table_header .= th_order_by('created_epoch', $text['label-created_epoch'], $order_by, $order); - //$table_header .= th_order_by('read_epoch', $text['label-read_epoch'], $order_by, $order); $table_header .= th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order); $table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order); $table_header .= "\n"; $table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'"); $table_header .= "\n"; - //$table_header .= th_order_by('message_priority', $text['label-message_priority'], $order_by, $order); $table_header .= "\n"; @@ -128,7 +119,10 @@ else { if ($previous_voicemail_id != $field['voicemail_id']) { 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-tools']."".$text['label-message_size']."\n"; $table_header .= "  \n"; $table_header .= "
\n"; - echo "



\n"; + echo "
"; + if ($previous_voicemail_id != '') { + echo "


\n"; + } echo " ".$text['label-mailbox'].": ".$field['voicemail_id']."
 \n"; echo "
\n"; @@ -149,7 +143,6 @@ else { echo ""; echo " ".$row['created_date']; echo "".$row['read_epoch']." ".$row['caller_id_name']." ".$row['caller_id_number']." ".$row['message_length_label']." ".$row['message_status']." ".$row['file_size_label']."".$row['message_priority']." \n"; if (permission_exists('voicemail_message_delete')) { echo " $v_link_label_delete\n"; @@ -199,13 +190,6 @@ else { echo "
"; - echo "
"; - echo "

"; - - echo "
"; - echo "
"; echo "

"; //include the footer diff --git a/app/voicemails/voicemail_option_delete.php b/app/voicemails/voicemail_option_delete.php new file mode 100644 index 0000000000..8ca56c9a0f --- /dev/null +++ b/app/voicemails/voicemail_option_delete.php @@ -0,0 +1,60 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + 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('voicemail_delete')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//set the http values as variables + if (count($_GET)>0) { + $voicemail_option_uuid = check_str($_GET["id"]); + $voicemail_uuid = check_str($_GET["voicemail_uuid"]); + } + +//delete the voicemail option + if (strlen($voicemail_option_uuid) > 0) { + $sql = "delete from v_voicemail_options "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and voicemail_option_uuid = '".$voicemail_option_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); + } + +//redirect the user + $_SESSION['message'] = $text['message-delete']; + header('Location: voicemail_edit.php?id='.$voicemail_uuid); + +?> \ No newline at end of file diff --git a/app/voicemails/voicemail_option_edit.php b/app/voicemails/voicemail_option_edit.php new file mode 100644 index 0000000000..66461386a5 --- /dev/null +++ b/app/voicemails/voicemail_option_edit.php @@ -0,0 +1,244 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + 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('voicemail_add') || permission_exists('voicemail_edit')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $voicemail_option_uuid = check_str($_REQUEST["id"]); + } + +//get the menu id + if (strlen($_GET["voicemail_uuid"]) > 0) { + $voicemail_uuid = check_str($_GET["voicemail_uuid"]); + } + +//get the http post variables and set them to php variables + if (count($_POST)>0) { + $voicemail_uuid = check_str($_POST["voicemail_uuid"]); + $voicemail_option_digits = check_str($_POST["voicemail_option_digits"]); + $voicemail_option_action = check_str($_POST["voicemail_option_action"]); + $voicemail_option_param = check_str($_POST["voicemail_option_param"]); + $voicemail_option_order = check_str($_POST["voicemail_option_order"]); + $voicemail_option_description = check_str($_POST["voicemail_option_description"]); + + //set the default voicemail_option_action + if (strlen($voicemail_option_action) == 0) { + $voicemail_option_action = "menu-exec-app"; + } + + //seperate the action and the param + $options_array = explode(":", $voicemail_option_param); + $voicemail_option_action = array_shift($options_array); + $voicemail_option_param = join(':', $options_array); + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + $msg = ''; + $voicemail_option_uuid = check_str($_POST["voicemail_option_uuid"]); + + //check for all required data + if (strlen($voicemail_option_digits) == 0) { $msg .= $text['message-required'].$text['label-option']."
\n"; } + if (strlen($voicemail_option_order) == 0) { $msg .= $text['message-required'].$text['label-order']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //update the database + if ($_POST["persistformvar"] != "true") { + if (permission_exists('voicemail_edit')) { + $sql = "update v_voicemail_options set "; + $sql .= "voicemail_option_digits = '".$voicemail_option_digits."', "; + $sql .= "voicemail_option_action = '".$voicemail_option_action."', "; + $sql .= "voicemail_option_param = '".$voicemail_option_param."', "; + $sql .= "voicemail_option_order = ".$voicemail_option_order.", "; + $sql .= "voicemail_option_description = '".$voicemail_option_description."' "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and voicemail_option_uuid = '".$voicemail_option_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); + + //redirect the user + $_SESSION['message'] = $text['message-update']; + header('Location: voicemail_edit.php?id='.$voicemail_uuid); + return; + } + } //if ($_POST["persistformvar"] != "true") +} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (count($_GET)>0 && $_POST["persistformvar"] != "true") { + $voicemail_option_uuid = $_GET["id"]; + $sql = "select * from v_voicemail_options "; + $sql .= "where voicemail_option_uuid = '".$voicemail_option_uuid."' "; + $sql .= "and domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $domain_uuid = $row["domain_uuid"]; + $voicemail_uuid = $row["voicemail_uuid"]; + $voicemail_option_digits = trim($row["voicemail_option_digits"]); + $voicemail_option_action = $row["voicemail_option_action"]; + $voicemail_option_param = $row["voicemail_option_param"]; + + //if admin show only the param + if (if_group("admin")) { + $voicemail_options_label = $voicemail_option_param; + } + + //if superadmin show both the action and param + if (if_group("superadmin")) { + $voicemail_options_label = $voicemail_option_action.':'.$voicemail_option_param; + } + + $voicemail_option_order = $row["voicemail_option_order"]; + $voicemail_option_description = $row["voicemail_option_description"]; + break; //limit to 1 row + } + unset ($prep_statement); + } + +//send the content to the browser + require_once "resources/header.php"; + $document['title'] = $text['title-voicemail_option']; + + 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 "
"; + echo " ".$text['header-voicemail_option'].""; + echo "

"; + echo "
"; + echo " "; + echo " \n"; + echo "
\n"; + echo " ".$text['label-option']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-option']."\n"; + echo "
\n"; + echo " ".$text['label-destination']."\n"; + echo "\n"; + + $tmp_select_value = ''; + if (strlen($voicemail_option_action.$voicemail_option_param) > 0) { + $tmp_select_value = $voicemail_option_action.':'.$voicemail_option_param; + } + switch_select_destination("ivr", $voicemail_options_label, "voicemail_option_param", $tmp_select_value, "width: 350px;", $voicemail_option_action); + unset($tmp_select_value); + + echo "
\n"; + echo $text['description-destination']."\n"; + echo "
\n"; + echo " ".$text['label-order']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-order']."\n"; + echo "
\n"; + echo " ".$text['label-description']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-description']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
"; + echo " \n"; + echo "
\n"; + echo "
\n"; + +require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index e0a44d1fb7..4cd68af40e 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -57,26 +57,20 @@ else { require_once "resources/paging.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 "
".$text['title-voicemails']."
\n"; - echo " "; - echo " "; - echo "
\n"; - echo " ".$text['description-voicemail']."

\n"; + echo "
"; + echo " ".$text['title-voicemails'].""; + echo "

"; + echo " ".$text['description-voicemail']; + echo "

"; echo "
\n"; + echo "
\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
\n"; @@ -176,16 +170,12 @@ else { $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - echo "
\n"; echo "\n"; echo "\n"; echo th_order_by('voicemail_id', $text['label-voicemail_id'], $order_by, $order); - //echo th_order_by('voicemail_password', $text['label-voicemail_password'], $order_by, $order); - //echo th_order_by('greeting_id', $text['label-greeting_id'], $order_by, $order); echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order); echo th_order_by('voicemail_attach_file', $text['label-voicemail_attach_file'], $order_by, $order); echo th_order_by('voicemail_local_after_email', $text['label-voicemail_local_after_email'], $order_by, $order); - //echo "\n"; echo "\n"; echo th_order_by('voicemail_enabled', $text['label-voicemail_enabled'], $order_by, $order); echo th_order_by('voicemail_description', $text['label-voicemail_description'], $order_by, $order); @@ -208,12 +198,9 @@ else { echo $row['voicemail_id']; } echo " \n"; - //echo " \n"; - //echo " \n"; echo " \n"; echo " \n"; echo " \n"; - //echo " \n"; echo " \n"; echo "
".$text['label-count']."".$text['label-tools']."".$row['voicemail_password']." ".$row['greeting_id']." ".$row['voicemail_mail_to']." ".ucwords($row['voicemail_attach_file'])." ".ucwords($row['voicemail_local_after_email'])."  \n"; echo " ".$text['label-view']."  \n"; echo " ".$text['label-greetings']."\n"; @@ -251,13 +238,6 @@ else { echo "
"; - echo "
"; - echo "

"; - - echo "
"; - echo "
"; echo "

"; //include the footer