diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 04ac43e839..cccc00855c 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -617,26 +617,15 @@ } } -//get the recordings - $sql = "select recording_name, recording_filename from v_recordings "; - $sql .= "where domain_uuid = :domain_uuid "; - $sql .= "order by recording_name asc "; - $parameters['domain_uuid'] = $_SESSION['domain_uuid']; - $database = new database; - $recordings = $database->select($sql, $parameters, 'all'); - unset($sql, $parameters); +//get the sounds + $sounds = new sounds; + $sounds->sound_types = ['miscellaneous','recordings','phrases']; + $audio_files[0] = $sounds->get(); + unset($sounds); -//get the phrases - $sql = "select * from v_phrases "; - $sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) "; - $parameters['domain_uuid'] = $domain_uuid; - $database = new database; - $phrases = $database->select($sql, $parameters, 'all'); - unset($sql, $parameters); - -//get the sound files - $file = new file; - $sound_files = $file->sounds($ivr_menu_language, $ivr_menu_dialect, $ivr_menu_voice); + $sounds = new sounds; + $audio_files[1] = $sounds->get(); + unset($sounds); //create token $object = new token; @@ -647,24 +636,34 @@ require_once "resources/header.php"; //show the content - echo "\n"; if (permission_exists('recording_play') || permission_exists('recording_download')) { - echo " function set_playable(id, greet_selected) {\n"; - echo " file_ext = greet_selected.split('.').pop();\n"; - echo " var recording_type = '';\n"; + echo "\n"; + } + if (if_group("superadmin")) { + echo "\n"; } - echo ""; echo "