diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php b/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php index 2ef74618..f8a075f2 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php @@ -39,6 +39,7 @@ # 170409-1559 - Added IP List validation code # 170602-1008 - Added 8am-5pm shift # 170829-0040 - Added screen color settings +# 171012-2015 - Fixed javascript/apache errors with graphs # $startMS = microtime(); @@ -960,6 +961,7 @@ $CSV_text.="\"TOTALS\",\"$FtotDROPS\",\"$FtotDROPSpct%\",\"$FtotDROPSavg\",\"$Ft $graph_count=count($graph_array); $graph_title=_QXZ("CALL STATUS STATS"); include("graphcanvas.inc"); + $HEADER.=$HTML_graph_head; $GRAPH.=$graphCanvas; @@ -1299,6 +1301,7 @@ for ($q=0; $q"; @@ -1487,7 +1490,7 @@ else echo "$HEADER"; require("admin_header.php"); echo "$MAIN"; - echo $JS_text; + if ($report_display_type=="HTML") {echo $JS_text;} } } diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php index 989e7e02..64e54c96 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php @@ -58,6 +58,7 @@ # 170324-0740 - Fix for daylight savings time issue # 170409-1559 - Added IP List validation code # 170829-0040 - Added screen color settings +# 171012-2015 - Fixed javascript/apache errors with graphs # $startMS = microtime(); @@ -1294,6 +1295,7 @@ if ($report_display_type=="HTML") { $graph_count=count($graph_array); $graph_title=_QXZ("QUEUE SECONDS"); include("graphcanvas.inc"); + $HEADER.=$HTML_graph_head; $GRAPH_text.=$graphCanvas."
";
 	$MAIN.=$GRAPH_text;
 	}
@@ -1519,6 +1521,7 @@ if ($report_display_type=="HTML") {
 	$graph_count=count($graph_array);
 	$graph_title="DROP TIME BREAKDOWN IN SECONDS";
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 	$MAIN.=$GRAPH_text;
@@ -1890,6 +1893,7 @@ if ($report_display_type=="HTML") {
 	$graph_count=count($graph_array);
 	$graph_title="CALL ANSWERED TIME BREAKDOWN";
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$MAIN.=$GRAPH_text;
@@ -2038,6 +2042,7 @@ if ($report_display_type=="HTML")
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("HANGUP REASON STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$MAIN.=$GRAPH_text;
@@ -2249,6 +2254,7 @@ $ASCII_text.="+------------------------------------------------------+----------
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL STATUS STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 ########
@@ -2399,6 +2405,7 @@ if ($report_display_type=="HTML")
 
 	$graph_count=count($graph_array);
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 	$MAIN.=$GRAPH_text;
@@ -2625,6 +2632,7 @@ if ($report_display_type=="HTML")
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL INITIAL QUEUE POSITION BREAKDOWN");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 	$MAIN.=$GRAPH_text;
@@ -2801,6 +2809,7 @@ for ($q=0; $q";
 
 	$MAIN.=$GRAPH_text;
@@ -2236,6 +2239,7 @@ if ($report_display_type=="HTML") {
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL ANSWERED TIME BREAKDOWN");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$MAIN.=$GRAPH_text;
@@ -2384,6 +2388,7 @@ if ($report_display_type=="HTML")
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("HANGUP REASON STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$MAIN.=$GRAPH_text;
@@ -2594,6 +2599,7 @@ $ASCII_text.="+------------------------------------------------------+----------
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL STATUS STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 ########
@@ -2744,6 +2750,7 @@ if ($report_display_type=="HTML")
 
 	$graph_count=count($graph_array);
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 	$MAIN.=$GRAPH_text;
@@ -2971,6 +2978,7 @@ if ($report_display_type=="HTML")
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL INITIAL QUEUE POSITION BREAKDOWN");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas."
";
 
 	$MAIN.=$GRAPH_text;
@@ -3148,6 +3156,7 @@ for ($q=0; $q";
 
 
@@ -1086,6 +1088,7 @@ else
 			$graph_count=count($graph_array);
 			$graph_title=_QXZ("Server Summary");
 			include("graphcanvas.inc");
+			$HEADER.=$HTML_graph_head;
 			$GRAPH_text.=$graphCanvas."
";
 
 			$FtotCALLS =	sprintf("%10s", $SVtotCALLS);
@@ -1218,6 +1221,7 @@ else
 		$graph_count=count($graph_array);
 		$graph_title=_QXZ("Date Summary");
 		include("graphcanvas.inc");
+		$HEADER.=$HTML_graph_head;
 		$GRAPH_text.=$graphCanvas."
";
 
 
diff --git a/agc_2-X/trunk/www/vicidial/AST_IVRstats.php b/agc_2-X/trunk/www/vicidial/AST_IVRstats.php
index d706ffa3..12c7b991 100644
--- a/agc_2-X/trunk/www/vicidial/AST_IVRstats.php
+++ b/agc_2-X/trunk/www/vicidial/AST_IVRstats.php
@@ -38,6 +38,7 @@
 # 170227-1712 - Fix for default HTML report format, issue #997
 # 170409-1555 - Added IP List validation code
 # 170829-0040 - Added screen color settings
+# 171012-2015 - Fixed javascript/apache errors with graphs
 #
 
 $startMS = microtime();
@@ -1012,6 +1013,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL STATUS STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$JS_text.="\n";
diff --git a/agc_2-X/trunk/www/vicidial/AST_LISTS_campaign_stats.php b/agc_2-X/trunk/www/vicidial/AST_LISTS_campaign_stats.php
index 37909b7e..12389c3b 100644
--- a/agc_2-X/trunk/www/vicidial/AST_LISTS_campaign_stats.php
+++ b/agc_2-X/trunk/www/vicidial/AST_LISTS_campaign_stats.php
@@ -29,6 +29,7 @@
 # 170227-1719 - Fix for default HTML report format, issue #997
 # 170409-1555 - Added IP List validation code
 # 170829-0040 - Added screen color settings
+# 171012-2015 - Fixed javascript/apache errors with graphs
 #
 
 $startMS = microtime();
@@ -678,6 +679,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("LIST ID SUMMARY");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH.=$graphCanvas;
 
 
@@ -922,6 +924,7 @@ else
 		$graph_count=count($graph_array);
 		$graph_title=_QXZ("STATUS FLAG SUMMARY");
 		include("graphcanvas.inc");
+		$HEADER.=$HTML_graph_head;
 		$GRAPH.=$graphCanvas;
 	# $OUToutput.=$GRAPH;
 
@@ -1046,6 +1049,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CUSTOM STATUS CATEGORY STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH.=$graphCanvas;
 
 	#$OUToutput.=$GRAPH;
@@ -1376,6 +1380,7 @@ else
 		$graph_count=count($graph_array);
 		$graph_title="$LISTIDlists[$i]  - $LISTIDlist_names[$i] ($LISTIDlist_active[$i])";
 		include("graphcanvas.inc");
+		$HEADER.=$HTML_graph_head;
 		$GRAPH.=$graphCanvas;
 
 		# $OUToutput.=$GRAPH;
@@ -1435,7 +1440,7 @@ else
 		echo $HEADER;
 		require("admin_header.php");
 		echo $MAIN;
-		echo $JS_text;
+		if ($report_display_type=="HTML") {echo $JS_text;}
 	}
 
 
diff --git a/agc_2-X/trunk/www/vicidial/AST_LISTS_pass_report.php b/agc_2-X/trunk/www/vicidial/AST_LISTS_pass_report.php
index ee0c3256..8602c936 100644
--- a/agc_2-X/trunk/www/vicidial/AST_LISTS_pass_report.php
+++ b/agc_2-X/trunk/www/vicidial/AST_LISTS_pass_report.php
@@ -19,6 +19,7 @@
 # 170227-1711 - Fix for default HTML report format, issue #997
 # 170409-1555 - Added IP List validation code
 # 170829-0040 - Added screen color settings
+# 171012-2015 - Fixed javascript/apache errors with graphs
 #
 
 $startMS = microtime();
@@ -548,7 +549,7 @@ $MAIN.="
\n\n";
 if (strlen($group[0]) < 1)
 	{
 	$MAIN.="\n\n";
-	$MAIN.=_QXZ("PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT")."\n";
+	$MAIN.=_QXZ("PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT")."\n";
 	}
 
 else
@@ -2044,6 +2045,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("LIST ID SUMMARY");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH2.=$graphCanvas;
 
 	#########
@@ -2124,6 +2126,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("LIST ID SUMMARY 1");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH.=$graphCanvas;
 
 
@@ -2176,7 +2179,7 @@ else
 		echo $HEADER;
 		require("admin_header.php");
 		echo $MAIN;
-		echo $JS_text;
+		if ($report_display_type=="HTML") {echo $JS_text;}
 	}
 
 
diff --git a/agc_2-X/trunk/www/vicidial/AST_OUTBOUNDsummary_interval.php b/agc_2-X/trunk/www/vicidial/AST_OUTBOUNDsummary_interval.php
index 49eefed5..044cd313 100644
--- a/agc_2-X/trunk/www/vicidial/AST_OUTBOUNDsummary_interval.php
+++ b/agc_2-X/trunk/www/vicidial/AST_OUTBOUNDsummary_interval.php
@@ -31,6 +31,7 @@
 # 170227-1709 - Fix for default HTML report format, issue #997
 # 170409-1555 - Added IP List validation code
 # 170829-0040 - Added screen color settings, fixed display bug
+# 171012-2015 - Fixed javascript/apache errors with graphs
 #
 
 $startMS = microtime();
@@ -1522,6 +1523,7 @@ else
 			$graph_count=count($graph_array);
 			$graph_title="$group[$i] - $group_cname[$i] "._QXZ("INTERVAL BREAKDOWN");
 			include("graphcanvas.inc");
+			$HEADER.=$HTML_graph_head;
 			$SUB_HTML_text.=$graphCanvas;
 
 			$i++;
@@ -1676,6 +1678,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("MULTI-CAMPAIGN BREAKDOWN");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	}
@@ -1730,6 +1733,7 @@ else
 			{
 			$MAIN.=$GRAPH_text;
 			$SUBoutput.=$SUB_HTML_text;
+			$SUBoutput.=$JS_text;
 			}
 		else
 			{
@@ -1741,7 +1745,6 @@ else
 		require("admin_header.php");
 		echo "$MAIN";
 		echo "$SUBoutput";
-		echo $JS_text;
 		$ENDtime = date("U");
 		$RUNtime = ($ENDtime - $STARTtime);
 		echo "\n\n"._QXZ("Run Time").": $RUNtime "._QXZ("seconds")."|$db_source\n";
diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
index 187fab6f..5add8c94 100644
--- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
+++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php
@@ -53,6 +53,7 @@
 # 170409-1555 - Added IP List validation code
 # 170629-2080 - Added download option
 # 170829-0040 - Added screen color settings
+# 171012-2015 - Fixed javascript/apache errors with graphs
 #
 
 $startMS = microtime();
@@ -1295,6 +1296,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL HANGUP REASON STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 
@@ -1579,6 +1581,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("CALL STATUS STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 
@@ -1733,6 +1736,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title=_QXZ("LIST ID STATS");
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 
@@ -1915,6 +1919,7 @@ else
 		$graph_count=count($graph_array);
 		$graph_title=_QXZ("AGENT PRESET DIALS");
 		include("graphcanvas.inc");
+		$HEADER.=$HTML_graph_head;
 		$GRAPH_text.=$graphCanvas;
 
 		$TOTPREcalls =	sprintf("%10s", $TOTPREcalls); while(strlen($TOTPREcalls)>10) {$TOTPREcalls = substr("$TOTPREcalls", 0, -1);}
@@ -2056,6 +2061,7 @@ else
 		$graph_count=count($graph_array);
 		$graph_title=_QXZ("CUSTOM STATUS CATEGORY STATS");
 		include("graphcanvas.inc");
+		$HEADER.=$HTML_graph_head;
 		$GRAPH_text.=$graphCanvas;
 
 
@@ -2288,6 +2294,7 @@ else
 	$graph_count=count($graph_array);
 	$graph_title="AGENT STATS";
 	include("graphcanvas.inc");
+	$HEADER.=$HTML_graph_head;
 	$GRAPH_text.=$graphCanvas;
 
 	$GRAPH_text.="
"; diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php index 8d4ea64a..44e56376 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php @@ -31,6 +31,7 @@ # 160225-1625 - Fixed download issue where report was not printing properly # 160714-2348 - Added and tested ChartJS features for more aesthetically appealing graphs # 170409-1542 - Added IP List validation code +# 171012-2015 - Fixed javascript/apache errors with graphs # $startMS = microtime(); @@ -852,6 +853,7 @@ else $graph_count=count($graph_array); $graph_title=_QXZ("LEAD STATS BREAKDOWN"); include("graphcanvas.inc"); + echo $HTML_graph_head; $GRAPH_text.=$graphCanvas; diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php index 079b058d..78baf7ee 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php @@ -60,6 +60,7 @@ # 161110-1830 - Fixed display issue for total averages # 170409-1547 - Added IP List validation code # 170829-0040 - Added screen color settings +# 171012-2015 - Fixed javascript/apache errors with graphs # $startMS = microtime(); @@ -1603,6 +1604,7 @@ for ($q=0; $q\n"; } $graph_count=count($graph_array); $graph_title=_QXZ("CLOSER STATS"); include("graphcanvas.inc"); + $HTML_head.=$HTML_graph_head; $GRAPH_text.=$graphCanvas; } @@ -1425,7 +1429,7 @@ else echo $HTML_head; require("admin_header.php"); echo $HTML_text; - echo $JS_text; + if ($report_display_type=='HTML') {echo $JS_text;} } #$CSV_report=fopen("fcstats.csv", "w"); diff --git a/agc_2-X/trunk/www/vicidial/graphcanvas.inc b/agc_2-X/trunk/www/vicidial/graphcanvas.inc index 7ebae808..f7c01037 100644 --- a/agc_2-X/trunk/www/vicidial/graphcanvas.inc +++ b/agc_2-X/trunk/www/vicidial/graphcanvas.inc @@ -1,4 +1,14 @@ , Joe Johnson LICENSE: AGPLv2 +# +# CHANGES +# +# 160731-1019 - First build +# 171012-2015 - Fixed javascript/apache errors with graphs by removing "echo" lines +# + $graphCanvas="\n\n
"; $graphCanvas.="\n"; $graphCanvas.=" \n"; @@ -81,16 +91,14 @@ var h = Math.floor(d / 3600); var m = Math.floor(d % 3600 / 60); var s = Math.fl $graphCanvas.="\n"; $graphCanvas.="
"._QXZ("$graph_title")."
\n"; $graphCanvas.="
\n\n"; -?> - -\n"; + $allowed_graph="ALL"; $graph_count=1; ?> diff --git a/agc_2-X/trunk/www/vicidial/non_agent_api.php b/agc_2-X/trunk/www/vicidial/non_agent_api.php index 4b2cf5b2..bc3c97d6 100644 --- a/agc_2-X/trunk/www/vicidial/non_agent_api.php +++ b/agc_2-X/trunk/www/vicidial/non_agent_api.php @@ -642,6 +642,7 @@ $REQUEST_URI = preg_replace("/'|\"|\\\\|;/","",$REQUEST_URI); $POST_URI = preg_replace("/'|\"|\\\\|;/","",$POST_URI); if ( (strlen($query_string) < 3) and (strlen($POST_URI) > 2) ) {$query_string = $POST_URI;} +$barge_prefix=''; $MT[0]=''; $api_script = 'non-agent'; @@ -1752,7 +1753,7 @@ if ($function == 'blind_monitor') $monitor_type='LISTEN'; $cid_prefix='BM'; if ( (preg_match('/MONITOR/',$stage)) or (strlen($stage)<1) ) {$stage = '0';} - if (preg_match('/BARGE/',$stage)) {$stage = ''; $monitor_type='BARGE'; $cid_prefix='BB';} + if (preg_match('/BARGE/',$stage)) {$stage = $barge_prefix; $monitor_type='BARGE'; $cid_prefix='BB';} if (preg_match('/HIJACK/',$stage)) {$stage = ''; $monitor_type='HIJACK'; $cid_prefix='BB';} if (preg_match('/WHISPER/',$stage)) { diff --git a/agc_2-X/trunk/www/vicidial/timeclock_report.php b/agc_2-X/trunk/www/vicidial/timeclock_report.php index 3a73cdaa..6599e7c0 100644 --- a/agc_2-X/trunk/www/vicidial/timeclock_report.php +++ b/agc_2-X/trunk/www/vicidial/timeclock_report.php @@ -30,6 +30,7 @@ # 161019-2253 - Added screen colors # 170227-1723 - Fix for default HTML report format, issue #997 # 170409-1555 - Added IP List validation code +# 171012-2015 - Fixed javascript/apache errors with graphs # $startMS = microtime(); @@ -768,6 +769,7 @@ else $graph_count=count($graph_array); $graph_title=_QXZ("USER TIMECLOCK DETAILS"); include("graphcanvas.inc"); + $HEADER.=$HTML_graph_head; $MAIN.=$graphCanvas; $JS_text.="\n";