mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-24 01:18:27 +00:00
Update switch_music_on_hold.php
This commit is contained in:
@@ -90,6 +90,23 @@ include "root.php";
|
||||
$select .= " </optgroup>\n";
|
||||
}
|
||||
}
|
||||
//streams
|
||||
if (is_dir($_SERVER["PROJECT_ROOT"].'/app/streams')) {
|
||||
$sql = "select * from v_streams ";
|
||||
$sql .= "where (domain_uuid = '".$this->domain_uuid."' or domain_uuid is null) ";
|
||||
$sql .= "and stream_enabled = 'true' ";
|
||||
$sql .= "order by stream_name asc ";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$streams = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (sizeof($streams) > 0) {
|
||||
$select .= " <optgroup label='".$text['label-streams']."'>";
|
||||
foreach($streams as $row){
|
||||
$select .= " <option value='".$row['stream_location']."' ".(($selected == $row['stream_location']) ? 'selected="selected"' : null).">".$row['stream_name']."</option>\n";
|
||||
}
|
||||
$select .= " </optgroup>\n";
|
||||
}
|
||||
}
|
||||
//add additional options
|
||||
if (sizeof($options) > 0) {
|
||||
$select .= " <optgroup label='".$text['label-others']."'>";
|
||||
|
||||
Reference in New Issue
Block a user