From 49a040094165a276155e2b4138f3589a358c0927 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 20 Feb 2017 20:57:29 -0700 Subject: [PATCH] Update call_center_active.php --- app/call_center_active/call_center_active.php | 152 ++++++++++-------- 1 file changed, 81 insertions(+), 71 deletions(-) diff --git a/app/call_center_active/call_center_active.php b/app/call_center_active/call_center_active.php index 0e69c68aac..db60b2b6a2 100644 --- a/app/call_center_active/call_center_active.php +++ b/app/call_center_active/call_center_active.php @@ -17,22 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2017 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('call_center_active_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('call_center_active_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -40,79 +44,85 @@ else { //get the queue_name and set it as a variable $queue_name = $_GET[queue_name]; + $queue_name = str_replace(" ", "-", $queue_name); //get the header require_once "resources/header.php"; $document['title'] = $text['title-call_center_queue_activity']; -?> + if (window.addEventListener) { + window.addEventListener('load', requestTime, false); + } + else if (window.attachEvent) { + window.attachEvent('onload', requestTime); + } + + function send_cmd(url) { + if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } + else {// code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + xmlhttp.open("GET",url,false); + xmlhttp.send(null); + //document.getElementById('cmd_response').innerHTML=xmlhttp.responseText; + } + + \n"; -echo "

"; -require_once "resources/footer.php"; +//show the response + echo "
\n"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; + ?>