Music on Hold: Support multiple global categories. Support for changing moh domain. Support for managing additional stream parameters (shuffle, stereo, interval, chimes, custom moh paths, etc). Enhanced file system housekeeping.
Theme: Enhanced audio playback progress indicator. Added settings to control body icon normal/hover colors. VM Greetings: Updated to support new audio playback indicator (more apps to come shortly). Group Permissions: Prevent enter key submission on search field.
This commit is contained in:
parent
c308e4cc7a
commit
3ae85a7098
|
|
@ -20,28 +20,43 @@
|
|||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = "music_on_hold_default_view";
|
||||
$apps[$x]['permissions'][0]['menu']['uuid'] = "1cd1d6cb-912d-db32-56c3-e0d5699feb9d";
|
||||
$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
||||
|
||||
$apps[$x]['permissions'][1]['name'] = "music_on_hold_default_add";
|
||||
$apps[$x]['permissions'][1]['groups'][] = "superadmin";
|
||||
|
||||
$apps[$x]['permissions'][2]['name'] = "music_on_hold_default_delete";
|
||||
$apps[$x]['permissions'][2]['groups'][] = "superadmin";
|
||||
|
||||
$apps[$x]['permissions'][3]['name'] = "music_on_hold_view";
|
||||
$apps[$x]['permissions'][3]['menu']['uuid'] = "1cd1d6cb-912d-db32-56c3-e0d5699feb9d";
|
||||
$apps[$x]['permissions'][3]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][3]['groups'][] = "admin";
|
||||
|
||||
$apps[$x]['permissions'][4]['name'] = "music_on_hold_add";
|
||||
$apps[$x]['permissions'][4]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][4]['groups'][] = "admin";
|
||||
|
||||
$apps[$x]['permissions'][5]['name'] = "music_on_hold_delete";
|
||||
$apps[$x]['permissions'][5]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][5]['groups'][] = "admin";
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_global_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "1cd1d6cb-912d-db32-56c3-e0d5699feb9d";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_global_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_global_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_global_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "1cd1d6cb-912d-db32-56c3-e0d5699feb9d";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_domain";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "music_on_hold_path";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
|
|
@ -67,19 +82,27 @@
|
|||
$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'] = "music_on_hold_rate";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "8000,16000,32000,48000";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_path";
|
||||
$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'] = "music_on_hold_rate";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "8000,16000,32000,48000";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_shuffle";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "true/false";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_timer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_channels";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "1-mono, 2-stereo";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_interval";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "milliseconds";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_timer_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "soft";
|
||||
$z++;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,21 @@
|
|||
<?php
|
||||
|
||||
$text['title-moh_settings']['en-us'] = "Music on Hold Settings";
|
||||
$text['title-moh_settings']['es-cl'] = "Musica en Espera ajustes";
|
||||
$text['title-moh_settings']['pt-pt'] = "Música em Espera configurações";
|
||||
$text['title-moh_settings']['fr-fr'] = "Musique d'attente paramètres";
|
||||
$text['title-moh_settings']['pt-br'] = "Música de espera configurações";
|
||||
$text['title-moh_settings']['pl'] = "Muzyka na czekanie ustawienia";
|
||||
$text['title-moh_settings']['sv-se'] = "Väntmusik inställningar";
|
||||
$text['title-moh_settings']['uk'] = "Музика на утриманні настройки";
|
||||
$text['title-moh_settings']['de-at'] = "Haltemusik Einstellungen";
|
||||
$text['title-moh_settings']['he'] = "מוסיקה על גדרות מתן";
|
||||
|
||||
$text['title-moh']['en-us'] = "Music on Hold";
|
||||
$text['title-moh']['es-cl'] = "Musica en Espera";
|
||||
$text['title-moh']['pt-pt'] = "Música em Espera";
|
||||
$text['title-moh']['fr-fr'] = "Musique d'attente";
|
||||
$text['title-moh']['pt-br'] = "Música de espera ";
|
||||
$text['title-moh']['pt-br'] = "Música de espera";
|
||||
$text['title-moh']['pl'] = "Muzyka na czekanie";
|
||||
$text['title-moh']['sv-se'] = "Väntmusik";
|
||||
$text['title-moh']['uk'] = "Музика на утриманні";
|
||||
|
|
@ -24,27 +35,38 @@ $text['label-others']['he'] = "אחרים";
|
|||
$text['label-others']['ar-eg'] = "آخرون";
|
||||
$text['label-others']['ru-ru'] = "другие";
|
||||
|
||||
$text['opt-new']['en-us'] = "New...";
|
||||
$text['opt-new']['es-cl'] = "Nuevo...";
|
||||
$text['opt-new']['pt-pt'] = "Novo...";
|
||||
$text['opt-new']['fr-fr'] = "Nouvelle...";
|
||||
$text['opt-new']['pt-br'] = "Novo";
|
||||
$text['opt-new']['pl'] = "Nowa";
|
||||
$text['opt-new']['sv-se'] = "Ny...";
|
||||
$text['opt-new']['uk'] = "Нова...";
|
||||
$text['opt-new']['de-at'] = "Neu...";
|
||||
$text['opt-new']['he'] = "חדש";
|
||||
$text['option-local']['en-us'] = "Local";
|
||||
$text['option-local']['es-cl'] = "Local";
|
||||
$text['option-local']['pt-pt'] = "Local";
|
||||
$text['option-local']['fr-fr'] = "locale";
|
||||
$text['option-local']['pt-br'] = "Local";
|
||||
$text['option-local']['pl'] = "Lokalny";
|
||||
$text['option-local']['uk'] = "місцевий";
|
||||
$text['option-local']['sv-se'] = "Lokal";
|
||||
$text['option-local']['de-at'] = "lokal";
|
||||
$text['option-local']['he'] = "מְקוֹמִי";
|
||||
|
||||
$text['opt-default']['en-us'] = "Default";
|
||||
$text['opt-default']['es-cl'] = "Predeterminado";
|
||||
$text['opt-default']['pt-pt'] = "Predefinido";
|
||||
$text['opt-default']['fr-fr'] = "Par défaut";
|
||||
$text['opt-default']['pt-br'] = "Predefinido";
|
||||
$text['opt-default']['pl'] = "Domyślna";
|
||||
$text['opt-default']['sv-se'] = "Standard";
|
||||
$text['opt-default']['uk'] = "Типово";
|
||||
$text['opt-default']['de-at'] = "Standard";
|
||||
$text['opt-default']['he'] = "ברירת מחדל";
|
||||
$text['option-global']['en-us'] = "Global";
|
||||
$text['option-global']['es-cl'] = "Global";
|
||||
$text['option-global']['pt-pt'] = "Global";
|
||||
$text['option-global']['fr-fr'] = "Mondial";
|
||||
$text['option-global']['pt-br'] = "Global";
|
||||
$text['option-global']['pl'] = "Globalny";
|
||||
$text['option-global']['uk'] = "Глобальний";
|
||||
$text['option-global']['sv-se'] = "Global";
|
||||
$text['option-global']['de-at'] = "Global";
|
||||
$text['option-global']['he'] = "כללי";
|
||||
|
||||
$text['option-default']['en-us'] = "Default";
|
||||
$text['option-default']['es-cl'] = "Predeterminado";
|
||||
$text['option-default']['pt-pt'] = "Predefinido";
|
||||
$text['option-default']['fr-fr'] = "Par défaut";
|
||||
$text['option-default']['pt-br'] = "Predefinido";
|
||||
$text['option-default']['pl'] = "Domyślna";
|
||||
$text['option-default']['sv-se'] = "Standard";
|
||||
$text['option-default']['uk'] = "Типово";
|
||||
$text['option-default']['de-at'] = "Standard";
|
||||
$text['option-default']['he'] = "ברירת מחדל";
|
||||
|
||||
$text['message-upload_completed']['en-us'] = "Upload Completed";
|
||||
$text['message-upload_completed']['es-cl'] = "Cargar Completado";
|
||||
|
|
@ -101,17 +123,6 @@ $text['message-click-select']['uk'] = "Двічі клацніть, щоб ви
|
|||
$text['message-click-select']['de-at'] = "Doppelklicken Sie um eine existierende Kategorie auszuwählen";
|
||||
$text['message-click-select']['he'] = "לחץ פעמיים כדי לבחור קטגוריה קיימת";
|
||||
|
||||
$text['message-available-to-all']['en-us'] = "Available to All Domains";
|
||||
$text['message-available-to-all']['es-cl'] = "Disponible para todos los Dominios";
|
||||
$text['message-available-to-all']['pt-pt'] = "Disponível para todos os domínios";
|
||||
$text['message-available-to-all']['fr-fr'] = "Disponible pour tous les domaines";
|
||||
$text['message-available-to-all']['pt-br'] = "Disponivel para todos os dominios";
|
||||
$text['message-available-to-all']['pl'] = "(dostępne w każdej domenie)";
|
||||
$text['message-available-to-all']['sv-se'] = "Tillgänglig för alla domäner.";
|
||||
$text['message-available-to-all']['uk'] = "Доступно для всіх доменів";
|
||||
$text['message-available-to-all']['de-at'] = "In allen Domains verfügbar";
|
||||
$text['message-available-to-all']['he'] = "";
|
||||
|
||||
$text['label-uploaded']['en-us'] = "Uploaded";
|
||||
$text['label-uploaded']['es-cl'] = "Subir";
|
||||
$text['label-uploaded']['pt-pt'] = "Carregado";
|
||||
|
|
@ -145,14 +156,57 @@ $text['label-tools']['uk'] = "Інструменти";
|
|||
$text['label-tools']['de-at'] = "Funktionen";
|
||||
$text['label-tools']['he'] = "כלים";
|
||||
|
||||
$text['label-stop']['en-us'] = "Stop";
|
||||
$text['label-stop']['es-cl'] = "Detener";
|
||||
$text['label-stop']['pt-pt'] = "Pare";
|
||||
$text['label-stop']['fr-fr'] = "Arrêtez";
|
||||
$text['label-stop']['pt-br'] = "Pare";
|
||||
$text['label-stop']['pl'] = "Zatrzymaj się";
|
||||
$text['label-stop']['sv-se'] = "Sluta";
|
||||
$text['label-stop']['uk'] = "СТОП";
|
||||
$text['label-stop']['de-at'] = "Halt";
|
||||
$text['label-stop']['he'] = "תפסיק";
|
||||
|
||||
$text['label-stereo']['en-us'] = "Stereo";
|
||||
$text['label-stereo']['es-cl'] = "Estéreo";
|
||||
$text['label-stereo']['pt-pt'] = "Estéreo";
|
||||
$text['label-stereo']['fr-fr'] = "Stéréo";
|
||||
$text['label-stereo']['pt-br'] = "Estéreo";
|
||||
$text['label-stereo']['pl'] = "Stereofoniczny";
|
||||
$text['label-stereo']['sv-se'] = "Stereo";
|
||||
$text['label-stereo']['uk'] = "стерео";
|
||||
$text['label-stereo']['de-at'] = "стерео";
|
||||
$text['label-stereo']['he'] = "סטריאו";
|
||||
|
||||
$text['label-shuffle']['en-us'] = "Shuffle";
|
||||
$text['label-shuffle']['es-cl'] = "Barajar";
|
||||
$text['label-shuffle']['pt-pt'] = "battage";
|
||||
$text['label-shuffle']['fr-fr'] = "battage";
|
||||
$text['label-shuffle']['pt-br'] = "embaralhar";
|
||||
$text['label-shuffle']['pl'] = "Człapać";
|
||||
$text['label-shuffle']['sv-se'] = "Blanda";
|
||||
$text['label-shuffle']['uk'] = "тасування";
|
||||
$text['label-shuffle']['de-at'] = "Shuffle";
|
||||
$text['label-shuffle']['he'] = "לְעַרְבֵּב";
|
||||
|
||||
$text['label-select_a_file']['en-us'] = "Select a file...";
|
||||
$text['label-select_a_file']['es-cl'] = "Seleccione un archivo...";
|
||||
$text['label-select_a_file']['pt-pt'] = "Selecione um arquivo ...";
|
||||
$text['label-select_a_file']['fr-fr'] = "Sélectionner un fichier...";
|
||||
$text['label-select_a_file']['pt-br'] = "Selecione um arquivo ...";
|
||||
$text['label-select_a_file']['pl'] = "Wybierz plik ...";
|
||||
$text['label-select_a_file']['sv-se'] = "Välj en fil ...";
|
||||
$text['label-select_a_file']['uk'] = "Виберіть файл ...";
|
||||
$text['label-select_a_file']['de-at'] = "Wählen Sie eine Datei ...";
|
||||
$text['label-select_a_file']['he'] = "בחר קובץ ...";
|
||||
|
||||
$text['label-sampling']['en-us'] = "Sampling";
|
||||
$text['label-sampling']['es-cl'] = "Muestreo";
|
||||
$text['label-sampling']['pt-pt'] = "Amostragem";
|
||||
$text['label-sampling']['fr-ca'] = "échatillage";
|
||||
$text['label-sampling']['fr-fr'] = "Échantillonnage";
|
||||
$text['label-sampling']['pt-br'] = "Amostragem";
|
||||
$text['label-sampling']['pl'] = "Sampling ";
|
||||
$text['label-sampling']['sv-se'] = "'Sampling'";
|
||||
$text['label-sampling']['pl'] = "Sampling";
|
||||
$text['label-sampling']['sv-se'] = "Sampling";
|
||||
$text['label-sampling']['uk'] = "Якість";
|
||||
$text['label-sampling']['de-at'] = "Abtastrate";
|
||||
$text['label-sampling']['he'] = "דגימת קול";
|
||||
|
|
@ -168,6 +222,17 @@ $text['label-play']['uk'] = "Відтворити";
|
|||
$text['label-play']['de-at'] = "Play";
|
||||
$text['label-play']['he'] = "נגן";
|
||||
|
||||
$text['label-path']['en-us'] = "Path";
|
||||
$text['label-path']['es-cl'] = "Camino";
|
||||
$text['label-path']['pt-pt'] = "Caminho";
|
||||
$text['label-path']['fr-fr'] = "Chemin";
|
||||
$text['label-path']['pt-br'] = "Caminho";
|
||||
$text['label-path']['pl'] = "Ścieżka";
|
||||
$text['label-path']['sv-se'] = "Väg";
|
||||
$text['label-path']['uk'] = "Path";
|
||||
$text['label-path']['de-at'] = "Pfad";
|
||||
$text['label-path']['he'] = "Path";
|
||||
|
||||
$text['label-pause']['en-us'] = "Pause";
|
||||
$text['label-pause']['es-cl'] = "Pausa";
|
||||
$text['label-pause']['pt-pt'] = "Pausa";
|
||||
|
|
@ -179,6 +244,17 @@ $text['label-pause']['uk'] = "Призупинити";
|
|||
$text['label-pause']['de-at'] = "Pause";
|
||||
$text['label-pause']['he'] = "השהייה";
|
||||
|
||||
$text['label-mono']['en-us'] = "Mono";
|
||||
$text['label-mono']['es-cl'] = "Cosa";
|
||||
$text['label-mono']['pt-pt'] = "Coisa";
|
||||
$text['label-mono']['fr-fr'] = "Chose";
|
||||
$text['label-mono']['pt-br'] = "Coisa";
|
||||
$text['label-mono']['pl'] = "rzecz";
|
||||
$text['label-mono']['sv-se'] = "sak";
|
||||
$text['label-mono']['uk'] = "річ";
|
||||
$text['label-mono']['de-at'] = "Sache";
|
||||
$text['label-mono']['he'] = "דבר";
|
||||
|
||||
$text['label-moh']['en-us'] = "Music on Hold";
|
||||
$text['label-moh']['es-cl'] = "Musica en Espera";
|
||||
$text['label-moh']['pt-pt'] = "Música em Espera";
|
||||
|
|
@ -201,6 +277,27 @@ $text['label-location']['uk'] = "Розміщення";
|
|||
$text['label-location']['de-at'] = "Standort";
|
||||
$text['label-location']['he'] = "מיקום";
|
||||
|
||||
$text['label-interval']['en-us'] = "Interval";
|
||||
$text['label-interval']['es-cl'] = "Intervalo";
|
||||
$text['label-interval']['pt-pt'] = "Intervalo";
|
||||
$text['label-interval']['fr-fr'] = "Intervalle";
|
||||
$text['label-interval']['pt-br'] = "Intervalo";
|
||||
$text['label-interval']['pl'] = "Interwał";
|
||||
$text['label-interval']['sv-se'] = "Intervall";
|
||||
$text['label-interval']['uk'] = "Інтервал";
|
||||
$text['label-interval']['de-at'] = "Intervall";
|
||||
|
||||
$text['label-global']['en-us'] = "Global";
|
||||
$text['label-global']['es-cl'] = "Global";
|
||||
$text['label-global']['pt-pt'] = "Global";
|
||||
$text['label-global']['fr-fr'] = "Mondial";
|
||||
$text['label-global']['pt-br'] = "Global";
|
||||
$text['label-global']['pl'] = "Globalny";
|
||||
$text['label-global']['uk'] = "Глобальний";
|
||||
$text['label-global']['sv-se'] = "Global";
|
||||
$text['label-global']['de-at'] = "Global";
|
||||
$text['label-global']['he'] = "כללי";
|
||||
|
||||
$text['label-file_name']['en-us'] = "File Name";
|
||||
$text['label-file_name']['es-cl'] = "Nombre del Archivo";
|
||||
$text['label-file_name']['pt-pt'] = "Nome do Arquivo";
|
||||
|
|
@ -245,6 +342,19 @@ $text['label-download']['uk'] = "Скачати";
|
|||
$text['label-download']['de-at'] = "Download";
|
||||
$text['label-download']['he'] = "הורדה";
|
||||
|
||||
$text['label-domain']['en-us'] = "Domain";
|
||||
$text['label-domain']['es-cl'] = "Dominio";
|
||||
$text['label-domain']['pt-pt'] = "Domínio";
|
||||
$text['label-domain']['fr-fr'] = "Domaine";
|
||||
$text['label-domain']['pt-br'] = "Dominio";
|
||||
$text['label-domain']['pl'] = "Domena";
|
||||
$text['label-domain']['uk'] = "Домен";
|
||||
$text['label-domain']['sv-se'] = "Domän";
|
||||
$text['label-domain']['de-at'] = "Domain";
|
||||
$text['label-domain']['ro'] = "Domeniu";
|
||||
$text['label-domain']['ar-eg'] = "النطاق";
|
||||
$text['label-domain']['he'] = "דומיין";
|
||||
|
||||
$text['label-delete-category']['en-us'] = "Delete Category";
|
||||
$text['label-delete-category']['es-cl'] = "Eliminar categoría";
|
||||
$text['label-delete-category']['pt-pt'] = "Remover Categoria";
|
||||
|
|
@ -267,6 +377,69 @@ $text['label-default']['uk'] = "Типово";
|
|||
$text['label-default']['de-at'] = "Standard";
|
||||
$text['label-default']['he'] = "ברירת מחדל";
|
||||
|
||||
$text['label-chime_maximum']['en-us'] = "Chime Maximum";
|
||||
$text['label-chime_maximum']['es-cl'] = "máximos Chimes";
|
||||
$text['label-chime_maximum']['pt-pt'] = "Chimes máximos";
|
||||
$text['label-chime_maximum']['fr-fr'] = "Chimes maximum";
|
||||
$text['label-chime_maximum']['pt-br'] = "Chimes máximos";
|
||||
$text['label-chime_maximum']['pl'] = "Maksymalnie kuranty";
|
||||
$text['label-chime_maximum']['uk'] = "максимум куранти";
|
||||
$text['label-chime_maximum']['sv-se'] = "maximala Chimes";
|
||||
$text['label-chime_maximum']['ro'] = "maxime Chimes";
|
||||
$text['label-chime_maximum']['de-at'] = "Maximale Chimes";
|
||||
$text['label-chime_maximum']['ar-eg'] = "الحد الأقصى الدقات";
|
||||
$text['label-chime_maximum']['he'] = "פעמונים מקסימאליים";
|
||||
|
||||
$text['label-chime_list']['en-us'] = "Chime File";
|
||||
$text['label-chime_list']['es-cl'] = "archivo carillón";
|
||||
$text['label-chime_list']['pt-pt'] = "Arquivo Chime";
|
||||
$text['label-chime_list']['fr-fr'] = "fichier Chime";
|
||||
$text['label-chime_list']['pt-br'] = "Arquivo Chime";
|
||||
$text['label-chime_list']['pl'] = "Chime pliku";
|
||||
$text['label-chime_list']['uk'] = "передзвін файлу";
|
||||
$text['label-chime_list']['sv-se'] = "chime File";
|
||||
$text['label-chime_list']['ro'] = "Fișier chime";
|
||||
$text['label-chime_list']['de-at'] = "Chime Datei";
|
||||
$text['label-chime_list']['ar-eg'] = "الملف تتناغم";
|
||||
$text['label-chime_list']['he'] = "קובץ Chime";
|
||||
|
||||
$text['label-chime_frequency']['en-us'] = "Chime Frequency";
|
||||
$text['label-chime_frequency']['es-cl'] = "Frecuencia carillón";
|
||||
$text['label-chime_frequency']['pt-pt'] = "Frequência Chime";
|
||||
$text['label-chime_frequency']['fr-fr'] = "Fréquence Chime";
|
||||
$text['label-chime_frequency']['pt-br'] = "Frequência Chime";
|
||||
$text['label-chime_frequency']['pl'] = "Częstotliwość Chime";
|
||||
$text['label-chime_frequency']['uk'] = "передзвін Частота";
|
||||
$text['label-chime_frequency']['sv-se'] = "chime Frekvens";
|
||||
$text['label-chime_frequency']['ro'] = "Frecventa chime";
|
||||
$text['label-chime_frequency']['de-at'] = "Chime Frequency";
|
||||
$text['label-chime_frequency']['ar-eg'] = "تردد الرنين";
|
||||
$text['label-chime_frequency']['he'] = "תדירות Chime";
|
||||
|
||||
$text['label-channels']['en-us'] = "Channels";
|
||||
$text['label-channels']['es-cl'] = "Canales";
|
||||
$text['label-channels']['pt-pt'] = "Canais";
|
||||
$text['label-channels']['fr-fr'] = "Canaux";
|
||||
$text['label-channels']['pt-br'] = "Canais";
|
||||
$text['label-channels']['pl'] = "Kanały";
|
||||
$text['label-channels']['uk'] = "Канали";
|
||||
$text['label-channels']['sv-se'] = "Kanaler";
|
||||
$text['label-channels']['ro'] = "Canale";
|
||||
$text['label-channels']['de-at'] = "Kanäle";
|
||||
$text['label-channels']['ar-eg'] = "قنوات";
|
||||
$text['label-channels']['he'] = "ערוצים";
|
||||
|
||||
$text['header-moh_settings']['en-us'] = "Music on Hold Settings";
|
||||
$text['header-moh_settings']['es-cl'] = "Musica en Espera ajustes";
|
||||
$text['header-moh_settings']['pt-pt'] = "Música em Espera configurações";
|
||||
$text['header-moh_settings']['fr-fr'] = "Musique d'attente paramètres";
|
||||
$text['header-moh_settings']['pt-br'] = "Música de espera configurações";
|
||||
$text['header-moh_settings']['pl'] = "Muzyka na czekanie ustawienia";
|
||||
$text['header-moh_settings']['sv-se'] = "Väntmusik inställningar";
|
||||
$text['header-moh_settings']['uk'] = "Музика на утриманні настройки";
|
||||
$text['header-moh_settings']['de-at'] = "Haltemusik Einstellungen";
|
||||
$text['header-moh_settings']['he'] = "מוסיקה על גדרות מתן";
|
||||
|
||||
$text['desc-moh']['en-us'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['desc-moh']['es-cl'] = "La música en espera puede estar en formato WAV o MP3. Para reproducir un archivo en frmato MP3 debe tener activado el módulo mod_shout. Puede ajustar el volumen del MP3 desde la pestaña 'Configuraciones'. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['desc-moh']['pt-pt'] = "Música em espera pode ser com base em ficheiros com o formato WAV ou MP3. Para ouvir um ficheiro MP3 deverá ter o mod_shout activado na tab 'Módulos'. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
|
|
|
|||
|
|
@ -24,11 +24,12 @@
|
|||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
James Rose <james.o.rose@gmail.com>
|
||||
*/
|
||||
ini_set('max_execution_time', 7200);
|
||||
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('music_on_hold_view') || permission_exists('music_on_hold_default_view')) {
|
||||
if (permission_exists('music_on_hold_view') || permission_exists('music_on_hold_global_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
|
|
@ -43,253 +44,300 @@ else {
|
|||
//include paging
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//set the music on hold directory
|
||||
if (file_exists('/var/lib/fusionpbx/sounds/music')) {
|
||||
$music_on_hold_dir = $_SESSION['switch']['sounds']['dir'].'/music/fusionpbx';
|
||||
//get moh records, build array
|
||||
$sql = "select * from v_music_on_hold ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
if (permission_exists('music_on_hold_global_view')) {
|
||||
$sql .= "or domain_uuid is null ";
|
||||
}
|
||||
else {
|
||||
$music_on_hold_dir = $_SESSION['switch']['sounds']['dir'].'/music';
|
||||
}
|
||||
ini_set(max_execution_time,7200);
|
||||
$sql .= "order by domain_uuid desc, music_on_hold_rate asc, music_on_hold_name asc";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) {
|
||||
foreach($result as $row) {
|
||||
$moh_name_only = (substr_count($row['music_on_hold_name'], '/') > 0) ? substr($row['music_on_hold_name'], 0, strpos($row['music_on_hold_name'], '/')) : $row['music_on_hold_name'];
|
||||
$moh_domain_uuid = ($row['domain_uuid'] != '') ? $row['domain_uuid'] : '_global_';
|
||||
$moh_rate = $row['music_on_hold_rate'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['uuid'] = $row['music_on_hold_uuid'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['name'] = $row['music_on_hold_name']; //value may include '/[rate]'
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['path'] = '/'.trim(str_replace('$${sounds_dir}', $_SESSION['switch']['sounds']['dir'], $row['music_on_hold_path']),'/');
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['shuffle'] = $row['music_on_hold_shuffle'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['channels'] = $row['music_on_hold_channels'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['interval'] = $row['music_on_hold_interval'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['chime_list'] = $row['music_on_hold_chime_list'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['chime_freq'] = $row['music_on_hold_chime_freq'];
|
||||
$mohs[$moh_domain_uuid][$moh_name_only][$moh_rate]['chime_max'] = $row['music_on_hold_chime_max'];
|
||||
|
||||
//set the order by
|
||||
$order_by = check_str($_GET["order_by"]);
|
||||
$order = check_str($_GET["order"]);
|
||||
$moh_names[(($moh_domain_uuid == '_global_') ? 'global' : 'local')][] = $moh_name_only;
|
||||
$moh_paths[$row['music_on_hold_uuid']] = '/'.trim(str_replace('$${sounds_dir}', $_SESSION['switch']['sounds']['dir'], $row['music_on_hold_path']),'/');
|
||||
$moh_domains[$row['music_on_hold_uuid']][] = $row['domain_uuid'];
|
||||
}
|
||||
}
|
||||
unset($sql, $prep_statement, $result);
|
||||
foreach ($mohs as $domain_uuid => &$moh) { ksort($moh); }
|
||||
$moh_names['global'] = array_unique($moh_names['global']);
|
||||
$moh_names['local'] = array_unique($moh_names['local']);
|
||||
sort($moh_names['global'], SORT_NATURAL);
|
||||
sort($moh_names['local'], SORT_NATURAL);
|
||||
//echo "<pre>".print_r($mohs, true)."</pre>\n\n\n\n\n"; exit;
|
||||
|
||||
//download moh file
|
||||
if ($_GET['a'] == "download") {
|
||||
$slashes = array("/", "\\");
|
||||
$_GET['category'] = str_replace($slashes, "", $_GET['category']);
|
||||
$_GET['file_name'] = str_replace($slashes, "", $_GET['file_name']);
|
||||
|
||||
$category_dir = $_GET['category'];
|
||||
$sampling_rate_dir = $_GET['sampling_rate'];
|
||||
|
||||
if ($category_dir != '') {
|
||||
$path_mod = $category_dir."/";
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$path_mod = $_SESSION["domain_name"]."/".$path_mod;
|
||||
}
|
||||
}
|
||||
if ($_GET['action'] == "download") {
|
||||
$moh_uuid = $_GET['id'];
|
||||
$moh_file = base64_decode($_GET['file']);
|
||||
|
||||
session_cache_limiter('public');
|
||||
if ($_GET['type'] = "moh") {
|
||||
if (file_exists($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name']))) {
|
||||
$fd = fopen($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name']), "rb");
|
||||
if ($_GET['t'] == "bin") {
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
}
|
||||
else {
|
||||
$file_ext = substr(base64_decode($_GET['file_name']), -3);
|
||||
if ($file_ext == "wav") {
|
||||
header("Content-Type: audio/x-wav");
|
||||
}
|
||||
if ($file_ext == "mp3") {
|
||||
header("Content-Type: audio/mpeg");
|
||||
}
|
||||
}
|
||||
header('Content-Disposition: attachment; filename="'.base64_decode($_GET['file_name']).'"');
|
||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
header("Content-Length: " . filesize($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name'])));
|
||||
fpassthru($fd);
|
||||
if (file_exists($moh_paths[$moh_uuid].'/'.$moh_file)) {
|
||||
$fd = fopen($moh_paths[$moh_uuid].'/'.$moh_file, "rb");
|
||||
if ($_GET['t'] == "bin") {
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
}
|
||||
else {
|
||||
$moh_file_ext = pathinfo($moh_file, PATHINFO_EXTENSION);
|
||||
switch ($moh_file_ext) {
|
||||
case "wav" : header("Content-Type: audio/x-wav"); break;
|
||||
case "mp3" : header("Content-Type: audio/mpeg"); break;
|
||||
case "ogg" : header("Content-Type: audio/ogg"); break;
|
||||
}
|
||||
}
|
||||
header('Content-Disposition: attachment; filename="'.$moh_file.'"');
|
||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
header("Content-Length: ".filesize($moh_paths[$moh_uuid].'/'.$moh_file));
|
||||
fpassthru($fd);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
//upload moh file
|
||||
if (is_uploaded_file($_FILES['upload_file']['tmp_name'])) {
|
||||
$file_ext = strtolower(pathinfo($_FILES['upload_file']['name'], PATHINFO_EXTENSION));
|
||||
if ($file_ext == 'wav' || $file_ext == 'mp3') {
|
||||
if ($_POST['type'] == 'moh' && permission_exists('music_on_hold_add')) {
|
||||
|
||||
//remove the slashes
|
||||
if ($_POST['action'] == 'upload' && is_array($_FILES) && is_uploaded_file($_FILES['file']['tmp_name'])) {
|
||||
//determine name & scope
|
||||
if ($_POST['name_new'] != '') {
|
||||
$moh_scope = (permission_exists('music_on_hold_global_add')) ? $_POST['scope'] : 'local';
|
||||
$moh_name_only = strtolower($_POST['name_new']);
|
||||
$moh_new_name = true;
|
||||
}
|
||||
else {
|
||||
$tmp = explode('|', $_POST['name']);
|
||||
$moh_scope = $tmp[0];
|
||||
$moh_name_only = $tmp[1];
|
||||
$moh_new_name = false;
|
||||
}
|
||||
//get remaining values
|
||||
$moh_rate = $_POST['rate'];
|
||||
$moh_file_name_temp = $_FILES['file']['tmp_name'];
|
||||
$moh_file_name = $_FILES['file']['name'];
|
||||
$moh_file_ext = strtolower(pathinfo($moh_file_name, PATHINFO_EXTENSION));
|
||||
//check file type
|
||||
$valid_file_type = ($moh_file_ext == 'wav' || $moh_file_ext == 'mp3' || $moh_file_ext == 'ogg') ? true : false;
|
||||
//check permissions
|
||||
$has_permission = ( ($moh_scope == 'global' && permission_exists('music_on_hold_global_add')) || ($moh_scope == 'local' && permission_exists('music_on_hold_add')) ) ? true : false;
|
||||
//process, if possible
|
||||
if (!$valid_file_type) {
|
||||
$_SESSION['message'] = $text['message-unsupported_file_type'];
|
||||
}
|
||||
else if ($has_permission) {
|
||||
//strip slashes, replace spaces
|
||||
$slashes = array("/", "\\");
|
||||
$_POST['upload_category_new'] = str_replace($slashes, "", $_POST['upload_category_new']);
|
||||
$_FILES['upload_file']['name'] = str_replace($slashes, "", $_FILES['upload_file']['name']);
|
||||
|
||||
//replace any spaces in the file_name with dashes
|
||||
$new_file_name = str_replace(' ', '-', $_FILES['upload_file']['name']);
|
||||
|
||||
//convert sampling rate from value passed by form
|
||||
if ($file_ext == 'mp3') {
|
||||
$sampling_rate_dirs = Array(8000, 16000, 32000, 48000);
|
||||
$moh_name_only = str_replace($slashes, '', $moh_name_only);
|
||||
$moh_name_only = str_replace(' ', '_', $moh_name_only);
|
||||
$moh_file_name = str_replace($slashes, '', $moh_file_name);
|
||||
$moh_file_name = str_replace(' ', '-', $moh_file_name);
|
||||
//detect auto rate
|
||||
if ($moh_rate == 'auto') {
|
||||
$moh_rate = '48000';
|
||||
$moh_rate_auto = true;
|
||||
}
|
||||
else {
|
||||
$sampling_rate_dirs[] = $_POST['upload_sampling_rate'] * 1000;
|
||||
$moh_rate_auto = false;
|
||||
}
|
||||
|
||||
//if multi-tenant, modify directory paths
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$path_mod = $_SESSION["domain_name"]."/";
|
||||
//define default path
|
||||
$moh_path = $_SESSION['switch']['sounds']['dir'].'/music/'.(($moh_scope == 'global') ? 'global' : $_SESSION['domain_name']).'/'.$moh_name_only.'/'.$moh_rate;
|
||||
$moh_path_found = false;
|
||||
//begin query
|
||||
$music_on_hold_uuid = uuid();
|
||||
$sql = "insert into v_music_on_hold ";
|
||||
$sql .= "( ";
|
||||
$sql .= "music_on_hold_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "music_on_hold_name, ";
|
||||
$sql .= "music_on_hold_path, ";
|
||||
$sql .= "music_on_hold_rate, ";
|
||||
$sql .= "music_on_hold_shuffle, ";
|
||||
$sql .= "music_on_hold_channels, ";
|
||||
$sql .= "music_on_hold_interval, ";
|
||||
$sql .= "music_on_hold_timer_name, ";
|
||||
$sql .= "music_on_hold_chime_list, ";
|
||||
$sql .= "music_on_hold_chime_freq, ";
|
||||
$sql .= "music_on_hold_chime_max ";
|
||||
$sql .= ") values ";
|
||||
//new name
|
||||
if ($moh_new_name) {
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$music_on_hold_uuid."',";
|
||||
$sql .= (($moh_scope == 'global') ? 'null' : "'".$domain_uuid."'").", ";
|
||||
$sql .= "'".check_str($moh_name_only.((!$moh_rate_auto) ? '/'.$moh_rate : null))."', ";
|
||||
$sql .= "'".check_str(str_replace($_SESSION['switch']['sounds']['dir'], '$${sounds_dir}', $moh_path))."', ";
|
||||
$sql .= "'".check_str($moh_rate)."', ";
|
||||
$sql .= "'false', ";
|
||||
$sql .= "1, ";
|
||||
$sql .= "20, ";
|
||||
$sql .= "'soft', ";
|
||||
$sql .= "null, ";
|
||||
$sql .= "null, ";
|
||||
$sql .= "null ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
|
||||
//create new category, if necessary
|
||||
if ($_POST['upload_category'] == '_NEW_CAT_' && $_POST['upload_category_new'] != '') {
|
||||
$new_category_name = str_replace(' ', '_', $_POST['upload_category_new']);
|
||||
//process sampling rate(s)
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
if (!is_dir($music_on_hold_dir."/".$path_mod.$new_category_name."/".$sampling_rate_dir)) {
|
||||
mkdir($music_on_hold_dir."/".$path_mod.$new_category_name."/".$sampling_rate_dir, 02770, true);
|
||||
}
|
||||
if (is_dir($music_on_hold_dir."/".$path_mod.$new_category_name."/".$sampling_rate_dir)) {
|
||||
copy($_FILES['upload_file']['tmp_name'], $music_on_hold_dir."/".$path_mod.$new_category_name."/".$sampling_rate_dir."/".$new_file_name);
|
||||
$target_dir = $music_on_hold_dir."/".$path_mod.$new_category_name."/".$sampling_rate_dir;
|
||||
}
|
||||
//existing name
|
||||
else {
|
||||
//get existing path
|
||||
$moh_settings = $mohs[(($moh_scope == 'global') ? '_global_' : $domain_uuid)][$moh_name_only][$moh_rate];
|
||||
if (
|
||||
($moh_rate_auto && $moh_name_only == $moh_settings['name']) ||
|
||||
(!$moh_rate_auto && $moh_name_only.'/'.$moh_rate == $moh_settings['name'])
|
||||
) {
|
||||
$moh_path = $moh_settings['path'];
|
||||
$moh_path_found = true;
|
||||
}
|
||||
//delete temp file
|
||||
@unlink($_FILES['upload_file']['tmp_name']);
|
||||
}
|
||||
//use existing category directory
|
||||
else if ($_POST['upload_category'] != '' && $_POST['upload_category'] != '_NEW_CAT_') {
|
||||
//process sampling rate(s)
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
if (!is_dir($music_on_hold_dir."/".$path_mod.$_POST['upload_category']."/".$sampling_rate_dir)) {
|
||||
mkdir($music_on_hold_dir."/".$path_mod.$_POST['upload_category']."/".$sampling_rate_dir, 02770, true);
|
||||
}
|
||||
if (is_dir($music_on_hold_dir."/".$path_mod.$_POST['upload_category']."/".$sampling_rate_dir)) {
|
||||
copy($_FILES['upload_file']['tmp_name'], $music_on_hold_dir."/".$path_mod.$_POST['upload_category']."/".$sampling_rate_dir."/".$new_file_name);
|
||||
$target_dir = $music_on_hold_dir."/".$path_mod.$_POST['upload_category']."/".$sampling_rate_dir;
|
||||
}
|
||||
//not found, finish query
|
||||
else {
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$music_on_hold_uuid."',";
|
||||
$sql .= (($moh_scope == 'global') ? 'null' : "'".$domain_uuid."'").", ";
|
||||
$sql .= "'".check_str($moh_name_only.((!$moh_rate_auto) ? '/'.$moh_rate : null))."', ";
|
||||
$sql .= "'".check_str(str_replace($_SESSION['switch']['sounds']['dir'], '$${sounds_dir}', $moh_path))."', ";
|
||||
$sql .= "'".check_str($moh_rate)."', ";
|
||||
$sql .= "'false', ";
|
||||
$sql .= "1, ";
|
||||
$sql .= "20, ";
|
||||
$sql .= "'soft', ";
|
||||
$sql .= "null, ";
|
||||
$sql .= "null, ";
|
||||
$sql .= "null ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
//delete temp file
|
||||
@unlink($_FILES['upload_file']['tmp_name']);
|
||||
}
|
||||
//use default directory
|
||||
else if ($_POST['upload_category'] == '') {
|
||||
if (permission_exists('music_on_hold_default_add')) {
|
||||
//process sampling rate(s)
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
if (!is_dir($music_on_hold_dir."/".$sampling_rate_dir)) {
|
||||
mkdir($music_on_hold_dir."/".$sampling_rate_dir, 02770, true);
|
||||
}
|
||||
if (is_dir($music_on_hold_dir."/".$sampling_rate_dir)) {
|
||||
copy($_FILES['upload_file']['tmp_name'], $music_on_hold_dir."/".$sampling_rate_dir."/".$new_file_name);
|
||||
$target_dir = $music_on_hold_dir."/".$sampling_rate_dir;
|
||||
}
|
||||
}
|
||||
//delete temp file
|
||||
@unlink($_FILES['upload_file']['tmp_name']);
|
||||
//execute query
|
||||
if (!$moh_path_found) {
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//check target folder, move uploaded file
|
||||
if (!is_dir($moh_path)) {
|
||||
mkdir($moh_path, 02770, true);
|
||||
}
|
||||
if (is_dir($moh_path)) {
|
||||
if (copy($moh_file_name_temp, $moh_path.'/'.$moh_file_name)) {
|
||||
@unlink($moh_file_name_temp);
|
||||
}
|
||||
}
|
||||
//set message
|
||||
$_SESSION['message'] = $text['message-upload_completed'];
|
||||
}
|
||||
|
||||
//redirect
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
//delete moh/file
|
||||
if ($_GET['action'] == "delete") {
|
||||
//get submitted values
|
||||
$moh_uuid = check_str($_GET['id']);
|
||||
$moh_file = check_str(base64_decode($_GET['file']));
|
||||
//check permissions
|
||||
if (
|
||||
($moh_domains[$moh_uuid] == '' && permission_exists('music_on_hold_global_delete')) ||
|
||||
($moh_domains[$moh_uuid] != '' && permission_exists('music_on_hold_delete'))
|
||||
) {
|
||||
//remove specified file
|
||||
if ($moh_file != '') {
|
||||
@unlink($moh_paths[$moh_uuid].'/'.$moh_file);
|
||||
}
|
||||
//remove all audio files
|
||||
else {
|
||||
//delete temp file and exit
|
||||
@unlink($_FILES['upload_file']['tmp_name']);
|
||||
exit();
|
||||
array_map('unlink', glob($moh_paths[$moh_uuid].'/*.wav'));
|
||||
array_map('unlink', glob($moh_paths[$moh_uuid].'/*.mp3'));
|
||||
array_map('unlink', glob($moh_paths[$moh_uuid].'/*.ogg'));
|
||||
}
|
||||
|
||||
//build and save the XML
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$moh = new switch_music_on_hold;
|
||||
$moh->xml();
|
||||
$moh->save();
|
||||
|
||||
//set an upload message
|
||||
$save_msg = "Uploaded file to ".$target_dir."/".htmlentities($_FILES['upload_file']['name']);
|
||||
//remove record and folder(s), if empty
|
||||
$file_count = 0;
|
||||
$file_count += ($files = glob($moh_paths[$moh_uuid].'/*.wav')) ? count($files) : 0;
|
||||
$file_count += ($files = glob($moh_paths[$moh_uuid].'/*.mp3')) ? count($files) : 0;
|
||||
$file_count += ($files = glob($moh_paths[$moh_uuid].'/*.ogg')) ? count($files) : 0;
|
||||
if ($file_count == 0) {
|
||||
//remove rate folder
|
||||
rmdir($moh_paths[$moh_uuid]);
|
||||
//remove record
|
||||
$sql = "delete from v_music_on_hold ";
|
||||
$sql .= "where music_on_hold_uuid = '".$moh_uuid."' ";
|
||||
if (!permission_exists('music_on_hold_global_delete')) {
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
}
|
||||
//echo $sql; exit;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql);
|
||||
//remove parent folder, if empty
|
||||
$parent_path = dirname($moh_paths[$moh_uuid]);
|
||||
$parent_path_files = glob($parent_path.'/*');
|
||||
if (sizeof($parent_files) === 0) { rmdir($parent_path); }
|
||||
}
|
||||
//set message
|
||||
$_SESSION['message'] = $text['message-delete'];
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['message'] = $text['message-upload_completed'];
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
//redirect
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
//define valid sampling rates
|
||||
$sampling_rate_dirs = Array(8000, 16000, 32000, 48000);
|
||||
|
||||
//delete moh file
|
||||
if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) {
|
||||
if ($_GET['type'] == 'moh') {
|
||||
//remove the slashes
|
||||
$slashes = array("/", "\\");
|
||||
$_GET['category'] = str_replace($slashes, "", $_GET['category']);
|
||||
$_GET['file_name'] = str_replace($slashes, "", $_GET['file_name']);
|
||||
//set the variables
|
||||
$sampling_rate_dir = $_GET['sampling_rate'];
|
||||
$category_dir = $_GET['category'];
|
||||
//default category
|
||||
if ($category_dir == "") {
|
||||
if (!permission_exists('music_on_hold_default_delete')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
//other categories
|
||||
if ($category_dir != "") {
|
||||
$path_mod = $category_dir."/";
|
||||
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$path_mod = $_SESSION["domain_name"]."/".$path_mod;
|
||||
}
|
||||
}
|
||||
//remove the directory
|
||||
unlink($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name']));
|
||||
|
||||
//build and save the XML
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$moh = new switch_music_on_hold;
|
||||
$moh->xml();
|
||||
$moh->save();
|
||||
|
||||
//redirect the browser
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_GET['type'] == 'cat') {
|
||||
$category_dir = $_GET['category'];
|
||||
if (strlen($category_dir) > 0) {
|
||||
// adjus the path for multiple domains
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$path_mod = $_SESSION["domain_name"]."/";
|
||||
}
|
||||
|
||||
// remove sampling rate directory (if any)
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
rmdir($music_on_hold_dir."/".$path_mod.(base64_decode($category_dir))."/".$sampling_rate_dir);
|
||||
}
|
||||
|
||||
// remove category directory
|
||||
if (rmdir($music_on_hold_dir."/".$path_mod.(base64_decode($category_dir)))) {
|
||||
sleep(5); // allow time for the OS to catch up (at least Windows, anyway)
|
||||
}
|
||||
}
|
||||
|
||||
//build and save the XML
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$moh = new switch_music_on_hold;
|
||||
$moh->xml();
|
||||
$moh->save();
|
||||
|
||||
//redirect the browser
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//include the header
|
||||
require_once "resources/header.php";
|
||||
$document['title'] = $text['title-moh'];
|
||||
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
|
||||
echo " function check_filetype(file_input) {\n";
|
||||
echo " file_ext = file_input.value.substr((~-file_input.value.lastIndexOf('.') >>> 0) + 2);\n";
|
||||
echo " if (file_ext != 'mp3' && file_ext != 'wav' && file_ext != '') {\n";
|
||||
echo " if (file_ext != 'mp3' && file_ext != 'wav' && file_ext != 'ogg' && file_ext != '') {\n";
|
||||
echo " display_message(\"".$text['message-unsupported_file_type']."\", 'negative', '2750');\n";
|
||||
echo " }\n";
|
||||
echo " else {\n";
|
||||
echo " if (file_ext == 'mp3') {\n";
|
||||
echo " document.getElementById('sampling_rate').style.display='none';\n";
|
||||
echo " }\n";
|
||||
echo " else {\n";
|
||||
echo " document.getElementById('sampling_rate').style.display='';\n";
|
||||
echo " }\n";
|
||||
echo " var selected_file_path = file_input.value;\n";
|
||||
echo " selected_file_path = selected_file_path.replace(\"C:\\\\fakepath\\\\\",'');\n";
|
||||
echo " document.getElementById('file_label').innerHTML = selected_file_path;\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function name_mode(mode) {\n";
|
||||
echo " if (mode == 'new') {\n";
|
||||
echo " document.getElementById('name_select').style.display='none';\n";
|
||||
echo " document.getElementById('btn_new').style.display='none';\n";
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " document.getElementById('scope').selectedIndex = 0;\n";
|
||||
echo " document.getElementById('scope').style.display='';\n";
|
||||
}
|
||||
echo " document.getElementById('name_new').style.display='';\n";
|
||||
echo " document.getElementById('btn_select').style.display='';\n";
|
||||
echo " document.getElementById('name_new').focus();\n";
|
||||
echo " }\n";
|
||||
echo " else if (mode == 'select') {\n";
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " document.getElementById('scope').style.display='none';\n";
|
||||
echo " document.getElementById('scope').selectedIndex = 0;\n";
|
||||
}
|
||||
echo " document.getElementById('name_new').style.display='none';\n";
|
||||
echo " document.getElementById('name_new').value = '';\n";
|
||||
echo " document.getElementById('btn_select').style.display='none';\n";
|
||||
echo " document.getElementById('name_select').selectedIndex = 0;\n";
|
||||
echo " document.getElementById('name_select').style.display='';\n";
|
||||
echo " document.getElementById('btn_new').style.display='';\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
|
||||
echo "</script>\n";
|
||||
echo "<script language='JavaScript' type='text/javascript' src='".PROJECT_PATH."/resources/javascript/reset_file_input.js'></script>\n";
|
||||
|
||||
|
|
@ -306,70 +354,104 @@ else {
|
|||
echo "<br>\n";
|
||||
|
||||
//show the upload form
|
||||
if (permission_exists('music_on_hold_add')) {
|
||||
if (permission_exists('music_on_hold_add') || permission_exists('music_on_hold_global_add')) {
|
||||
echo "<b>".$text['label-upload-moh']."</b>\n";
|
||||
echo "<br><br>\n";
|
||||
echo "<form action='' method='POST' enctype='multipart/form-data' name='frmUpload' id='frmUpload' onSubmit=''>\n";
|
||||
echo "<input name='type' type='hidden' value='moh'>\n";
|
||||
echo "<table cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td style='padding-right: 15px; white-space: nowrap'>\n";
|
||||
echo " ".$text['label-file-path'];
|
||||
echo " <input name='upload_file' id='upload_file' type='file' class='formfld fileinput' style='width: 300px; margin-right: 3px;' onchange=\"check_filetype(this);\">";
|
||||
echo "<input type='button' class='btn' value='".$text['button-clear']."' onclick=\"reset_file_input('upload_file'); document.getElementById('sampling_rate').style.display='inline';\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td id='sampling_rate' style='padding-right: 15px;' nowrap>";
|
||||
echo " ".$text['label-sampling'];
|
||||
echo " <select id='upload_sampling_rate' name='upload_sampling_rate' class='formfld' style='width: auto;'>\n";
|
||||
echo " <option value='8'>8 kHz</option>\n";
|
||||
echo " <option value='16'>16 kHz</option>\n";
|
||||
echo " <option value='32'>32 kHz</option>\n";
|
||||
echo " <option value='48'>48 kHz</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td nowrap>".$text['label-category']."";
|
||||
echo " <select id='upload_category' name='upload_category' class='formfld' style='width: auto;' onchange=\"if (this.options[this.selectedIndex].value == '_NEW_CAT_') { this.style.display='none'; document.getElementById('upload_category_new').style.display=''; document.getElementById('upload_category_return').style.display=''; document.getElementById('upload_category_new').focus(); }\">\n";
|
||||
if (permission_exists('music_on_hold_default_add')) {
|
||||
echo " <option value='' style='font-style: italic;'>".$text['opt-default']."</option>\n";
|
||||
}
|
||||
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$music_on_hold_category_parent_dir = $music_on_hold_dir."/".$_SESSION['domain_name'];
|
||||
}
|
||||
else {
|
||||
$music_on_hold_category_parent_dir = $music_on_hold_dir;
|
||||
}
|
||||
echo "<form name='frm' id='frm' method='post' enctype='multipart/form-data'>\n";
|
||||
echo "<input name='action' type='hidden' value='upload'>\n";
|
||||
|
||||
if ($handle = opendir($music_on_hold_category_parent_dir)) {
|
||||
while (false !== ($directory = readdir($handle))) {
|
||||
if (
|
||||
$directory != "." &&
|
||||
$directory != ".." &&
|
||||
$directory != "8000" &&
|
||||
$directory != "16000" &&
|
||||
$directory != "32000" &&
|
||||
$directory != "48000" &&
|
||||
is_dir($music_on_hold_category_parent_dir."/".$directory)
|
||||
) {
|
||||
echo "<option value='".$directory."'>".(str_replace('_', ' ', $directory))."</option>\n";
|
||||
$category_dirs[] = $directory; // array used to output category directory contents below
|
||||
}
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
echo "<td width='40%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo " <table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vncell' width='30%' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-category']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%' style='white-space: nowrap;'>\n";
|
||||
echo " <select name='name' id='name_select' class='formfld' style='width: auto;'>\n";
|
||||
if (is_array($moh_names['local']) && sizeof($moh_names['local']) > 0) {
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " <optgroup label='".$text['option-local']."'>\n";
|
||||
}
|
||||
foreach ($moh_names['local'] as $local_moh_name) {
|
||||
echo " <option value='local|".$local_moh_name."'>".str_replace('_',' ',$local_moh_name)."</option>\n";
|
||||
}
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
if (permission_exists('music_on_hold_global_add') && is_array($moh_names['global']) && sizeof($moh_names['global']) > 0) {
|
||||
echo " <optgroup label='".$text['option-global']."'>\n";
|
||||
foreach ($moh_names['global'] as $global_moh_name) {
|
||||
echo " <option value='global|".$global_moh_name."' style='font-style: italic;'>".str_replace('_',' ',$global_moh_name)."</option>\n";
|
||||
}
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
echo " </select>";
|
||||
echo " <button type='button' id='btn_new' class='btn btn-default list_control_icon' style='margin-left: 3px;' onclick=\"name_mode('new');\"><span class='glyphicon glyphicon-plus'></span></button>";
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " <select name='scope' id='scope' class='formfld' style='display: none;' onchange=\"document.getElementById('name_new').focus();\">\n";
|
||||
echo " <option value='local' selected>".$text['option-local']."</option>\n";
|
||||
echo " <option value='global'>".$text['option-global']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " <input class='formfld' style='width: 100px; display: none;' type='text' name='name_new' id='name_new' maxlength='255' value=''>";
|
||||
echo " <button type='button' id='btn_select' class='btn btn-default list_control_icon' style='display: none; margin-left: 3px;' onclick=\"name_mode('select');\"><span class='glyphicon glyphicon-list-alt'></span></button>";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
echo " <option value='_NEW_CAT_' style='font-style: italic;'>".$text['opt-new']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input class='formfld' style='width: 150px; display: none;' type='text' name='upload_category_new' id='upload_category_new' maxlength='255' value=''>";
|
||||
echo " </td>\n";
|
||||
echo " <td><input id='upload_category_return' type='button' class='button' style='display: none; margin-left: 3px;' value='◁' onclick=\"this.style.display='none'; document.getElementById('upload_category_new').style.display='none'; document.getElementById('upload_category_new').value=''; document.getElementById('upload_category').style.display=''; document.getElementById('upload_category').selectedIndex = 0;\" title='".$text['message-click-select']."'></td>\n";
|
||||
echo " <td style='padding-left: 15px;'>\n";
|
||||
echo " <input name='submit' type='submit' class='btn' id='upload' value='".$text['button-upload']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='30%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo " <table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vncell' width='30%' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sampling']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%'>\n";
|
||||
echo " <select id='rate' name='rate' class='formfld' style='width: auto;'>\n";
|
||||
echo " <option value='8000'>8 kHz</option>\n";
|
||||
echo " <option value='16000'>16 kHz</option>\n";
|
||||
echo " <option value='32000'>32 kHz</option>\n";
|
||||
echo " <option value='auto'>48 kHz / ".$text['option-default']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
echo "</td>\n";
|
||||
echo "<td width='30%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo " <table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vncell' width='30%' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-file-path'];
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%'>\n";
|
||||
echo " <input name='file' id='file' type='file' style='display: none;' onchange=\"check_filetype(this);\">";
|
||||
echo " <label id='file_label' for='file' class='txt' style='width: 150px; overflow: hidden; white-space: nowrap;'>".$text['label-select_a_file']."</label>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
echo "</td>\n";
|
||||
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "<div style='float: right; margin-top: 6px;'>";
|
||||
echo " <input type='reset' class='btn' value='".$text['button-reset']."' onclick=\"reset_file_input('file'); document.getElementById('file_label').innerHTML = '".$text['label-select_a_file']."'; name_mode('select'); return true;\">\n";
|
||||
echo " <input name='submit' type='submit' class='btn' id='upload' value='".$text['button-upload']."'>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "</form>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<br><br><br>\n";
|
||||
}
|
||||
|
||||
//set the row styles
|
||||
|
|
@ -377,167 +459,124 @@ else {
|
|||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//show the default category
|
||||
if (permission_exists('music_on_hold_default_view')) {
|
||||
echo "<b><i>".$text['label-default']."</i></b>\n";
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
echo " - ".$text['message-available-to-all']."\n";
|
||||
}
|
||||
//output moh list
|
||||
foreach ($mohs as $domain_uuid => &$moh) {
|
||||
|
||||
echo "<br><br>\n";
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom: 3px;\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th class=\"listhdr\">".$text['label-file_name']."</th>\n";
|
||||
echo " <th class=\"listhdr\">".$text['label-tools']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;'>".$text['label-uploaded']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;' nowrap=\"nowrap\">".$text['label-file-size']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;' nowrap=\"nowrap\">".$text['label-sampling']."</th>\n";
|
||||
echo " <td width='22px' align=\"center\"></td>\n";
|
||||
echo " </tr>";
|
||||
foreach ($moh as $moh_name => &$moh_rates) {
|
||||
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
$directory = $music_on_hold_dir."/".$sampling_rate_dir;
|
||||
if (file_exists($directory) && $handle = opendir($directory)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && is_file($music_on_hold_dir."/".$sampling_rate_dir."/".$file)) {
|
||||
$row_uuid = uuid();
|
||||
|
||||
$file_size = filesize($music_on_hold_dir."/".$sampling_rate_dir."/".$file);
|
||||
$file_size = byte_convert($file_size);
|
||||
|
||||
//playback progress bar
|
||||
echo "<tr id='recording_progress_bar_".$row_uuid."' style='display: none;'><td colspan='5' class='".$row_style[$c]."' style='padding: 0px; border: none;'><span class='playback_progress_bar' id='recording_progress_".$row_uuid."'></span></td></tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo " <td class='".$row_style[$c]."'>".$file."</td>\n";
|
||||
if (strlen($file) > 0) {
|
||||
echo " <td valign='top' class='".$row_style[$c]." row_style_slim tr_link_void'>";
|
||||
$recording_file_path = $file;
|
||||
$recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
|
||||
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
|
||||
switch ($recording_file_ext) {
|
||||
case "wav" : $recording_type = "audio/wav"; break;
|
||||
case "mp3" : $recording_type = "audio/mpeg"; break;
|
||||
case "ogg" : $recording_type = "audio/ogg"; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".$row_uuid."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$row_uuid."')\" onended=\"recording_reset('".$row_uuid."');\" src=\"".PROJECT_PATH."/app/music_on_hold/music_on_hold.php?a=download&sampling_rate=".$sampling_rate_dir."&type=moh&file_name=".base64_encode($recording_file_path)."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row_uuid."' onclick=\"recording_play('".$row_uuid."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
echo "<a href=\"".PROJECT_PATH."/app/music_on_hold/music_on_hold.php?a=download&sampling_rate=".$sampling_rate_dir."&type=moh&t=bin&file_name=".base64_encode($recording_file_path)."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".date ("F d Y H:i:s", filemtime($music_on_hold_dir."/".$sampling_rate_dir."/".$file))."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".$file_size."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".($sampling_rate_dir / 1000)." kHz</td>\n";
|
||||
echo " <td class='list_control_icon'>\n";
|
||||
if (permission_exists('music_on_hold_default_delete')) {
|
||||
echo "<a href=\"music_on_hold.php?type=moh&act=del&sampling_rate=".$sampling_rate_dir."&file_name=".base64_encode($file)."\" onclick=\"return confirm('Do you really want to delete this file?')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$c = ($c==0) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
$moh_name = str_replace('_', ' ', $moh_name);
|
||||
if ($domain_uuid == '_global_') {
|
||||
echo "<b><i>".$moh_name."</i></b> - ".$text['label-global']."\n";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
else {
|
||||
echo "<b>".$moh_name."</b>\n";
|
||||
}
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0' style='margin-bottom: 3px;'>\n";
|
||||
|
||||
foreach ($moh_rates as $moh_rate => $moh_settings) {
|
||||
$c = 0;
|
||||
|
||||
//determine if rate was set to auto or not
|
||||
$auto_rate = (substr_count($moh_settings['name'], '/') == 0) ? true : false;
|
||||
|
||||
//determine icons to show
|
||||
$moh_icons = array();
|
||||
$i = 0;
|
||||
if (permission_exists('music_on_hold_path')) {
|
||||
$moh_icons[$i]['glyphicon'] = 'glyphicon-folder-open';
|
||||
$moh_icons[$i]['title'] = $moh_paths[$moh_settings['uuid']];
|
||||
$i++;
|
||||
}
|
||||
if ($moh_settings['shuffle'] == 'true') {
|
||||
$moh_icons[$i]['glyphicon'] = 'glyphicon-random';
|
||||
$moh_icons[$i]['title'] = $text['label-shuffle'];
|
||||
$i++;
|
||||
}
|
||||
if ($moh_settings['chime_list'] != '') {
|
||||
$moh_icons[$i]['glyphicon'] = 'glyphicon-bell';
|
||||
$moh_icons[$i]['title'] = $text['label-chime_list'].': '.$moh_settings['chime_list'];
|
||||
$i++;
|
||||
}
|
||||
if ($moh_settings['channels'] == '2') {
|
||||
$moh_icons[$i]['glyphicon'] = 'glyphicon-headphones';
|
||||
$moh_icons[$i]['title'] = $text['label-stereo'];
|
||||
$moh_icons[$i]['margin'] = 6;
|
||||
$i++;
|
||||
}
|
||||
if (is_array($moh_icons) && sizeof($moh_icons) > 0) {
|
||||
foreach ($moh_icons as $moh_icon) {
|
||||
$icons .= "<span class='glyphicon ".$moh_icon['glyphicon']." icon_glyphicon_body' title='".$moh_icon['title']."' style='width: 12px; height: 12px; margin-left: ".(($moh_icon['margin'] != '') ? $moh_icon['margin'] : 8)."px; vertical-align: text-top; cursor: help;'></span>";
|
||||
}
|
||||
}
|
||||
echo " <tr>\n";
|
||||
echo " <th class='listhdr'>".(($auto_rate) ? ($moh_rate/1000).' kHz / '.$text['option-default'] : ($moh_rate/1000)." kHz").$icons."</th>\n";
|
||||
echo " <th class='listhdr' style='width: 70px;'> </th>\n";
|
||||
echo " <th class='listhdr' style='width: 85px; text-align: right; white-space: nowrap;'>".$text['label-file-size']."</th>\n";
|
||||
echo " <th class='listhdr' style='width: 170px; text-align: right;'>".$text['label-uploaded']."</th>\n";
|
||||
echo " <td class='".((!permission_exists('music_on_hold_global_delete')) ? 'list_control_icon' : 'list_control_icons')." tr_link_void'>";
|
||||
if ( ($domain_uuid == '_global_' && permission_exists('music_on_hold_global_edit')) || ($domain_uuid != '_global_' && permission_exists('music_on_hold_edit')) ) {
|
||||
echo "<a href='music_on_hold_edit.php?id=".$moh_settings['uuid']."'>".$v_link_label_edit."</a>";
|
||||
}
|
||||
if ( ($domain_uuid == '_global_' && permission_exists('music_on_hold_global_delete')) || ($domain_uuid != '_global_' && permission_exists('music_on_hold_delete')) ) {
|
||||
echo "<a href='?action=delete&id=".$moh_settings['uuid']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " </tr>";
|
||||
unset($moh_icons, $icons);
|
||||
|
||||
//show moh files
|
||||
if (isset($moh_settings['path'])) {
|
||||
$moh_path = $moh_settings['path'];
|
||||
if (file_exists($moh_path)) {
|
||||
$moh_files = array_merge(glob($moh_path.'/*.wav'), glob($moh_path.'/*.mp3'), glob($moh_path.'/*.ogg'));
|
||||
foreach ($moh_files as $moh_file_path) {
|
||||
$moh_file = strtolower(pathinfo($moh_file_path, PATHINFO_BASENAME));
|
||||
$moh_file_size = byte_convert(filesize($moh_file_path));
|
||||
$moh_file_date = date("M d, Y H:i:s", filemtime($moh_file_path));
|
||||
$moh_file_ext = pathinfo($moh_file, PATHINFO_EXTENSION);
|
||||
switch ($moh_file_ext) {
|
||||
case "wav" : $moh_file_type = "audio/wav"; break;
|
||||
case "mp3" : $moh_file_type = "audio/mpeg"; break;
|
||||
case "ogg" : $moh_file_type = "audio/ogg"; break;
|
||||
}
|
||||
$row_uuid = uuid();
|
||||
echo "<tr id='recording_progress_bar_".$row_uuid."' style='display: none;'><td colspan='4' class='".$row_style[$c]." playback_progress_bar_background' style='padding: 0; border: none;'><span class='playback_progress_bar' id='recording_progress_".$row_uuid."'></span></td></tr>\n";
|
||||
$tr_link = "href=\"javascript:recording_play('".$row_uuid."');\"";
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td class='".$row_style[$c]."'>".$moh_file."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." row_style_slim tr_link_void'>";
|
||||
echo "<audio id='recording_audio_".$row_uuid."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$row_uuid."')\" onended=\"recording_reset('".$row_uuid."');\" src='?action=download&id=".$moh_settings['uuid']."&file=".base64_encode($moh_file)."' type='".$moh_file_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row_uuid."' onclick=\"recording_play('".$row_uuid."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
echo "<span onclick=\"recording_stop('".$row_uuid."')\" title='".$text['label-stop']."'>".$v_link_label_stop."</span>";
|
||||
echo " </td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right; white-space: nowrap;'>".$moh_file_size."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".$moh_file_date."</td>\n";
|
||||
echo " <td class='".((!permission_exists('music_on_hold_global_delete')) ? 'list_control_icon' : 'list_control_icons')."'>\n";
|
||||
echo "<a href='?action=download&id=".$moh_settings['uuid']."&file=".base64_encode($moh_file)."' title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
if ( ($domain_uuid == '_global_' && permission_exists('music_on_hold_global_delete')) || ($domain_uuid != '_global_' && permission_exists('music_on_hold_delete')) ) {
|
||||
echo "<a href='?action=delete&id=".$moh_settings['uuid']."&file=".base64_encode($moh_file)."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$c = ($c) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr class='tr_link_void'><td colspan='5'><div style='width: 1px; height: 15px;'></div></td></tr>\n";
|
||||
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br>\n";
|
||||
|
||||
}
|
||||
|
||||
if ($v_path_show) {
|
||||
echo "<div style='font-size: 10px; text-align: right; margin-right: 25px;'><strong>".$text['label-location'].":</strong> ".$music_on_hold_dir."</div>\n";
|
||||
}
|
||||
echo "<br><br>\n";
|
||||
|
||||
//show additional categories
|
||||
if (isset($category_dirs)) foreach ($category_dirs as $category_number => $category_dir) {
|
||||
$c = 0;
|
||||
|
||||
echo "<b>".(str_replace('_', ' ', $category_dir))."</b>\n";
|
||||
echo "<br><br>\n";
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom: 3px;\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th class=\"listhdr\">".$text['label-file_name']."</th>\n";
|
||||
echo " <th class=\"listhdr\">".$text['label-tools']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;'>".$text['label-uploaded']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;' nowrap=\"nowrap\">".$text['label-file-size']."</th>\n";
|
||||
echo " <th class=\"listhdr\" style='text-align: right;' nowrap=\"nowrap\">".$text['label-sampling']."</th>\n";
|
||||
echo " <td width='22px' align=\"center\" style=\"padding: 2px;\"><span id='category_".$category_number."_delete_icon'></span></td>\n";
|
||||
echo " </tr>";
|
||||
|
||||
$moh_found = false;
|
||||
|
||||
if (isset($sampling_rate_dirs)) foreach ($sampling_rate_dirs as $sampling_rate_dir) {
|
||||
$directory = $music_on_hold_category_parent_dir."/".$category_dir."/".$sampling_rate_dir;
|
||||
if (file_exists($directory) && $handle = opendir($directory)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && is_file($directory."/".$file)) {
|
||||
$row_uuid = uuid();
|
||||
|
||||
$file_size = filesize($directory."/".$file);
|
||||
$file_size = byte_convert($file_size);
|
||||
|
||||
//playback progress bar
|
||||
echo "<tr id='recording_progress_bar_".$row_uuid."' style='display: none;'><td colspan='5'><span class='playback_progress_bar' id='recording_progress_".$row_uuid."'></span></td></tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo " <td class='".$row_style[$c]."'>".$file."</td>\n";
|
||||
if (strlen($file) > 0) {
|
||||
echo " <td valign='top' class='".$row_style[$c]." row_style_slim tr_link_void'>";
|
||||
$recording_file_path = $file;
|
||||
$recording_file_name = strtolower(pathinfo($row['recording_filename'], PATHINFO_BASENAME));
|
||||
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
|
||||
switch ($recording_file_ext) {
|
||||
case "wav" : $recording_type = "audio/wav"; break;
|
||||
case "mp3" : $recording_type = "audio/mpeg"; break;
|
||||
case "ogg" : $recording_type = "audio/ogg"; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".$row_uuid."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$row_uuid."')\" onended=\"recording_reset('".$row_uuid."');\" src=\"".PROJECT_PATH."/app/music_on_hold/music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=moh&file_name=".base64_encode($recording_file_path)."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row_uuid."' onclick=\"recording_play('".$row_uuid."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
echo "<a href=\"".PROJECT_PATH."/app/music_on_hold/music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=moh&t=bin&file_name=".base64_encode($recording_file_path)."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".date ("F d Y H:i:s", filemtime($music_on_hold_category_parent_dir."/".$category_dir."/".$sampling_rate_dir."/".$file))."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".$file_size."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;'>".($sampling_rate_dir / 1000)." kHz</td>\n";
|
||||
echo " <td class='list_control_icon'>";
|
||||
if (permission_exists('music_on_hold_delete')) {
|
||||
echo "<a href=\"music_on_hold.php?type=moh&act=del&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&file_name=".base64_encode($file)."\" onclick=\"return confirm('".$text['message-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$c = ($c==0) ? 1 : 0;
|
||||
|
||||
$moh_found = true;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$moh_found) {
|
||||
echo "<tr>\n";
|
||||
echo " <td colspan='5' align='left' class='".$row_style[$c]."'>\n";
|
||||
echo " ".$text['message-nofiles']."";
|
||||
echo " <script>document.getElementById('category_".$category_number."_delete_icon').innerHTML = \"<a href='music_on_hold.php?type=cat&act=del&category=".base64_encode($category_dir)."' title='".$text['label-delete-category']."'>".$v_link_label_delete."</a>\";</script>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
if ($v_path_show) {
|
||||
echo "<div style='font-size: 10px; text-align: right; margin-right: 25px;'><strong>".$text['label-location'].":</strong> ".$music_on_hold_category_parent_dir."/".$category_dir."</div>\n";
|
||||
}
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,341 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('music_on_hold_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get current moh record, build array
|
||||
$sql = "select * from v_music_on_hold ";
|
||||
$sql .= "where music_on_hold_uuid = '".$_GET['id']."' ";
|
||||
if (!permission_exists('music_on_hold_global_edit')) {
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
}
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||
foreach ($row as $index => $value) {
|
||||
$moh[str_replace('music_on_hold_','',$index)] = $value;
|
||||
$moh['name_only'] = (substr_count($moh['name'], '/') > 0) ? substr($moh['name'], 0, strpos($moh['name'],'/')) : $moh['name'];
|
||||
}
|
||||
unset($sql, $prep_statement, $row);
|
||||
//echo "<pre>".print_r($moh, true)."</pre>"; exit;
|
||||
|
||||
if (is_array($_POST) && sizeof($_POST) > 0) {
|
||||
//retrieve posted values
|
||||
$moh_uuid = check_str($_POST['uuid']);
|
||||
$moh_shuffle = check_str($_POST['shuffle']);
|
||||
$moh_channels = check_str($_POST['channels']);
|
||||
$moh_interval = check_str($_POST['interval']);
|
||||
$moh_chime_list = check_str($_POST['chime_list']);
|
||||
$moh_chime_freq = check_str($_POST['chime_freq']);
|
||||
$moh_chime_max = check_str($_POST['chime_max']);
|
||||
$moh_domain_uuid = check_str($_POST['domain_uuid']);
|
||||
$moh_path = check_str($_POST['path']);
|
||||
|
||||
//update the moh record
|
||||
$sql = "update v_music_on_hold set ";
|
||||
if (permission_exists('music_on_hold_domain')) {
|
||||
$sql .= "domain_uuid = ".(($moh_domain_uuid != '') ? "'".$moh_domain_uuid."'" : 'null').", ";
|
||||
}
|
||||
if (permission_exists('music_on_hold_path')) {
|
||||
$sql .= "music_on_hold_path = ".(($moh_path != '') ? "'".$moh_path."'" : '$${sounds_dir}/music').", ";
|
||||
}
|
||||
$sql .= "music_on_hold_shuffle = '".$moh_shuffle."', ";
|
||||
$sql .= "music_on_hold_channels = ".$moh_channels.", ";
|
||||
$sql .= "music_on_hold_interval = ".(($moh_interval != '') ? $moh_interval : '20').", ";
|
||||
$sql .= "music_on_hold_timer_name = 'soft', ";
|
||||
$sql .= "music_on_hold_chime_list = '".$moh_chime_list."', ";
|
||||
$sql .= "music_on_hold_chime_freq = ".(($moh_chime_freq != '') ? $moh_chime_freq : 'null').", ";
|
||||
$sql .= "music_on_hold_chime_max = ".(($moh_chime_max != '') ? $moh_chime_max : 'null')." ";
|
||||
$sql .= "where music_on_hold_uuid = '".$moh_uuid."' ";
|
||||
if (!permission_exists('music_on_hold_domain')) {
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
}
|
||||
//echo $sql."<br>"; exit;
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//set message
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
|
||||
//redirect
|
||||
header("Location: music_on_hold.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
$document['title'] = $text['title-moh_settings'];
|
||||
|
||||
//show the content
|
||||
if (if_group("superadmin")) {
|
||||
echo "<script>\n";
|
||||
echo "var Objs;\n";
|
||||
echo "\n";
|
||||
echo "function changeToInput(obj){\n";
|
||||
echo " tb=document.createElement('INPUT');\n";
|
||||
echo " tb.type='text';\n";
|
||||
echo " tb.name=obj.name;\n";
|
||||
echo " tb.setAttribute('class', 'formfld');\n";
|
||||
echo " tb.setAttribute('style', 'width: 380px;');\n";
|
||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||
echo " tbb=document.createElement('INPUT');\n";
|
||||
echo " tbb.setAttribute('class', 'btn');\n";
|
||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||
echo " tbb.type='button';\n";
|
||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
||||
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
|
||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||
echo " obj.parentNode.removeChild(obj);\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
echo "function Replace(obj){\n";
|
||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||
echo "}\n";
|
||||
echo "</script>\n";
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo "<form method='post' name='frm'>\n";
|
||||
echo "<input type='hidden' name='uuid' value='".$moh['uuid']."'>\n";
|
||||
|
||||
echo "<div style='float: right;'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='music_on_hold.php'\" value='".$text['button-back']."'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo "</div>\n";
|
||||
echo "<b>".$text['header-moh_settings'].": ".$moh['name_only']." (".($moh['rate']/1000).' kHz'.(($moh['rate'] == '48000') ? ' / '.$text['option-default'] : null).")</b>";
|
||||
echo "<br /><br />\n\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' width='30%'>\n";
|
||||
echo " ".$text['label-shuffle']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left' width='70%'>\n";
|
||||
echo " <select name='shuffle' class='formfld'>\n";
|
||||
echo " <option value='false' ".(($moh['shuffle'] == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
||||
echo " <option value='true' ".(($moh['shuffle'] == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell'>\n";
|
||||
echo " ".$text['label-channels']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='channels' class='formfld'>\n";
|
||||
echo " <option value='1'>".$text['label-mono']."</option>\n";
|
||||
echo " <option value='2' ".(($moh['channels'] == '2') ? 'selected' : null).">".$text['label-stereo']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell'>\n";
|
||||
echo " ".$text['label-interval']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='interval' maxlength='4' style='max-width: 50px;' value='".$moh['interval']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell'>\n";
|
||||
echo " ".$text['label-chime_list']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='chime_list' class='formfld' style='width: 350px;' ".((permission_exists('music_on_hold_path')) ? "onchange='changeToInput(this);'" : null).">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
//misc optgroup
|
||||
/*
|
||||
if (if_group("superadmin")) {
|
||||
echo "<optgroup label='Misc'>\n";
|
||||
echo " <option value='phrase:'>phrase:</option>\n";
|
||||
echo " <option value='say:'>say:</option>\n";
|
||||
echo " <option value='tone_stream:'>tone_stream:</option>\n";
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
*/
|
||||
//recordings
|
||||
$tmp_selected = false;
|
||||
$sql = "select * from v_recordings where domain_uuid = '".$domain_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$recordings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($recordings) > 0) {
|
||||
echo "<optgroup label='Recordings'>\n";
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($moh['chime_list'] == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($moh['chime_list']) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else if ($moh['chime_list'] == $recording_filename && strlen($moh['chime_list']) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".$recording_filename."'>".$recording_name."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//phrases
|
||||
$sql = "select * from v_phrases where domain_uuid = '".$domain_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) {
|
||||
echo "<optgroup label='Phrases'>\n";
|
||||
foreach ($result as &$row) {
|
||||
if ($moh['chime_list'] == "phrase:".$row["phrase_uuid"]) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='phrase:".$row["phrase_uuid"]."' selected='selected'>".$row["phrase_name"]."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='phrase:".$row["phrase_uuid"]."'>".$row["phrase_name"]."</option>\n";
|
||||
}
|
||||
}
|
||||
unset ($prep_statement);
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//sounds
|
||||
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($dir_array) > 0) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($moh['chime_list'], 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$moh['chime_list'] = substr($moh['chime_list'], 71);
|
||||
}
|
||||
if ($moh['chime_list'] == $key) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='$key' selected='selected'>$key</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='$key'>$key</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//select
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected && strlen($moh['chime_list']) > 0) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$moh['chime_list'])) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$moh['chime_list']."' selected='selected'>".$moh['chime_list']."</option>\n";
|
||||
}
|
||||
else if (substr($moh['chime_list'], -3) == "wav" || substr($moh['chime_list'], -3) == "mp3") {
|
||||
echo " <option value='".$moh['chime_list']."' selected='selected'>".$moh['chime_list']."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
unset($tmp_selected);
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell'>\n";
|
||||
echo " ".$text['label-chime_frequency']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='chime_freq' maxlength='4' style='max-width: 50px;' value='".$moh['chime_freq']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell'>\n";
|
||||
echo " ".$text['label-chime_maximum']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='chime_max' maxlength='4' style='max-width: 50px;' value='".$moh['chime_max']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('music_on_hold_domain')) {
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vncell' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-domain']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left'>\n";
|
||||
echo " <select name='domain_uuid' class='formfld'>\n";
|
||||
if (permission_exists('music_on_hold_global_view') && permission_exists('music_on_hold_global_add')) {
|
||||
echo " <option value=''>".$text['label-global']."</option>\n";
|
||||
}
|
||||
foreach ($_SESSION['domains'] as $row) {
|
||||
echo " <option value='".$row['domain_uuid']."' ".(($row['domain_uuid'] == $moh['domain_uuid']) ? "selected='selected'" : null).">".$row['domain_name']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('music_on_hold_path')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' width='30%'>\n";
|
||||
echo " ".$text['label-path']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left' width='70%'>\n";
|
||||
echo " <input class='formfld' type='text' name='path' value='".$moh['path']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
echo "<br>";
|
||||
|
||||
echo "<div style='float: right;'>\n";
|
||||
echo "<input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
|
|
@ -379,7 +379,7 @@ require_once "resources/check_auth.php";
|
|||
foreach($result as $row) {
|
||||
//playback progress bar
|
||||
if (permission_exists('voicemail_greeting_play')) {
|
||||
echo "<tr id='recording_progress_bar_".$row['voicemail_greeting_uuid']."' style='display: none;'><td colspan='".$colspan."'><span class='playback_progress_bar' id='recording_progress_".$row['voicemail_greeting_uuid']."'></span></td></tr>\n";
|
||||
echo "<tr id='recording_progress_bar_".$row['voicemail_greeting_uuid']."' style='display: none;'><td colspan='".$colspan."' class='".$row_style[$c]." playback_progress_bar_background'><span class='playback_progress_bar' id='recording_progress_".$row['voicemail_greeting_uuid']."'></span></td></tr>\n";
|
||||
}
|
||||
$tr_link = (permission_exists('voicemail_greeting_edit')) ? "href='voicemail_greeting_edit.php?id=".$row['voicemail_greeting_uuid']."&voicemail_id=".$voicemail_id."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
|
|
|
|||
|
|
@ -336,6 +336,18 @@ require_once "resources/require.php";
|
|||
echo " });\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//prevent enter key submit on search field
|
||||
echo "<script language='javascript' type='text/javascript'>\n";
|
||||
echo " $(document).ready(function() {\n";
|
||||
echo " $('#group_permission_search').keydown(function(event){\n";
|
||||
echo " if (event.keyCode == 13) {\n";
|
||||
echo " event.preventDefault();\n";
|
||||
echo " return false;\n";
|
||||
echo " }\n";
|
||||
echo " });\n";
|
||||
echo " });\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<input type='hidden' name='domain_uuid' value='".$domain_uuid."'>\n";
|
||||
|
|
|
|||
|
|
@ -1379,6 +1379,21 @@ if ($domains_processed == 1) {
|
|||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = "API key that allows access to the available fonts list.";
|
||||
$x++;
|
||||
/* icons */
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'body_icon_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(255,255,255,0.25)';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the color (and opacity) for the icons in the body.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'body_icon_color_hover';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(255,255,255,0.50)';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the hover color (and opacity) for the icons in the body.';
|
||||
$x++;
|
||||
|
||||
|
||||
if(!$set_session_theme) {
|
||||
|
|
@ -1389,7 +1404,7 @@ if ($domains_processed == 1) {
|
|||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
|
||||
//find the missing default settings
|
||||
$i = 0;
|
||||
foreach ($array as $setting) {
|
||||
|
|
@ -1398,19 +1413,19 @@ if ($domains_processed == 1) {
|
|||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||
$found = true;
|
||||
|
||||
|
||||
//remove items from the array that were found
|
||||
unset($missing[$i]);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
//get the missing count
|
||||
$i = 0;
|
||||
foreach ($missing as $row) { $i++; }
|
||||
$missing_count = $i;
|
||||
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) {
|
||||
$sql = "insert into v_default_settings (";
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
$v_link_label_view = "<button type='button' class='btn btn-default list_control_icon'><span class='glyphicon glyphicon-eye-open'></span></button>";
|
||||
$v_link_label_play = "<button type='button' class='btn btn-default list_control_icon'><span class='glyphicon glyphicon-play'></span></button>";
|
||||
$v_link_label_pause = "<button type='button' class='btn btn-default list_control_icon'><span class='glyphicon glyphicon-pause'></span></button>";
|
||||
$v_link_label_stop = "<button type='button' class='btn btn-default list_control_icon'><span class='glyphicon glyphicon-stop'></span></button>";
|
||||
$v_link_label_download = "<button type='button' class='btn btn-default list_control_icon'><span class='glyphicon glyphicon-cloud-download'></span></button>";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -569,6 +569,19 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
opacity: 1.0;
|
||||
}
|
||||
|
||||
/* ICONS *********************************************************************/
|
||||
|
||||
span.icon_glyphicon_body {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: <?php echo ($_SESSION['theme']['body_icon_color']['text'] != '') ? $_SESSION['theme']['body_icon_color']['text'] : 'rgba(0,0,0,0.25)'; ?>;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
span.icon_glyphicon_body:hover {
|
||||
color: <?php echo ($_SESSION['theme']['body_icon_color_hover']['text'] != '') ? $_SESSION['theme']['body_icon_color_hover']['text'] : 'rgba(0,0,0,0.5)'; ?>;
|
||||
}
|
||||
|
||||
/* DOMAIN SELECTOR ***********************************************************/
|
||||
|
||||
#domains_container {
|
||||
|
|
@ -783,11 +796,13 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
input[type=text].txt,
|
||||
input[type=number].txt,
|
||||
input[type=password].txt,
|
||||
label.txt,
|
||||
select.formfld,
|
||||
textarea.formfld,
|
||||
input[type=text].formfld,
|
||||
input[type=number].formfld,
|
||||
input[type=password].formfld {
|
||||
input[type=password].formfld,
|
||||
label.formfld {
|
||||
font-family: <?php echo ($_SESSION['theme']['input_text_font']['text'] != '') ? $_SESSION['theme']['input_text_font']['text'] : 'Arial'; ?>;
|
||||
font-size: <?php echo ($_SESSION['theme']['input_text_size']['text'] != '') ? $_SESSION['theme']['input_text_size']['text'] : '12px'; ?>;
|
||||
color: <?php echo ($_SESSION['theme']['input_text_color']['text'] != '') ? $_SESSION['theme']['input_text_color']['text'] : '#000000'; ?>;
|
||||
|
|
@ -847,10 +862,12 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
input[type=text].txt:hover,
|
||||
input[type=number].txt:hover,
|
||||
input[type=password].txt:hover,
|
||||
label.txt:hover,
|
||||
textarea.formfld:hover,
|
||||
input[type=text].formfld:hover,
|
||||
input[type=number].formfld:hover,
|
||||
input[type=password].formfld:hover {
|
||||
input[type=password].formfld:hover,
|
||||
label.formfld:hover {
|
||||
border-color: <?php echo ($_SESSION['theme']['input_border_color_hover']['text'] != '') ? $_SESSION['theme']['input_border_color_hover']['text'] : '#c0c0c0'; ?>;
|
||||
}
|
||||
|
||||
|
|
@ -858,10 +875,12 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
input[type=text].txt:focus,
|
||||
input[type=number].txt:focus,
|
||||
input[type=password].txt:focus,
|
||||
label.txt:focus,
|
||||
textarea.formfld:focus,
|
||||
input[type=text].formfld:focus,
|
||||
input[type=number].formfld:focus,
|
||||
input[type=password].formfld:focus {
|
||||
input[type=password].formfld:focus,
|
||||
label.formfld:focus {
|
||||
border-color: <?php echo ($_SESSION['theme']['input_border_color_focus']['text'] != '') ? $_SESSION['theme']['input_border_color_focus']['text'] : '#c0c0c0'; ?>;
|
||||
/* first clear */
|
||||
-webkit-box-shadow: none;
|
||||
|
|
@ -1030,9 +1049,30 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
}
|
||||
|
||||
span.playback_progress_bar {
|
||||
background-color: #c43e42;
|
||||
height: 1px;
|
||||
background-color: #b90004;
|
||||
width: 17px;
|
||||
height: 4px;
|
||||
margin-bottom: 3px;
|
||||
display: block;
|
||||
-moz-border-radius: 0 0 6px 6px;
|
||||
-webkit-border-radius: 0 0 6px 6px;
|
||||
-khtml-border-radius: 0 0 6px 6px;
|
||||
border-radius: 0 0 6px 6px;
|
||||
-webkit-box-shadow: 0 0 3px 0px rgba(255,0,0,0.9);
|
||||
-moz-box-shadow: 0 0 3px 0px rgba(255,0,0,0.9);
|
||||
box-shadow: 0 0 3px 0px rgba(255,0,0,0.9);
|
||||
}
|
||||
|
||||
td.playback_progress_bar_background {
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
background-image: -ms-linear-gradient(top, rgba(0,0,0,0.15) 0%, transparent 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(0,0,0,0.15) 0%, transparent 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(0,0,0,0.15) 0%, transparent 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0,0,0,0.15)), color-stop(1, transparent));
|
||||
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.15) 0%, transparent 100%);
|
||||
background-image: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, transparent 100%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.pwstrength_progress {
|
||||
|
|
@ -1148,6 +1188,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
color: <?php echo ($_SESSION['theme']['form_table_label_text_color']['text'] != '') ? $_SESSION['theme']['form_table_label_text_color']['text'] : '#000000'; ?>;
|
||||
font-family: <?php echo ($_SESSION['theme']['form_table_label_text_font']['text'] != '') ? $_SESSION['theme']['form_table_label_text_font']['text'] : 'Arial'; ?>;
|
||||
font-size: <?php echo ($_SESSION['theme']['form_table_label_text_size']['text'] != '') ? $_SESSION['theme']['form_table_label_text_size']['text'] : '9pt'; ?>;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vncellreq { /* form_label_required */
|
||||
|
|
@ -1166,6 +1207,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
font-family: <?php echo ($_SESSION['theme']['form_table_label_text_font']['text'] != '') ? $_SESSION['theme']['form_table_label_text_font']['text'] : 'Arial'; ?>;
|
||||
font-size: <?php echo ($_SESSION['theme']['form_table_label_text_size']['text'] != '') ? $_SESSION['theme']['form_table_label_text_size']['text'] : '9pt'; ?>;
|
||||
font-weight: <?php echo ($_SESSION['theme']['form_table_label_required_text_weight']['text'] != '') ? $_SESSION['theme']['form_table_label_required_text_weight']['text'] : 'bold'; ?>;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vtable { /* form_field */
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@
|
|||
if (document.getElementById('recording_progress_bar_'+recording_id)) {
|
||||
document.getElementById('recording_progress_bar_'+recording_id).style.display='';
|
||||
}
|
||||
recording_audio = document.getElementById('recording_audio_'+recording_id)
|
||||
recording_audio = document.getElementById('recording_audio_'+recording_id);
|
||||
|
||||
if (recording_audio.paused) {
|
||||
recording_audio.volume = 1;
|
||||
|
|
@ -252,7 +252,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
function recording_stop(recording_id) {
|
||||
recording_reset(recording_id);
|
||||
}
|
||||
|
||||
function recording_reset(recording_id) {
|
||||
recording_audio = document.getElementById('recording_audio_'+recording_id);
|
||||
recording_audio.pause();
|
||||
recording_audio.currentTime = 0;
|
||||
if (document.getElementById('recording_progress_bar_'+recording_id)) {
|
||||
document.getElementById('recording_progress_bar_'+recording_id).style.display='none';
|
||||
}
|
||||
|
|
@ -266,7 +273,7 @@
|
|||
if (recording_audio.currentTime > 0) {
|
||||
value = (100 / recording_audio.duration) * recording_audio.currentTime;
|
||||
}
|
||||
recording_progress.style.width = value + "%";
|
||||
recording_progress.style.marginLeft = value + "%";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue