Make the path more friendly in the IVR Menu.
This commit is contained in:
parent
8e816ceaf3
commit
0e638be4fd
|
|
@ -449,13 +449,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
echo "<optgroup label='sounds'>\n";
|
echo "<optgroup label='sounds'>\n";
|
||||||
foreach ($dir_array as $key => $value) {
|
foreach ($dir_array as $key => $value) {
|
||||||
if (strlen($value) > 0) {
|
if (strlen($value) > 0) {
|
||||||
$tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
if (substr($ivr_menu_greet_long, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||||
if ($ivr_menu_greet_long == $tmp_dir.'/'.$key) {
|
$ivr_menu_greet_long = substr($ivr_menu_greet_long, 71);
|
||||||
$tmp_selected = true;
|
|
||||||
echo " <option value='$tmp_dir/$key' selected>$key</option>\n";
|
|
||||||
}
|
}
|
||||||
else {
|
if ($ivr_menu_greet_long == $key) {
|
||||||
echo " <option value='$tmp_dir/$key'>$key</option>\n";
|
$tmp_selected = true;
|
||||||
|
echo " <option value='$key' selected='selected'>$key</option>\n";
|
||||||
|
} else {
|
||||||
|
echo " <option value='$key'>$key</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -465,12 +466,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
if (!$tmp_selected) {
|
if (!$tmp_selected) {
|
||||||
echo "<optgroup label='selected'>\n";
|
echo "<optgroup label='selected'>\n";
|
||||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long)) {
|
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long)) {
|
||||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long."' selected>".$ivr_menu_greet_long."</option>\n";
|
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||||
} elseif (substr($ivr_menu_greet_long, -3) == "wav" || substr($ivr_menu_greet_long, -3) == "mp3") {
|
} elseif (substr($ivr_menu_greet_long, -3) == "wav" || substr($ivr_menu_greet_long, -3) == "mp3") {
|
||||||
$tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
echo " <option value='".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||||
echo " <option value='".$tmp_dir."/".$ivr_menu_greet_long."' selected>".$ivr_menu_greet_long."</option>\n";
|
|
||||||
} else {
|
} else {
|
||||||
echo " <option value='".$ivr_menu_greet_long."' selected>".$ivr_menu_greet_long."</option>\n";
|
echo " <option value='".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
|
|
@ -478,7 +478,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
unset($tmp_selected);
|
unset($tmp_selected);
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
|
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "The long greeting is played when entering the menu.\n";
|
echo "The long greeting is played when entering the menu.\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
@ -531,13 +530,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
echo "<optgroup label='sounds'>\n";
|
echo "<optgroup label='sounds'>\n";
|
||||||
foreach ($dir_array as $key => $value) {
|
foreach ($dir_array as $key => $value) {
|
||||||
if (strlen($value) > 0) {
|
if (strlen($value) > 0) {
|
||||||
$tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
if (substr($ivr_menu_greet_short, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||||
if ($ivr_menu_greet_short == $tmp_dir.'/'.$key) {
|
$ivr_menu_greet_short = substr($ivr_menu_greet_short, 71);
|
||||||
$tmp_selected = true;
|
|
||||||
echo " <option value='$tmp_dir/$key' selected>$key</option>\n";
|
|
||||||
}
|
}
|
||||||
else {
|
if ($ivr_menu_greet_short == $key) {
|
||||||
echo " <option value='$tmp_dir/$key'>$key</option>\n";
|
$tmp_selected = true;
|
||||||
|
echo " <option value='$key' selected='selected'>$key</option>\n";
|
||||||
|
} else {
|
||||||
|
echo " <option value='$key'>$key</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -547,12 +547,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
if (!$tmp_selected) {
|
if (!$tmp_selected) {
|
||||||
echo "<optgroup label='selected'>\n";
|
echo "<optgroup label='selected'>\n";
|
||||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short)) {
|
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short)) {
|
||||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short."' selected>".$ivr_menu_greet_short."</option>\n";
|
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||||
} elseif (substr($ivr_menu_greet_short, -3) == "wav" || substr($ivr_menu_greet_short, -3) == "mp3") {
|
} elseif (substr($ivr_menu_greet_short, -3) == "wav" || substr($ivr_menu_greet_short, -3) == "mp3") {
|
||||||
$tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
echo " <option value='".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||||
echo " <option value='".$tmp_dir."/".$ivr_menu_greet_short."' selected>".$ivr_menu_greet_short."</option>\n";
|
|
||||||
} else {
|
} else {
|
||||||
echo " <option value='".$ivr_menu_greet_short."' selected>".$ivr_menu_greet_short."</option>\n";
|
echo " <option value='".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||||
}
|
}
|
||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue