diff --git a/app/extensions/extension_dashboard.php b/app/extensions/extension_dashboard.php index a1181fc6df..67b761d79c 100644 --- a/app/extensions/extension_dashboard.php +++ b/app/extensions/extension_dashboard.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2016 All Rights Reserved. + Copyright (C) 2017 All Rights Reserved. */ @@ -125,6 +125,16 @@ //get the extensions $extensions = $_SESSION['user']['extension']; +//get the destinations + $sql = "select * from v_destinations "; + $sql .= "where domain_uuid = '".check_str($domain_uuid)."' "; + $sql .= "and destination_type = 'inbound' "; + $sql .= "order by destination_number asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $destinations = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + unset ($sql, $prep_statement); + //show the content echo "
\n"; @@ -182,11 +192,49 @@ echo " \n"; echo " \n"; - echo " \n"; + if (permission_exists('outbound_caller_id_select')) { + if (count($destinations) > 0) { + echo " \n"; + } + } + else { + echo " \n"; + } echo " \n"; echo " \n"; - echo " \n"; + if (permission_exists('outbound_caller_id_select')) { + if (count($destinations) > 0) { + echo " \n"; + } + } + else { + echo " \n"; + } echo " \n"; //end the row