Update conference_center_edit.php

This commit is contained in:
FusionPBX 2018-03-01 21:40:34 -07:00 committed by GitHub
parent 799c9dd8ae
commit a3f2bc24b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 3 deletions

View File

@ -228,6 +228,15 @@
$prep_statement->execute();
$phrases = $prep_statement->fetchAll(PDO::FETCH_NAMED);
//get the streams
$sql = "select * from v_streams ";
$sql .= "where (domain_uuid = '".$_SESSION["domain_uuid"]."' or domain_uuid is null) ";
$sql .= "and stream_enabled = 'true' ";
$sql .= "order by stream_name asc ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$streams = $prep_statement->fetchAll(PDO::FETCH_NAMED);
//show the header
require_once "resources/header.php";
@ -306,7 +315,7 @@
//recordings
$tmp_selected = false;
if (is_array($recordings)) {
echo "<optgroup label='Recordings'>\n";
echo "<optgroup label='".$text['label-recordings']."'>\n";
foreach ($recordings as &$row) {
$recording_name = $row["recording_name"];
$recording_filename = $row["recording_filename"];
@ -320,9 +329,19 @@
}
echo "</optgroup>\n";
}
//streams
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/streams')) {
if (sizeof($streams) > 0) {
echo " <optgroup label='".$text['label-streams']."'>";
foreach($streams as $row){
echo " <option value='".$row['stream_location']."' ".(($selected == $row['stream_location']) ? 'selected="selected"' : null).">".$row['stream_name']."</option>\n";
}
echo " </optgroup>\n";
}
}
//phrases
if (count($phrases) > 0) {
echo "<optgroup label='Phrases'>\n";
echo "<optgroup label='".$text['label-phrases']."'>\n";
foreach ($phrases as &$row) {
$selected = ($conference_center_greeting == "phrase:".$row["phrase_uuid"]) ? true : false;
echo " <option value='phrase:".$row["phrase_uuid"]."' ".(($selected) ? "selected='selected'" : null).">".$row["phrase_name"]."</option>\n";
@ -335,7 +354,7 @@
$file = new file;
$sound_files = $file->sounds();
if (is_array($sound_files)) {
echo "<optgroup label='Sounds'>\n";
echo "<optgroup label='".$text['label-sounds']."'>\n";
foreach ($sound_files as $key => $value) {
if (strlen($value) > 0) {
if (substr($conference_center_greeting, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {