Conference Center: Add ability to use a Phrase for the Greeting, resolving Issue 921 and Issue 818.

This commit is contained in:
Nate Jones
2015-04-17 18:41:31 +00:00
parent b0f569ad1c
commit c03bcd76bb
4 changed files with 189 additions and 151 deletions
+16 -14
View File
@@ -382,7 +382,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
$tmp_selected = false;
$files = Array();
echo " <optgroup label='recordings'>\n";
echo " <optgroup label='Recordings'>\n";
while($file = readdir($dh)) {
if($file != "." && $file != ".." && $file[0] != '.') {
if(is_dir($_SESSION['switch']['recordings']['dir'] . "/" . $file)) {
@@ -405,22 +405,24 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//sounds
$dir_path = $_SESSION['switch']['sounds']['dir'];
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
echo " <optgroup label='sounds'>\n";
foreach ($dir_array as $key => $value) {
if (strlen($value) > 0) {
if (substr($ivr_menu_greet_long, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
$ivr_menu_greet_long = substr($ivr_menu_greet_long, 71);
}
if ($ivr_menu_greet_long == $key) {
$tmp_selected = true;
echo "<option value='$key' selected='selected'>$key</option>\n";
}
else {
echo "<option value='$key'>$key</option>\n";
if (count($dir_array) > 0) {
echo " <optgroup label='Sounds'>\n";
foreach ($dir_array as $key => $value) {
if (strlen($value) > 0) {
if (substr($ivr_menu_greet_long, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
$ivr_menu_greet_long = substr($ivr_menu_greet_long, 71);
}
if ($ivr_menu_greet_long == $key) {
$tmp_selected = true;
echo "<option value='$key' selected='selected'>$key</option>\n";
}
else {
echo "<option value='$key'>$key</option>\n";
}
}
}
echo " </optgroup>\n";
}
echo " </optgroup>\n";
echo " </select>\n";
echo " </td>\n";
echo " <td class='vtable'>\n";