Update calls_active.php (#4249)

* Update calls_active.php

* Update calls_active.php
This commit is contained in:
AlexanderDCrane
2019-06-03 16:32:57 -06:00
committed by FusionPBX
parent 5724c26a01
commit e3e02e55bc
+8 -8
View File
@@ -17,15 +17,18 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2019
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
*/ */
//includes
include "root.php"; include "root.php";
require_once "resources/require.php"; require_once "resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//check permissions
if (permission_exists('call_active_view')) { if (permission_exists('call_active_view')) {
//access granted //access granted
} }
@@ -33,6 +36,7 @@ else {
echo "access denied"; echo "access denied";
exit; exit;
} }
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
@@ -47,15 +51,11 @@ else {
//load gateways into a session variable //load gateways into a session variable
$sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true' "; $sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true' ";
$prep_statement = $db->prepare($sql); $database = new database;
if ($prep_statement) { $gateways = $database->select($sql, $parameters, 'all');
$prep_statement->execute(); foreach ($gateways as $row) {
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as $row) {
$_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway']; $_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway'];
} }
}
unset($sql, $prep_statement, $result, $row);
//ajax for refresh //ajax for refresh
?> ?>