From 23f0d8ed1b51f78f2c6db680a221c62decc764d6 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Mon, 18 May 2015 16:44:38 +0000 Subject: [PATCH] Calls Active: Show gateway name instead of uuid in Application data string, change to jQuery ajax refresh. --- app/calls_active/calls_active.php | 77 +++++++++------------------ app/calls_active/calls_active_inc.php | 7 +++ app/gateways/gateway_copy.php | 5 ++ app/gateways/gateway_delete.php | 3 ++ app/gateways/gateway_edit.php | 15 ++++++ 5 files changed, 55 insertions(+), 52 deletions(-) diff --git a/app/calls_active/calls_active.php b/app/calls_active/calls_active.php index 6544f2f55a..46e05041d7 100644 --- a/app/calls_active/calls_active.php +++ b/app/calls_active/calls_active.php @@ -45,11 +45,25 @@ else { $document['title'] = $text['title']; require_once "resources/header.php"; +//load gateways into a session variable + $sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true'"; + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as $row) { + $_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway']; + } + } + unset($sql, $prep_statement, $result, $row); + //ajax for refresh ?>