diff --git a/UPGRADE b/UPGRADE
index c18a8867..3189ec73 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -417,6 +417,9 @@ OTHER CHANGES:
the campaign modification screen. Also includes called and not called
counts.
+96. Added rewritten AJAX/Javascript driven real-time report, able to support
+ webphones.
+
diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
index c4c91e5a..c9638753 100644
--- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
+++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
@@ -492,6 +492,8 @@ Phone Extension||
This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones: IAX2/IAXphone1@IAXphone1 would be IAXphone1. For Zap and Dahdi attached channelbank or FXS phones make sure you put the full channel number without the prefix: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol field below correctly for your type of phone||
STATUSES WITHIN THE ACTIVE LISTS FOR THIS CAMPAIGN||
SHOW LEAD STATUSES IN THIS CAMPAIGN||
+RELOAD NOW||
+refresh||
AST_LISTS_campaign_stats.php
diff --git a/www/vicidial/AST_timeonVDADall.php b/www/vicidial/AST_timeonVDADall.php
index de37e469..1f910c93 100644
--- a/www/vicidial/AST_timeonVDADall.php
+++ b/www/vicidial/AST_timeonVDADall.php
@@ -70,10 +70,11 @@
# 100914-1326 - Added lookup for user_level 7 users to set to reports only which will remove other admin links
# 101024-0832 - Added Agent time stats option and agents-in-dispo counter
# 101109-1448 - Added Auto Hopper Level display (MikeC)
+# 101216-1358 - Added functions to work with new realtime_report.php script
#
-$version = '2.4-61';
-$build = '101109-1448';
+$version = '2.4-62';
+$build = '101216-1358';
header ("Content-type: text/html; charset=utf-8");
@@ -139,6 +140,13 @@ if (isset($_GET["PRESETstats"])) {$PRESETstats=$_GET["PRESETstats"];}
elseif (isset($_POST["PRESETstats"])) {$PRESETstats=$_POST["PRESETstats"];}
if (isset($_GET["AGENTtimeSTATS"])) {$AGENTtimeSTATS=$_GET["AGENTtimeSTATS"];}
elseif (isset($_POST["AGENTtimeSTATS"])) {$AGENTtimeSTATS=$_POST["AGENTtimeSTATS"];}
+if (isset($_GET["RTajax"])) {$RTajax=$_GET["RTajax"];}
+ elseif (isset($_POST["RTajax"])) {$RTajax=$_POST["RTajax"];}
+if (isset($_GET["RTuser"])) {$RTuser=$_GET["RTuser"];}
+ elseif (isset($_POST["RTuser"])) {$RTuser=$_POST["RTuser"];}
+if (isset($_GET["RTpass"])) {$RTpass=$_GET["RTpass"];}
+ elseif (isset($_POST["RTpass"])) {$RTpass=$_POST["RTpass"];}
+
$report_name = 'Real-Time Main Report';
$db_source = 'M';
@@ -258,7 +266,6 @@ $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
$epochTWENTYFOURhoursAGO = ($STARTtime - 86400);
$timeTWENTYFOURhoursAGO = date("Y-m-d H:i:s",$epochTWENTYFOURhoursAGO);
-
$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
@@ -559,283 +566,302 @@ $open_list = "
<
-
-
-\n";
+ // function to display in-groups selected for a specific agent
+ function ingroup_info(agent_user,count)
+ {
+ var cursorheight = (document.REALTIMEform.cursorY.value - 0);
+ var newheight = (cursorheight + 10);
+ document.getElementById("agent_ingroup_display").style.top = newheight;
+ // alert(session_id + "|" + server_ip + "|" + monitor_phone + "|" + stage + "|" + user);
+ var xmlhttp=false;
+ /*@cc_on @*/
+ /*@if (@_jscript_version >= 5)
+ // JScript gives us Conditional compilation, we can cope with old IE versions.
+ // and security blocked creation of the objects.
+ try {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ try {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch (E) {
+ xmlhttp = false;
+ }
+ }
+ @end @*/
+ if (!xmlhttp && typeof XMLHttpRequest!='undefined')
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ if (xmlhttp)
+ {
+ var monitorQuery = "source=realtime&function=agent_ingroup_info&stage=change&user=" + user + "&pass=" + pass + "&agent_user=" + agent_user;
+ xmlhttp.open('POST', 'non_agent_api.php');
+ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
+ xmlhttp.send(monitorQuery);
+ xmlhttp.onreadystatechange = function()
+ {
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
+ {
+ // alert(xmlhttp.responseText);
+ var Xoutput = null;
+ Xoutput = xmlhttp.responseText;
+ var regXFerr = new RegExp("ERROR","g");
+ if (Xoutput.match(regXFerr))
+ {alert(xmlhttp.responseText);}
+ else
+ {
+ document.getElementById("agent_ingroup_display").visibility = "visible";
+ document.getElementById("agent_ingroup_display").innerHTML = Xoutput;
+ }
+ }
+ }
+ delete xmlhttp;
+ }
+ }
+
+ // function to display in-groups selected for a specific agent
+ function hide_ingroup_info()
+ {
+ document.getElementById("agent_ingroup_display").visibility = "hidden";
+ document.getElementById("agent_ingroup_display").innerHTML = '';
+ }
+
+
+
+
+
+ \n";
+
+ echo "\n";
+ echo"\n";
+ echo "$report_name: $group\n";
+
+ $short_header=1;
+
+ require("admin_header.php");
+
+ }
$stmt = "select count(*) from vicidial_campaigns where active='Y' and campaign_allow_inbound='Y' $group_SQLand;";
$rslt=mysql_query($stmt, $link);
@@ -843,60 +869,55 @@ $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$campaign_allow_inbound = $row[0];
-echo "\n";
-echo"\n";
-echo "$report_name: $group\n";
- $short_header=1;
-
- require("admin_header.php");
-
-echo "
";
-
-echo "
";
+ }
?>
-
-
diff --git a/www/vicidial/admin_search_lead.php b/www/vicidial/admin_search_lead.php
index ddd4ad6b..eb213542 100644
--- a/www/vicidial/admin_search_lead.php
+++ b/www/vicidial/admin_search_lead.php
@@ -207,7 +207,7 @@ if ( (!$vendor_id) and (!$phone) and (!$lead_id) and (!$log_phone) and (!$log_
echo "