diff --git a/resources/switch.php b/resources/switch.php index 2c6c0ae667..e9eb1a68e3 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -868,7 +868,6 @@ function switch_select_destination($select_type, $select_label, $select_name, $s } //gateways - if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/conference_centers/app_config.php")) { if (if_group("superadmin")) { if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact" || $select_type == "bridge") { echo "\n"; @@ -896,9 +895,43 @@ function switch_select_destination($select_type, $select_label, $select_name, $s if ($select_type == "ivr") { echo " \n"; } + if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/conference_centers/app_config.php")) { if ($select_type == "call_center_contact") { echo " \n"; } + } + $tmp_selected = ''; + } + unset($sql, $result); + if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") { + echo "\n"; + } + } + + + //xmpp + if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/xmpp/app_config.php")) { + if (if_group("superadmin")) { + if ($select_type == "bridge") { + echo "\n"; + } + $sql = "select v_xmpp.xmpp_profile_uuid, v_xmpp.profile_name, v_domains.domain_name from v_xmpp "; + $sql .= "inner join v_domains on v_xmpp.domain_uuid=v_domains.domain_uuid "; + $sql .= "where enabled = 'true' "; + $sql .= "order by profile_name asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + $result_count = count($result); + unset ($prep_statement, $sql); + $tmp_selected = ''; + foreach($result as $row) { + if ($row['gateway'] == $select_value) { + $tmp_selected = "selected='selected'"; + } + if ($select_type == "bridge") { + echo " \n"; + } $tmp_selected = ''; } unset($sql, $result);