diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index b32506476e..0888ce3373 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -320,7 +320,7 @@ } //redirect the user - header("Location: ivr_menu_edit.php?id=".$ivr_menu_uuid); + header("Location: ivr_menu_edit.php?id=".escape($ivr_menu_uuid)); return; } //if ($_POST["persistformvar"] != "true") @@ -483,7 +483,7 @@ echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "\n"; @@ -529,12 +529,12 @@ if (empty($ivr_menu_language)) { $ivr_menu_language = "$ivr_menu_language_code/$ivr_menu_dialect/$ivr_menu_voice"; $language_formatted = "$ivr_menu_language_code-$ivr_menu_dialect $ivr_menu_voice"; - echo " \n"; + echo " \n"; } else { $language_array = explode ('/', $ivr_menu_language); $language_formatted = $language_array[0]."-".$language_array[1]." ".$language_array[2]; - echo " \n"; + echo " \n"; } foreach ($language_paths as $key => $language_variables) { @@ -568,9 +568,9 @@ $script .= " tb.className='formfld';\n"; $script .= " tb.setAttribute('id', '".$destination_id."');\n"; $script .= " tb.setAttribute('style', '".$select_style."');\n"; - if ($onchange != '') { - $script .= " tb.setAttribute('onchange', \"".$onchange."\");\n"; - $script .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n"; + if ($on_change != '') { + $script .= " tb.setAttribute('onchange', \"".$on_change."\");\n"; + $script .= " tb.setAttribute('onkeyup', \"".$on_change."\");\n"; } $script .= " tb.value=obj.options[obj.selectedIndex].value;\n"; $script .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n"; @@ -592,8 +592,8 @@ $script .= " obj[0].parentNode.removeChild(obj[1]);\n"; $script .= " obj[0].parentNode.removeChild(obj[2]);\n"; $script .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n"; - if ($onchange != '') { - $script .= " ".$onchange.";\n"; + if ($on_change != '') { + $script .= " ".$on_change.";\n"; } $script .= "}\n"; $script .= "\n"; @@ -618,14 +618,14 @@ $recording_filename = $row["recording_filename"]; if ($ivr_menu_greet_long == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_greet_long) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else if ($ivr_menu_greet_long == $recording_filename && strlen($ivr_menu_greet_long) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo "\n"; @@ -636,10 +636,10 @@ foreach ($phrases as &$row) { if ($ivr_menu_greet_long == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } unset ($prep_statement); @@ -656,10 +656,10 @@ } if ($ivr_menu_greet_long == $value) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -671,13 +671,13 @@ if (!$tmp_selected && strlen($ivr_menu_greet_long) > 0) { echo "\n"; if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_long)) { - echo " \n"; + echo " \n"; } else if (substr($ivr_menu_greet_long, -3) == "wav" || substr($ivr_menu_greet_long, -3) == "mp3") { - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } echo "\n"; } @@ -710,9 +710,9 @@ $script .= " tb.className='formfld';\n"; $script .= " tb.setAttribute('id', '".$destination_id."');\n"; $script .= " tb.setAttribute('style', '".$select_style."');\n"; - if ($onchange != '') { - $script .= " tb.setAttribute('onchange', \"".$onchange."\");\n"; - $script .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n"; + if ($on_change != '') { + $script .= " tb.setAttribute('onchange', \"".$on_change."\");\n"; + $script .= " tb.setAttribute('onkeyup', \"".$on_change."\");\n"; } $script .= " tb.value=obj.options[obj.selectedIndex].value;\n"; $script .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n"; @@ -734,8 +734,8 @@ $script .= " obj[0].parentNode.removeChild(obj[1]);\n"; $script .= " obj[0].parentNode.removeChild(obj[2]);\n"; $script .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n"; - if ($onchange != '') { - $script .= " ".$onchange.";\n"; + if ($on_change != '') { + $script .= " ".$on_change.";\n"; } $script .= "}\n"; $script .= "\n"; @@ -758,16 +758,16 @@ foreach ($recordings as &$row) { $recording_name = $row["recording_name"]; $recording_filename = $row["recording_filename"]; - if ($ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_greet_short) > 0) { + if ($ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($recording_filename) && strlen($ivr_menu_greet_short) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else if ($ivr_menu_greet_short == $recording_filename && strlen($ivr_menu_greet_short) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo "\n"; @@ -778,10 +778,10 @@ foreach ($phrases as &$row) { if ($ivr_menu_greet_short == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo "\n"; @@ -798,10 +798,10 @@ } if ($ivr_menu_greet_short == $value) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -813,13 +813,13 @@ if (!$tmp_selected && strlen($ivr_menu_greet_short) > 0) { echo "\n"; if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_short)) { - echo " \n"; + echo " \n"; } else if (substr($ivr_menu_greet_short, -3) == "wav" || substr($ivr_menu_greet_short, -3) == "mp3") { - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } echo "\n"; } @@ -852,7 +852,7 @@ //add the primary key uuid if (strlen($field['ivr_menu_option_uuid']) > 0) { - echo " \n"; + echo " \n"; } echo "\n"; @@ -874,7 +874,7 @@ if (strlen(htmlspecialchars($field['ivr_menu_option_order']))> 0) { if (strlen($field['ivr_menu_option_order']) == 1) { $field['ivr_menu_option_order'] = "00".$field['ivr_menu_option_order']; } if (strlen($field['ivr_menu_option_order']) == 2) { $field['ivr_menu_option_order'] = "0".$field['ivr_menu_option_order']; } - echo " \n"; + echo " \n"; } $i=0; while($i<=999) { @@ -893,7 +893,7 @@ echo " "; if (strlen($field['ivr_menu_option_uuid']) > 0) { //echo " $v_link_label_edit"; - echo " $v_link_label_delete"; + echo " $v_link_label_delete"; } else { echo "  \n"; @@ -905,7 +905,8 @@ } } unset($sql, $result); -/* + + /* for ($c = 0; $c < 1; $c++) { echo " \n"; echo "\n"; @@ -918,7 +919,7 @@ echo " \n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo " \n"; @@ -944,7 +945,7 @@ echo " \n"; echo " \n"; } -*/ + */ echo " \n"; echo " ".$text['description-options']."\n"; @@ -1062,14 +1063,14 @@ $recording_filename = $row["recording_filename"]; if ($ivr_menu_invalid_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_invalid_sound) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else if ($ivr_menu_invalid_sound == $recording_filename && strlen($ivr_menu_invalid_sound) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo "\n"; @@ -1080,10 +1081,10 @@ foreach ($result as &$row) { if ($ivr_menu_invalid_sound == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } unset ($prep_statement); @@ -1099,10 +1100,10 @@ } if ($ivr_menu_invalid_sound == $value) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -1113,10 +1114,10 @@ if (!$tmp_selected && strlen($ivr_menu_invalid_sound) > 0) { echo "\n"; if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_invalid_sound)) { - echo " \n"; + echo " \n"; } else if (substr($ivr_menu_invalid_sound, -3) == "wav" || substr($ivr_menu_invalid_sound, -3) == "mp3") { - echo " \n"; + echo " \n"; } echo "\n"; } @@ -1152,14 +1153,14 @@ $recording_filename = $row["recording_filename"]; if ($ivr_menu_exit_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_exit_sound) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else if ($ivr_menu_exit_sound == $recording_filename && strlen($ivr_menu_exit_sound) > 0) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo "\n"; @@ -1170,10 +1171,10 @@ foreach ($phrases as &$row) { if ($ivr_menu_exit_sound == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } unset ($prep_statement); @@ -1189,10 +1190,10 @@ } if ($ivr_menu_exit_sound == $value) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -1203,10 +1204,10 @@ if (!$tmp_selected && strlen($ivr_menu_exit_sound) > 0) { echo "\n"; if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_exit_sound)) { - echo " \n"; + echo " \n"; } else if (substr($ivr_menu_exit_sound, -3) == "wav" || substr($ivr_menu_exit_sound, -3) == "mp3") { - echo " \n"; + echo " \n"; } echo "\n"; } @@ -1360,7 +1361,7 @@ echo " \n"; echo " \n"; if (strlen($ivr_menu_uuid) > 0) { - echo " \n"; + echo " \n"; echo " \n"; } echo "
";