$prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); unset($sql); //remove parent folder, if empty $parent_path = dirname($stream_path); $parent_path_files = glob(path_join($parent_path, '*')); if (sizeof($parent_files) === 0) { rmdir($parent_path); } } //set message $_SESSION['message'] = $text['message-delete']; } //require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; $music = new switch_music_on_hold(); $music->reload(); //redirect header("Location: music_on_hold.php"); exit; } //include the header require_once "resources/header.php"; $document['title'] = $text['title-music_on_hold']; echo "<script language='JavaScript' type='text/javascript'>\n"; echo "\tfunction check_filetype(file_input) {\n"; echo "\t\tfile_ext = file_input.value.substr((~-file_input.value.lastIndexOf('.') >>> 0) + 2);\n"; echo "\t\tif (file_ext != 'mp3' && file_ext != 'wav' && file_ext != 'ogg' && file_ext != '') {\n"; echo "\t\t\tdisplay_message(\"" . $text['message-unsupported_file_type'] . "\", 'negative', '2750');\n"; echo "\t\t}\n"; echo "\t\tvar selected_file_path = file_input.value;\n"; echo "\t\tselected_file_path = selected_file_path.replace(\"C:\\\\fakepath\\\\\",'');\n";