From dafeb158e1599d9337075ba74646a90753ba14e6 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 22 Jan 2016 19:04:44 +0000 Subject: [PATCH] Added settings-report_default_format and help text for several reports Added agents per server counts to bottom of reports page Standardized formatting on several agent reports Added display of several fields to modify lead page git-svn-id: svn://192.168.202.10@2474 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../trunk/extras/MySQL_AST_CREATE_tables.sql | 5 +- agc_2-X/trunk/extras/upgrade_2.12.sql | 4 + .../www/vicidial/AST_agent_days_detail.php | 65 +++++++++------- .../www/vicidial/AST_agent_days_time.php | 50 +++++++----- .../vicidial/AST_agent_performance_detail.php | 41 +++++----- .../www/vicidial/AST_agent_status_detail.php | 74 +++++++++--------- .../www/vicidial/AST_agent_time_detail.php | 47 ++++++----- .../AST_performance_comparison_report.php | 30 ++++---- .../vicidial/AST_team_performance_detail.php | 18 ++++- .../vicidial/AST_usergroup_login_report.php | 36 +++++++-- agc_2-X/trunk/www/vicidial/admin.php | 56 +++++++++----- .../trunk/www/vicidial/admin_modify_lead.php | 6 +- agc_2-X/trunk/www/vicidial/help.php | 77 ++++++++++++++++++- 13 files changed, 335 insertions(+), 174 deletions(-) diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 92f61e1f..34729dc6 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -1641,7 +1641,8 @@ custom_reports_use_slave_db VARCHAR(2000) default '', usacan_phone_dialcode_fix ENUM('0','1') default '0', cache_carrier_stats_realtime ENUM('0','1') default '0', oldest_logs_date DATETIME, -log_recording_access ENUM('0', '1') default '0' +log_recording_access ENUM('0', '1') default '0', +report_default_format ENUM('TEXT', 'HTML') default 'TEXT' ) ENGINE=MyISAM; CREATE TABLE vicidial_campaigns_list_mix ( @@ -3712,4 +3713,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version'; UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1451',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1452',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/agc_2-X/trunk/extras/upgrade_2.12.sql b/agc_2-X/trunk/extras/upgrade_2.12.sql index ab69a15a..ea99df25 100644 --- a/agc_2-X/trunk/extras/upgrade_2.12.sql +++ b/agc_2-X/trunk/extras/upgrade_2.12.sql @@ -508,3 +508,7 @@ ALTER TABLE vicidial_users ADD access_recordings ENUM('0', '1') default '0'; ALTER TABLE system_settings ADD log_recording_access ENUM('0', '1') default '0'; UPDATE system_settings SET db_schema_version='1451',db_schema_update_date=NOW() where db_schema_version < 1451; + +ALTER TABLE system_settings ADD report_default_format ENUM('TEXT', 'HTML') default 'TEXT'; + +UPDATE system_settings SET db_schema_version='1452',db_schema_update_date=NOW() where db_schema_version < 1452; 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 42a5f94e..22772b94 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 @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2016 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -27,6 +27,7 @@ # 141230-1526 - Added code for on-the-fly language translations display # 150516-1307 - Fixed Javascript element problem, Issue #857 # 151227-1718 - Added option to search archive records instead of main +# 160121-2216 - Added report title header, default report format, cleaned up formatting # $startMS = microtime(); @@ -57,7 +58,7 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];} elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];} +if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];} elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];} if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];} elseif (isset($_POST["search_archived_data"])) {$search_archived_data=$_POST["search_archived_data"];} @@ -71,7 +72,7 @@ $JS_onload="onload = function() {\n"; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;"; +$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,report_default_format FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); @@ -84,9 +85,11 @@ if ($qm_conf_ct > 0) $reports_use_slave_db = $row[3]; $SSenable_languages = $row[4]; $SSlanguage_method = $row[5]; + $SSreport_default_format = $row[6]; } ##### END SETTINGS LOOKUP ##### ########################################### +if (strlen($report_display_type)<2) {$report_display_type = $SSreport_default_format;} ### ARCHIVED DATA CHECK CONFIGURATION $archives_available="N"; @@ -368,7 +371,10 @@ if (strlen($customer_interactive_statuses)>0) #$customer_interactive_statuses = '|NI|DNC|CALLBK|AP|SALE|COMP|HAP1|HAP2|HBED|DIED|'; #$customer_interactive_statuses = '|NI|DNC|CALLBK|XFER|C2|B7|B8|C1|'; -$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date&shift=$shift&DB=$DB&user=$user$groupQS&search_archived_data=$search_archived_data"; +$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date&shift=$shift&DB=$DB&user=$user$groupQS&search_archived_data=$search_archived_data&report_display_type=$report_display_type"; + +$NWB = "   \"HELP\""; if ($file_download < 1) { @@ -400,15 +406,15 @@ if ($file_download < 1) require("admin_header.php"); echo "\n"; - $ASCII_text.="\n"; - $ASCII_text.="
\n";
-	$GRAPH_text.="
\n";
+	echo "\n";
+	echo ""._QXZ("$report_name")." $NWB#single_agent_daily$NWE\n";
+	echo "
";
 	}
 
 if (strlen($group[0]) < 1)
 	{
-	echo "\n";
-	echo _QXZ("PLEASE SELECT A USER AND DATE-TIME ABOVE AND CLICK SUBMIT")."\n";
+	echo "";
+	echo _QXZ("PLEASE SELECT A USER AND DATE-TIME BELOW AND CLICK SUBMIT")."\n";
 	echo " "._QXZ("NOTE: stats taken from shift specified")."\n";
 	}
 
@@ -438,16 +444,14 @@ else
 
 	if ($file_download < 1)
 		{
-		$ASCII_text.=_QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME\n";
+		$ASCII_text.=_QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME ($db_source)\n";
 		$ASCII_text.=_QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
-		$ASCII_text.="---------- "._QXZ("AGENT Details")." -------------\n\n";
-		$GRAPH_text.=_QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME\n";
+		$GRAPH_text.=_QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME ($db_source)\n";
 		$GRAPH_text.=_QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
-		$GRAPH_text.="---------- "._QXZ("AGENT Details")." -------------\n";
 		}
 	else
 		{
-		$file_output .= _QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME\n";
+		$file_output .= _QXZ("Agent Days Status Report",24).": $user                     $NOW_TIME ($db_source)\n";
 		$file_output .= _QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
 		}
 
@@ -861,23 +865,17 @@ $JS_onload.="}\n";
 if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
 $JS_text.="\n";
 
-if ($report_display_type=="HTML")
-	{
-	echo $JS_text;
-	echo $GRAPH_text;
-	}
-else
-	{
-	echo $ASCII_text;
-	}
-
-echo "
\n"; -echo "
"._QXZ("Dates").":
"; +echo ""; +echo "
"._QXZ("Dates").":
"; echo "\n"; echo ""; ?> \n"; -if ($report_display_type=="HTML") - { - echo $GRAPH.$GRAPH2.$GRAPH3; - echo $JS_text; - } -else - { - echo $ASCII_text; - } - -$NWB = "   \"HELP\""; - -echo "\n"; -echo "
Dates:
"; +echo ""; +echo "
Dates:
"; echo "\n"; echo ""; @@ -1090,26 +1081,37 @@ echo "Display as:
"; echo "\n

"; -echo "$NWB#agent_status_detail$NWE\n"; echo "

"; -echo ""._QXZ("Search archived data")."

\n"; -echo ""._QXZ("Show defunct users")."
\n"; +echo ""._QXZ("Search archived data")."
\n"; +echo ""._QXZ("Show defunct users")."

\n"; +echo "       \n"; echo "
        "; echo "          \n"; echo " DOWNLOAD | \n"; -echo " REPORTS \n"; +echo " REPORTS "; echo "\n"; echo "
"; -echo "\n\n
$db_source"; +echo ""; + +if ($report_display_type=="HTML") + { + echo $GRAPH.$GRAPH2.$GRAPH3; + echo $JS_text; + } +else + { + echo $ASCII_text; + } + echo "\n"; if (!$report_display_type || $report_display_type=="TEXT") { echo "\n"; - echo "
\n\n\n\n\n\n\n\n\n\n";
+	echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
 
 	$m=0;
 	while ($m < $k)
diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php
index 409859d3..2eebbe16 100644
--- a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php
+++ b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php
@@ -4,7 +4,7 @@
 # Pulls time stats per agent selectable by campaign or user group
 # should be most accurate agent stats of all of the reports
 #
-# Copyright (C) 2015  Matt Florell     LICENSE: AGPLv2
+# Copyright (C) 2016  Matt Florell     LICENSE: AGPLv2
 #
 # CHANGES
 # 90522-0723 - First build
@@ -45,6 +45,7 @@
 # 150529-1921 - Sub statuses are now sorted in alphabetical order
 # 151110-1612 - Changed download function to always export time with hours
 # 151112-1335 - Added option to search archived tables
+# 160121-2037 - Added report title header, default report format, cleaned up formatting
 #
 
 $startMS = microtime();
@@ -143,7 +144,7 @@ if ($time_in_sec)
 
 #############################################
 ##### START SYSTEM_SETTINGS LOOKUP #####
-$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
+$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,report_default_format FROM system_settings;";
 $rslt=mysql_to_mysqli($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $qm_conf_ct = mysqli_num_rows($rslt);
@@ -156,9 +157,11 @@ if ($qm_conf_ct > 0)
 	$reports_use_slave_db =			$row[3];
 	$SSenable_languages =			$row[4];
 	$SSlanguage_method =			$row[5];
+	$SSreport_default_format =		$row[6];
 	}
 ##### END SETTINGS LOOKUP #####
 ###########################################
+if (strlen($report_display_type)<2) {$report_display_type = $SSreport_default_format;}
 
 if ($non_latin < 1)
 	{
@@ -171,6 +174,7 @@ else
 	$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
 	}
 
+
 $stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
 if ($DB) {echo "|$stmt|\n";}
 $rslt=mysql_to_mysqli($stmt, $link);
@@ -444,7 +448,10 @@ while ($i < $statha_to_print)
 	$i++;
 	}
 
-$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&show_parks=$show_parks&time_in_sec=$time_in_sec&search_archived_data=$search_archived_data&DB=$DB";
+$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&show_parks=$show_parks&time_in_sec=$time_in_sec&search_archived_data=$search_archived_data&report_display_type=$report_display_type&DB=$DB";
+
+$NWB = "   \"HELP\"";
 
 if ($file_download < 1)
 	{
@@ -476,14 +483,15 @@ if ($file_download < 1)
 	require("admin_header.php");
 
 	echo "\n";
-	echo "\n";
-	echo "
\n";
+	echo "\n";
+	echo ""._QXZ("$report_name")." $NWB#agent_time_detail$NWE\n";
+	echo "
";
 	}
 
 if ( (strlen($group[0]) < 1) or (strlen($user_group[0]) < 1) )
 	{
-	echo "\n";
-	echo _QXZ("PLEASE SELECT A CAMPAIGN OR USER GROUP AND DATE-TIME ABOVE AND CLICK SUBMIT")."\n";
+#	echo "\n";
+	echo _QXZ("PLEASE SELECT A CAMPAIGN OR USER GROUP AND DATE-TIME BELOW AND CLICK SUBMIT")."\n";
 	echo _QXZ(" NOTE: stats taken from shift specified")."\n";
 	}
 
@@ -528,16 +536,16 @@ else
 
 	if ($file_download < 1)
 		{
-		$ASCII_text.="\n"._QXZ("Agent Time Detail",40)." $NOW_TIME\n";
+		$ASCII_text.=""._QXZ("$report_name",40)." $NOW_TIME ($db_source)\n";
 		$ASCII_text.=_QXZ("Time range").": $query_date_BEGIN to $query_date_END\n\n";
 
-		$GRAPH.=_QXZ("Agent Time Detail",40)." $NOW_TIME\n";
-		$GRAPH.="Time range: $query_date_BEGIN to $query_date_END\n\n";
+		$GRAPH.=_QXZ("$report_name",40)." $NOW_TIME\n";
+		$GRAPH.=_QXZ("Time range").": $query_date_BEGIN to $query_date_END\n\n";
 		}
 	else
 		{
-		$file_output .= _QXZ("Agent Time Detail",40)." $NOW_TIME\n";
-		$file_output .= "Time range: $query_date_BEGIN to $query_date_END\n\n";
+		$file_output .= _QXZ("$report_name",40)." $NOW_TIME\n";
+		$file_output .= _QXZ("Time range").": $query_date_BEGIN to $query_date_END\n\n";
 		}
 
 
@@ -1449,9 +1457,6 @@ if ($file_download > 0)
 	exit;
 	}
 
-$NWB = "   \"HELP\"";
-
 ############################################################################
 ##### BEGIN HTML form section
 ############################################################################
@@ -1459,8 +1464,8 @@ $JS_onload.="}\n";
 if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
 $JS_text.="\n";
 
-echo "
\n"; -echo "
"._QXZ("Dates").":
"; +echo ""; +echo "
"._QXZ("Dates").":
"; echo "\n"; echo ""; @@ -1544,7 +1549,7 @@ echo "
"._QXZ("Display as").":
"; echo "\n

"; -echo "$NWB#agent_time_detail$NWE\n"; +echo "\n"; echo "
        "; echo "          \n"; @@ -1553,7 +1558,7 @@ echo " "._QXZ("REPORTS")." \n"; echo "\n"; echo "
"; -echo "\n\n
$db_source"; +echo ""; ############################################################################ ##### END HTML form section ############################################################################ @@ -1576,8 +1581,8 @@ echo "$RUNtime\n"; ##### BEGIN horizontal yellow transparent bar graph overlay on top of agent stats echo "\n"; -echo "\n"; -echo "
\n\n\n\n\n\n\n\n";
+echo "\n";
+echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
 
 if ($stage == 'NAME') {$k=0;}
 $m=0;
diff --git a/agc_2-X/trunk/www/vicidial/AST_performance_comparison_report.php b/agc_2-X/trunk/www/vicidial/AST_performance_comparison_report.php
index bc74c030..f385f49b 100644
--- a/agc_2-X/trunk/www/vicidial/AST_performance_comparison_report.php
+++ b/agc_2-X/trunk/www/vicidial/AST_performance_comparison_report.php
@@ -1,7 +1,7 @@
 , Joe Johnson , Joe Johnson  0)
 	$reports_use_slave_db =			$row[3];
 	$SSenable_languages =			$row[4];
 	$SSlanguage_method =			$row[5];
+	$SSreport_default_format =		$row[6];
 	}
 ##### END SETTINGS LOOKUP #####
 ###########################################
+if (strlen($report_display_type)<2) {$report_display_type = $SSreport_default_format;}
 
 ### ARCHIVED DATA CHECK CONFIGURATION
 $archives_available="N";
@@ -425,7 +428,7 @@ else
 
 if ($DB) {$HTML_text.="$user_group_string|$user_group_ct|$user_groupQS|$i
";} -$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&DB=$DB&show_percentages=$show_percentages&search_archived_data=$search_archived_data"; +$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&DB=$DB&show_percentages=$show_percentages&search_archived_data=$search_archived_data&report_display_type=$report_display_type"; $NWB = "   \"HELP\""; @@ -453,10 +456,11 @@ $HTML_head.=""._QXZ("$report_name")." $NWB#performance_comparison_report$NWE\n"; $HTML_text.="
\n"; -$HTML_text.="
"._QXZ("date").":
"; +$HTML_text.="
"._QXZ("Date").":
"; $HTML_text.="\n"; $HTML_text.=""; @@ -560,15 +564,15 @@ $HTML_text.=" "._QXZ("REPORTS")." $HTML_text.="\n"; $HTML_text.="
"; -$HTML_text.="\n\n"; +$HTML_text.="\n"; -$HTML_text.="
\n";
+$HTML_text.="
";
 
 
 if (!$group)
 	{
-	$HTML_text.="\n";
+#	$HTML_text.="\n";
 	$HTML_text.=_QXZ("PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT")."\n";
 	$HTML_text.=" "._QXZ("NOTE: stats taken from shift specified")."\n";
 	}
@@ -601,8 +605,6 @@ else
 
 
 
-	$ASCII_text="---------- "._QXZ("PERFORMANCE Details")." -------------\n";
-
 	$HTML_text.=_QXZ("Agent Performance Comparison",50)." $NOW_TIME\n";
 	$HTML_text.=""._QXZ("Starting date",15,"r").": $query_date                         ["._QXZ("DOWNLOAD")."]\n\n";
 
@@ -704,7 +706,7 @@ else
 				{
 				$agent_performance_array[$row[3]][($array_offset+1)]+=$row[0]; # SALES FOR TIME RANGE
 				}
-			$agent_performance_array[$row[3]][($array_offset+4)]+=($row[4]+$row[1]+$row[6]+$row[5]+$row[8]); # TIME - pause, talk, disp, wait, dead
+			$agent_performance_array[$row[3]][($array_offset+4)]+=($row[4]+$row[1]+$row[6]+$row[5]); # TIME - pause, talk, disp, wait
 			$i++;
 			}
 
diff --git a/agc_2-X/trunk/www/vicidial/AST_team_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_team_performance_detail.php
index df7ba4e9..aeaaddd9 100644
--- a/agc_2-X/trunk/www/vicidial/AST_team_performance_detail.php
+++ b/agc_2-X/trunk/www/vicidial/AST_team_performance_detail.php
@@ -6,7 +6,7 @@
 # QC statuses of QCFAIL, QCCANC and sales are defined by the Sale=Y status
 # flags being set on those statuses.
 #
-# Copyright (C) 2015  Joe Johnson, Matt Florell     LICENSE: AGPLv2
+# Copyright (C) 2016  Joe Johnson, Matt Florell     LICENSE: AGPLv2
 #
 # CHANGES
 #
@@ -25,6 +25,7 @@
 # 141230-1424 - Added code for on-the-fly language translations display
 # 150516-1315 - Fixed Javascript element problem, Issue #857
 # 151219-0139 - Added option for searching archived data
+# 160121-2214 - Added report title header, default report format, cleaned up formatting
 #
 
 $startMS = microtime();
@@ -68,7 +69,7 @@ $JS_onload="onload = function() {\n";
 
 #############################################
 ##### START SYSTEM_SETTINGS LOOKUP #####
-$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
+$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,report_default_format FROM system_settings;";
 $rslt=mysql_to_mysqli($stmt, $link);
 if ($DB) {$HTML_text.="$stmt\n";}
 $qm_conf_ct = mysqli_num_rows($rslt);
@@ -81,9 +82,11 @@ if ($qm_conf_ct > 0)
 	$reports_use_slave_db =			$row[3];
 	$SSenable_languages =			$row[4];
 	$SSlanguage_method =			$row[5];
+	$SSreport_default_format =		$row[6];
 	}
 ##### END SETTINGS LOOKUP #####
 ###########################################
+if (strlen($report_display_type)<2) {$report_display_type = $SSreport_default_format;}
 
 ### ARCHIVED DATA CHECK CONFIGURATION
 $archives_available="N";
@@ -439,6 +442,8 @@ else
 ######################################
 if ($DB) {$HTML_text.="$user_group_string|$user_group_ct|$user_groupQS|$i
";} +$NWB = "   \"HELP\""; ########################### @@ -463,10 +468,11 @@ $HTML_head.="\n"; $HTML_head.="\n"; $HTML_head.=""._QXZ("$report_name")."$group_S\n"; -$HTML_text.="
"; +$HTML_text.="
"; +$HTML_text.=""._QXZ("$report_name")." $NWB#team_performance_detail$NWE\n"; $HTML_text.="
\n"; -$HTML_text.="
"; +$HTML_text.="
"; $HTML_text.="\n"; $HTML_text.="\n"; $HTML_text.="Date Range:
\n"; @@ -476,6 +482,10 @@ $HTML_text.="\n $HTML_text.=""; $HTML_text.="\n"; $HTML_head.="\n"; $HTML_head.=""._QXZ("$report_name")."\n"; -$HTML_text.="
"; +$HTML_text.="
"; +$HTML_text.=""._QXZ("$report_name")." $NWB#usergroup_login$NWE\n"; $HTML_text.="\n"; -$HTML_text.="\n"; + echo "\n"; + echo "\n"; echo ""; - echo "\n"; + echo "\n"; } else { echo ""; - echo "\n"; + echo "\n"; } $o=0; @@ -35898,6 +35905,16 @@ if ($ADD==999999) $reset_time = ($row[1] + 90); $Sdb_time = ($row[2] + 10); } + $agnt=0; + $stmt="SELECT count(*) from vicidial_live_agents where server_ip='$server_ip[$o]';"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $agnt_to_print = mysqli_num_rows($rslt); + if ($agnt_to_print) + { + $row=mysqli_fetch_row($rslt); + $agnt = $row[0]; + } $server_bgcolor=''; $FROZEN_output=''; if ($web_u_time > $u_time) @@ -35933,13 +35950,14 @@ if ($ADD==999999) } } echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; if ($stage == 'TIME') { $stmt="SELECT svn_revision from servers where server_ip='$server_ip[$o]';"; @@ -35957,13 +35975,13 @@ if ($ADD==999999) { if ( (preg_match("/Real-Time Main Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; } else { - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; } } echo "\n"; @@ -35973,7 +35991,7 @@ if ($ADD==999999) if ($stage == 'TIME') { - echo ""; + echo ""; $stmt="SELECT NOW();"; $rslt=mysql_to_mysqli($stmt, $link); @@ -35982,7 +36000,7 @@ if ($ADD==999999) if ($dbtime_to_print) { $row=mysqli_fetch_row($rslt); - echo ""; + echo ""; } } echo "
 
"; +$HTML_text.="
 
"; $HTML_text.="\n"; $HTML_text.="\n"; $HTML_text.="
"._QXZ("Teams/User Groups").":
"; @@ -355,11 +367,21 @@ $HTML_text.=""._QXZ("REPORTS")." \n"; $HTML_text.="\n"; $HTML_text.="
"; -$HTML_text.="
\n\n";
+$HTML_text.="
\n";
+
+	if ($file_download < 1)
+		{
+		$ASCII_text.=_QXZ("Usergroup Login Report",24).": $user                     $NOW_TIME ($db_source)\n";
+		$GRAPH_text.=_QXZ("Usergroup Login Report Report",24).": $user                     $NOW_TIME ($db_source)\n";
+		}
+	else
+		{
+		$CSV_text .= _QXZ("Usergroup Login Report Report",24).": $user                     $NOW_TIME ($db_source)\n";
+		}
 
 if ($SUBMIT) 
 	{
-	$ASCII_text="+--------------------------------+----------+----------------------+---------------------+---------------------+----------+-----------------+-----------------+----------------------+--------------+-----------------+-----------------+-----------------+\n";
+	$ASCII_text.="+--------------------------------+----------+----------------------+---------------------+---------------------+----------+-----------------+-----------------+----------------------+--------------+-----------------+-----------------+-----------------+\n";
 	$ASCII_text.="| "._QXZ("USER NAME",30)." | "._QXZ("ID",8)." | "._QXZ("USER GROUP",20)." | "._QXZ("FIRST LOGIN DATE",19)." | "._QXZ("LAST LOGIN DATE",19)." | "._QXZ("CAMPAIGN",8)." | "._QXZ("SERVER IP",15)." | "._QXZ("COMPUTER IP",15)." | "._QXZ("EXTENSION",20)." | "._QXZ("BROWSER",12)." | "._QXZ("PHONE LOGIN",15)." | "._QXZ("SERVER PHONE",15)." | "._QXZ("PHONE IP",15)." |\n";
 	$ASCII_text.="+--------------------------------+----------+----------------------+---------------------+---------------------+----------+-----------------+-----------------+----------------------+--------------+-----------------+-----------------+-----------------+\n";
 
@@ -413,7 +435,7 @@ else
 #	if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
 #	$JS_text.="\n";
 
-	if ($report_display_type=="HTML")
+	if ($report_display_type=="HTMLOFF")
 		{
 		$HTML_text.=$GRAPH_text;
 		}
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index 791fcc4e..c1791c01 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -2032,6 +2032,8 @@ if (isset($_GET["on_hook_cid_number"]))				{$on_hook_cid_number=$_GET["on_hook_c
 	elseif (isset($_POST["on_hook_cid_number"]))	{$on_hook_cid_number=$_POST["on_hook_cid_number"];}
 if (isset($_GET["manual_dial_hopper_check"]))			{$manual_dial_hopper_check=$_GET["manual_dial_hopper_check"];}
 	elseif (isset($_POST["manual_dial_hopper_check"]))	{$manual_dial_hopper_check=$_POST["manual_dial_hopper_check"];}
+if (isset($_GET["report_default_format"]))			{$report_default_format=$_GET["report_default_format"];}
+	elseif (isset($_POST["report_default_format"]))	{$report_default_format=$_POST["report_default_format"];}
 
 
 if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2591,6 +2593,7 @@ if ($non_latin < 1)
 	$status_display_ingroup = preg_replace('/[^0-9a-zA-Z]/','',$status_display_ingroup);
 	$populate_lead_ingroup = preg_replace('/[^0-9a-zA-Z]/','',$populate_lead_ingroup);
 	$nva_new_status = preg_replace('/[^0-9a-zA-Z]/','',$nva_new_status);
+	$report_default_format = preg_replace('/[^0-9a-zA-Z]/','',$report_default_format);
 
 	### DIGITS and Dots
 	$server_ip = preg_replace('/[^\.0-9]/','',$server_ip);
@@ -3701,12 +3704,13 @@ else
 # 160108-2211 - Added manual_dial_hopper_check campaign option
 # 160111-0626 - Fixed SQL issues with making changes, Issue #913
 # 160116-1439 - Added options/permissions for accessing recordings and logging the access time
+# 160122-1401 - Added report_default_format system setting, added agent count per server on reports page
 #
 
 # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
 
-$admin_version = '2.12-537a';
-$build = '160116-1439';
+$admin_version = '2.12-538a';
+$build = '160122-1401';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -15581,7 +15585,7 @@ if ($ADD==411111111111111)
 			$custom_reports_slave_SQL=",custom_reports_use_slave_db='$custom_reports_slave_SQL'";
 			}
 
-		$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access'$custom_dialplanSQL;";
+		$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format'$custom_dialplanSQL;";
 		$rslt=mysql_to_mysqli($stmt, $link);
 
 		if ( ($meetme_enter_login_filename != $SSmeetme_enter_login_filename) or ($meetme_enter_leave3way_filename != $SSmeetme_enter_leave3way_filename) )
@@ -31881,7 +31885,7 @@ if ($ADD==311111111111111)
 			$ALLagent_count =		$rowx[2];
 			}
 
-		$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access from system_settings;";
+		$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format from system_settings;";
 		$rslt=mysql_to_mysqli($stmt, $link);
 		$row=mysqli_fetch_row($rslt);
 		$version =						$row[0];
@@ -32025,6 +32029,7 @@ if ($ADD==311111111111111)
 		$cache_carrier_stats_realtime = $row[138];
 		$oldest_logs_date =				$row[139];
 		$log_recording_access =			$row[140];
+		$report_default_format =		$row[141];
 
 		if ($pass_hash_enabled > 0) {$pass_hash_enabled = 'ENABLED';}
 		else {$pass_hash_enabled = 'DISABLED';}
@@ -32305,6 +32310,8 @@ if ($ADD==311111111111111)
 
 		echo "
"._QXZ("Default Server Password").": $NWB#settings-default_server_password$NWE     "._QXZ("Strength").":
"._QXZ("Report Default Format").": $NWB#settings-report_default_format$NWE
"._QXZ("Slave Database Server").": $NWB#settings-slave_db_server$NWE
"._QXZ("Reports to use Slave DB").":
"._QXZ("SERVER")." -"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("DISK").""._QXZ("TIME").""._QXZ("VER")."
"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("AGNT").""._QXZ("DISK").""._QXZ("TIME").""._QXZ("VER")."
"._QXZ("SERVER")." +"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("DISK").""._QXZ("OUTBOUND").""._QXZ("INBOUND")."
"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("AGNT").""._QXZ("DISK").""._QXZ("OUTBOUND").""._QXZ("INBOUND")."
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]$sysload[$o] - $cpu%$channels_total[$o]$disk$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]$sysload[$o] - $cpu%$channels_total[$o]$agnt$disk"._QXZ("LINK").""._QXZ("LINK").""._QXZ("LINK").""._QXZ("LINK")."        
  "._QXZ("PHP Time")."   " . date("Y-m-d H:i:s") . "  
  "._QXZ("PHP Time")."   " . date("Y-m-d H:i:s") . "  
  "._QXZ("DB Time")."   $row[0]  
  "._QXZ("DB Time")."   $row[0]  
\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php index 90e7701d..70b47ffb 100644 --- a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php +++ b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php @@ -75,6 +75,7 @@ # 150923-0700 - Fixed security issues with user access, issue #894 # 160102-1238 - Fixed issues with special characters, added $htmlconvert option # 160112-2344 - Added link to direct to recording logging page, access log display +# 160122-1337 - Added display of gmt-offset, last-local-call and called-since-last-reset # require("dbconnect_mysqli.php"); @@ -1160,6 +1161,7 @@ else $vendor_id = $row[5]; $list_id = $row[7]; $gmt_offset_now = $row[8]; + $called_since_last_reset = $row[9]; $phone_code = $row[10]; $phone_number = $row[11]; $title = $row[12]; @@ -1230,8 +1232,8 @@ else echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; if ($archive_search=="Yes") { echo "
"._QXZ("Lead ID").": $lead_id     "._QXZ("List ID").": $list_id
"._QXZ("Fronter").": $tsr     "._QXZ("Called Count").": $called_count
"._QXZ("Lead ID").": $lead_id     "._QXZ("List ID").": $list_id     "._QXZ("GMT offset").": $gmt_offset_now     "._QXZ("CSLR").": $called_since_last_reset
"._QXZ("Fronter").": $tsr     "._QXZ("Called Count").": $called_count     "._QXZ("Last Local Call").": $last_local_call_time
"; diff --git a/agc_2-X/trunk/www/vicidial/help.php b/agc_2-X/trunk/www/vicidial/help.php index 965e6e77..75f763c9 100644 --- a/agc_2-X/trunk/www/vicidial/help.php +++ b/agc_2-X/trunk/www/vicidial/help.php @@ -79,6 +79,7 @@ # 160106-1348 - Added inbound_groups-on_hook_cid_number entry # 160108-2217 - Added campaigns-manual_dial_hopper_check entry # 160116-1512 - Added access_recording and log_recording_access entries +# 160121-2155 - Added settings-report_default_format entry and help text for several reports # @@ -5063,6 +5064,11 @@ FR_SPAC 00 00 00 00 00 - - +
+ +
+ - +

@@ -5565,7 +5571,7 @@ if ($SSqc_features_active > 0) TALK = Time the agent talks to a customer or is in dead state (DEAD + CUSTOMER)."); ?>
DISPO = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc)."); ?>
PAUSE = Time the agent is in pause mode (LOGIN + LAGGED + ...)."); ?>
-DEAD = Time the agent is in a call where the customer has hung up."); ?>
+DEAD = Time the agent is in a call after the customer has hung up."); ?>
CUSTOMER = Time the agent is in a live call with a customer."); ?>

LOGIN = The pause code when going from login directly to pause."); ?>
@@ -5584,7 +5590,7 @@ if ($SSqc_features_active > 0)

-
-
+
CALLS = Total number of calls sent to the user."); ?>
TIME = Total time of these (PAUSE + WAIT + TALK + DISPO)."); ?>
PAUSE = Amount of time being paused in related to call handling."); ?>
@@ -5592,7 +5598,7 @@ if ($SSqc_features_active > 0) WAIT = Time the agent waits for a call."); ?>
TALK = Time the agent talks to a customer or is in dead state (DEAD + CUSTOMER)."); ?>
DISPO = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc)."); ?>
-DEAD = Time the agent is in a call where the customer has hung up."); ?>
+DEAD = Time the agent is in a call after the customer has hung up."); ?>
CUSTOMER = Time the agent is in a live call with a customer."); ?>
System Statuses."); ?>

@@ -5605,6 +5611,71 @@ if ($SSqc_features_active > 0) ANDIAL = This pause code triggers if the agent been on dispo screen for longer than 1000 seconds."); ?>

+
+
+ -
+CALLS = Total number of calls sent to the user."); ?>
+LEADS = Total number of unique leads the user handled."); ?>
+CONTACTS = Total number of calls the user handled that were statused in a Customer Contact status."); ?>
+CONTACT RATIO = Percent of calls where a customer was contacted."); ?>
+NONPAUSE = Everything except pause (WAIT + TALK + DISPO)."); ?>
+TIME = Total time of these (PAUSE + WAIT + TALK + DISPO)."); ?>
+TALK = Time the agent talks to a customer minus DEAD time."); ?>
+SALES = Total number of calls the user handled that were statused in a Sales status."); ?>
+SALES PER WORKING HOUR = Total number of sales divided by system time."); ?>
+SALES TO LEADS RATIO = Total number of sales divided by leads handled."); ?>
+SALES TO CONTACTS RATIO = Total number of sales divided by contacts."); ?>
+SALES PER HOUR = Total number of sales divided by talk time."); ?>
+INCOMPLETE SALES = Total number of calls statused as QCFAIL."); ?>
+CANCELLED SALES = Total number of calls statused as QCCANC."); ?>
+CALLBACKS = Total number of active or live callbacks for this user in the system."); ?>
+FIRST CALL RESOLUTION = Total number of calls handled divided by leads handled."); ?>
+AVERAGE SALE TIME = Total number of sales divided by the talk time for those sales calls."); ?>
+AVERAGE CONTACT TIME = Total number of contacts divided by the talk time for those contact calls."); ?>
+ +
+
+ -
+CALLS = Total number of calls sent to the user."); ?>
+SALES = Total number of calls the user handled that were statused in a Sales status."); ?>
+SALES CONVERSION PCT = Total number of sales divided by calls handled."); ?>
+SALES PER HOUR = Total number of sales divided by system time."); ?>
+TIME = Total time of these (PAUSE + WAIT + TALK + DISPO)."); ?>
+ +
+
+ -
+CALLS = Total number of calls sent to the user."); ?>
+CI CALLS = Total number of calls the user handled that were statused in a Customer Contact status."); ?>
+DNC CI PCT = Total number of DNC statused calls divided by the number of Customer Contact calls."); ?>
+SALES PER HOUR = Total number of sales divided by system time."); ?>
+
+ +
+
+ -
+PAUSE = Amount of time for the agent being paused."); ?>
+WAIT = Time the agent waits for a call."); ?>
+TALK = Time the agent talks to a customer or is in dead state (DEAD + CUSTOMER)."); ?>
+DISPO = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc)."); ?>
+DEAD = Time the agent is in a call after the customer has hung up."); ?>
+CUSTOMER = Time the agent is in a live call with a customer."); ?>
+TOTAL = Total time of these (PAUSE + WAIT + TALK + DISPO)."); ?>
+ +
+
+ -
+FIRST LOGIN DATE = The earliest date this user logged in to the agent screen."); ?>
+LAST LOGIN DATE = The most recent date this user logged in to the agent screen."); ?>
+CAMPAIGN = The most recent campaign this user was logged in to."); ?>
+SERVER IP = The most recent server this user logged in to."); ?>
+COMPUTER IP = The most recent computer this user used to log in to the agent screen."); ?>
+EXTENSION = The most recent phone this user used to log in to the agent screen."); ?>
+BROWSER = The most recent web browser version this user used to log in to the agent screen."); ?>
+PHONE LOGIN = The most recent phone login this user used to log in to the agent screen."); ?>
+SERVER PHONE = The most recent server phone account this user was logged in through."); ?>
+PHONE IP = The IP address of the phone during the most recent agent screen session."); ?>
+