From ae5a93167e263d310ab799bc956ba7a61a2af6bb Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 24 Jan 2013 22:24:46 +0000 Subject: [PATCH] Added Inbound Email Report and link Also added Status Display LEADID options(issue #639) git-svn-id: svn://192.168.202.10@1924 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../trunk/www/vicidial/AST_CLOSERstats.php | 220 ++++++++++++------ agc_2-X/trunk/www/vicidial/admin.php | 11 +- 2 files changed, 161 insertions(+), 70 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php index a44702ae..4db468b4 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2013 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -36,6 +36,7 @@ # 111103-2003 - Added user_group restrictions for selecting in-groups # 120224-0910 - Added HTML display option with bar graphs # 120730-0724 - Small fix for HTML output +# 130124-1719 - Added email report support # require("dbconnect.php"); @@ -58,6 +59,8 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} if (isset($_GET["DID"])) {$DID=$_GET["DID"];} elseif (isset($_POST["DID"])) {$DID=$_POST["DID"];} +if (isset($_GET["EMAIL"])) {$EMAIL=$_GET["EMAIL"];} + elseif (isset($_POST["EMAIL"])) {$EMAIL=$_POST["EMAIL"];} if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];} @@ -186,9 +189,16 @@ if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} if (!isset($end_date)) {$end_date = $NOW_DATE;} -$stmt="select group_id,group_name,8 from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;"; +$stmt="select group_id,group_name,8 from vicidial_inbound_groups where group_handling='PHONE' $LOGadmin_viewable_groupsSQL order by group_id;"; if ($DID=='Y') - {$stmt="select did_pattern,did_description,did_id from vicidial_inbound_dids $whereLOGadmin_viewable_groupsSQL order by did_pattern;";} + { + $stmt="select did_pattern,did_description,did_id from vicidial_inbound_dids $whereLOGadmin_viewable_groupsSQL order by did_pattern;"; + } +if ($EMAIL=='Y') + { + $stmt="select email_account_id,email_account_name,email_account_id from vicidial_email_accounts $whereLOGadmin_viewable_groupsSQL order by email_account_id;"; + $stmt="select group_id,group_name,8 from vicidial_inbound_groups where group_handling='EMAIL' $LOGadmin_viewable_groupsSQL order by group_id;"; + } $rslt=mysql_query($stmt, $link); if ($DB) {$MAIN.="$stmt\n";} $groups_to_print = mysql_num_rows($rslt); @@ -287,6 +297,7 @@ $MAIN.="
\n"; $MAIN.="\n"; +$MAIN.="\n"; $MAIN.="Date Range:
\n"; $MAIN.=""; @@ -315,7 +326,9 @@ $MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n"; $MAIN.="\n"; $MAIN.="\n"; -if ($DID=='Y') +if ($EMAIL=='Y') + {$MAIN.="Email Accts: \n";} +else if ($DID=='Y') {$MAIN.="Inbound DIDs: \n";} else {$MAIN.="Inbound Groups: \n";} @@ -373,6 +386,8 @@ $MAIN.="
\n\n";
 if ($groups_to_print < 1)
 	{
 	$MAIN.="\n\n";
+	if ($EMAIL=='Y')
+		{$MAIN.="PLEASE SELECT AN EMAIL ACCOUNT AND DATE RANGE ABOVE AND CLICK SUBMIT\n";}
 	if ($DID=='Y')
 		{$MAIN.="PLEASE SELECT A DID AND DATE RANGE ABOVE AND CLICK SUBMIT\n";}
 	else
@@ -403,12 +418,18 @@ if ($shift == 'ALL')
 $query_date_BEGIN = "$query_date $time_BEGIN";   
 $query_date_END = "$end_date $time_END";
 
+if ($EMAIL=='Y') 
+	{
+	$MAIN.="Inbound Email Stats: $group_string          $NOW_TIME        DOWNLOAD\n";
+	$CSV_text1.="\"Inbound Call Stats:\",\"$group_string\",\"$NOW_TIME\"\n";
+	}
+else
+	{
+	$MAIN.="Inbound Call Stats: $group_string          $NOW_TIME        DOWNLOAD\n";
+	$CSV_text1.="\"Inbound Call Stats:\",\"$group_string\",\"$NOW_TIME\"\n";
+	}
 
 
-$MAIN.="Inbound Call Stats: $group_string          $NOW_TIME        DOWNLOAD\n";
-
-$CSV_text1.="\"Inbound Call Stats:\",\"$group_string\",\"$NOW_TIME\"\n";
-
 
 if ($DID=='Y')
 	{
@@ -453,7 +474,14 @@ if ($group_ct > 1)
 
 	$CSV_text1.="\n\"MULTI-GROUP BREAKDOWN:\"\n";
 
-	if ($DID=='Y')
+	if ($EMAIL=='Y')
+		{
+		$ASCII_text.="+----------------------+---------+---------+---------+---------+\n";
+		$ASCII_text.="| EMAIL                | EMAILS  | DROPS   | DROP %  | IVR     |\n";
+		$ASCII_text.="+----------------------+---------+---------+---------+---------+\n";
+		$CSV_text1.="\"EMAIL\",\"CALLS\",\"DROPS\",\"DROP %\",\"IVR\"\n";
+		}
+	else if ($DID=='Y')
 		{
 		$ASCII_text.="+----------------------+---------+---------+---------+---------+\n";
 		$ASCII_text.="| DID                  | CALLS   | DROPS   | DROP %  | IVR     |\n";
@@ -656,18 +684,34 @@ else
 	$average_answer_seconds =	sprintf("%10s", $average_answer_seconds);
 	}
 
+if ($EMAIL=='Y')
+	{
+	$MAIN.="Total Emails taken in to this In-Group:        $TOTALcalls\n";
+	$MAIN.="Average Email Length for all Emails:            $average_call_seconds seconds\n";
+	$MAIN.="Answered Emails:                               $ANSWEREDcalls  $ANSWEREDpercent%\n";
+	$MAIN.="Average queue time for Answered Emails:        $average_answer_seconds seconds\n";
+	$MAIN.="Emails taken into the IVR for this In-Group:   $IVRcalls\n";
 
-$MAIN.="Total calls taken in to this In-Group:        $TOTALcalls\n";
-$MAIN.="Average Call Length for all Calls:            $average_call_seconds seconds\n";
-$MAIN.="Answered Calls:                               $ANSWEREDcalls  $ANSWEREDpercent%\n";
-$MAIN.="Average queue time for Answered Calls:        $average_answer_seconds seconds\n";
-$MAIN.="Calls taken into the IVR for this In-Group:   $IVRcalls\n";
+	$CSV_text1.="\"Total Emails taken in to this In-Group:\",\"$TOTALcalls\"\n";
+	$CSV_text1.="\"Average Email Length for all Emails:\",\"$average_call_seconds seconds\"\n";
+	$CSV_text1.="\"Answered Emails:\",\"$ANSWEREDcalls\",\"$ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"Average queue time for Answered Emails:\",\"$average_answer_seconds seconds\"\n";
+	$CSV_text1.="\"Emails taken into the IVR for this In-Group:\",\"$IVRcalls\"\n";
+	}
+else
+	{
+	$MAIN.="Total calls taken in to this In-Group:        $TOTALcalls\n";
+	$MAIN.="Average Call Length for all Calls:            $average_call_seconds seconds\n";
+	$MAIN.="Answered Calls:                               $ANSWEREDcalls  $ANSWEREDpercent%\n";
+	$MAIN.="Average queue time for Answered Calls:        $average_answer_seconds seconds\n";
+	$MAIN.="Calls taken into the IVR for this In-Group:   $IVRcalls\n";
 
-$CSV_text1.="\"Total calls taken in to this In-Group:\",\"$TOTALcalls\"\n";
-$CSV_text1.="\"Average Call Length for all Calls:\",\"$average_call_seconds seconds\"\n";
-$CSV_text1.="\"Answered Calls:\",\"$ANSWEREDcalls\",\"$ANSWEREDpercent%\"\n";
-$CSV_text1.="\"Average queue time for Answered Calls:\",\"$average_answer_seconds seconds\"\n";
-$CSV_text1.="\"Calls taken into the IVR for this In-Group:\",\"$IVRcalls\"\n";
+	$CSV_text1.="\"Total calls taken in to this In-Group:\",\"$TOTALcalls\"\n";
+	$CSV_text1.="\"Average Call Length for all Calls:\",\"$average_call_seconds seconds\"\n";
+	$CSV_text1.="\"Answered Calls:\",\"$ANSWEREDcalls\",\"$ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"Average queue time for Answered Calls:\",\"$average_answer_seconds seconds\"\n";
+	$CSV_text1.="\"Calls taken into the IVR for this In-Group:\",\"$IVRcalls\"\n";
+	}
 
 $MAIN.="\n";
 $MAIN.="---------- DROPS\n";
@@ -710,12 +754,22 @@ else
 	$DROP_ANSWEREDpercent = round($DROP_ANSWEREDpercent, 0);
 	}
 
-$MAIN.="Total DROP Calls:                             $DROPcalls  $DROPpercent%               drop/answered: $DROP_ANSWEREDpercent%\n";
-$MAIN.="Average hold time for DROP Calls:             $average_hold_seconds seconds\n";
+if ($EMAIL=='Y')
+	{
+	$MAIN.="Total DROP Emails:                             $DROPcalls  $DROPpercent%               drop/answered: $DROP_ANSWEREDpercent%\n";
+	$MAIN.="Average hold time for DROP Emails:             $average_hold_seconds seconds\n";
 
-$CSV_text1.="\"Total DROP Calls:\",\"$DROPcalls\",\"$DROPpercent%\",\"drop/answered:\",\"$DROP_ANSWEREDpercent%\"\n";
-$CSV_text1.="\"Average hold time for DROP Calls:\",\"$average_hold_seconds seconds\"\n";
+	$CSV_text1.="\"Total DROP Emails:\",\"$DROPcalls\",\"$DROPpercent%\",\"drop/answered:\",\"$DROP_ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"Average hold time for DROP Emails:\",\"$average_hold_seconds seconds\"\n";
+	}
+else
+	{
+	$MAIN.="Total DROP Calls:                             $DROPcalls  $DROPpercent%               drop/answered: $DROP_ANSWEREDpercent%\n";
+	$MAIN.="Average hold time for DROP Calls:             $average_hold_seconds seconds\n";
 
+	$CSV_text1.="\"Total DROP Calls:\",\"$DROPcalls\",\"$DROPpercent%\",\"drop/answered:\",\"$DROP_ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"Average hold time for DROP Calls:\",\"$average_hold_seconds seconds\"\n";
+	}
 
 if (strlen($group_SQL)>3)
 	{
@@ -751,14 +805,29 @@ if (strlen($group_SQL)>3)
 			}
 		}
 	}
-$MAIN.="\n";
-$MAIN.="---------- CUSTOM INDICATORS\n";
-$MAIN.="GDE (Answered/Total calls taken in to this In-Group):  $ANSWEREDpercent%\n";
-$MAIN.="ACR (Dropped/Answered):                                $DROP_ANSWEREDpercent%\n";
 
-$CSV_text1.="\n\"CUSTOM INDICATORS\"\n";
-$CSV_text1.="\"GDE (Answered/Total calls taken in to this In-Group):\",\"$ANSWEREDpercent%\"\n";
-$CSV_text1.="\"ACR (Dropped/Answered):\",\"$DROP_ANSWEREDpercent%\"\n";
+if ($EMAIL=='Y')
+	{
+	$MAIN.="\n";
+	$MAIN.="---------- CUSTOM INDICATORS\n";
+	$MAIN.="GDE (Answered/Total emails taken in to this In-Group):  $ANSWEREDpercent%\n";
+	$MAIN.="ACR (Dropped/Answered):                                $DROP_ANSWEREDpercent%\n";
+
+	$CSV_text1.="\n\"CUSTOM INDICATORS\"\n";
+	$CSV_text1.="\"GDE (Answered/Total emails taken in to this In-Group):\",\"$ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"ACR (Dropped/Answered):\",\"$DROP_ANSWEREDpercent%\"\n";
+	}
+else
+	{
+	$MAIN.="\n";
+	$MAIN.="---------- CUSTOM INDICATORS\n";
+	$MAIN.="GDE (Answered/Total calls taken in to this In-Group):  $ANSWEREDpercent%\n";
+	$MAIN.="ACR (Dropped/Answered):                                $DROP_ANSWEREDpercent%\n";
+
+	$CSV_text1.="\n\"CUSTOM INDICATORS\"\n";
+	$CSV_text1.="\"GDE (Answered/Total calls taken in to this In-Group):\",\"$ANSWEREDpercent%\"\n";
+	$CSV_text1.="\"ACR (Dropped/Answered):\",\"$DROP_ANSWEREDpercent%\"\n";
+	}
 
 if ($DID!='Y')
 	{
@@ -849,15 +918,34 @@ else
 	$average_total_queue_seconds = sprintf("%10.2f", $average_total_queue_seconds);
 	}
 
-$MAIN.="Total Calls That entered Queue:               $QUEUEcalls  $QUEUEpercent%\n";
-$MAIN.="Average QUEUE Length for queue calls:         $average_queue_seconds seconds\n";
-$MAIN.="Average QUEUE Length across all calls:        $average_total_queue_seconds seconds\n";
+if ($EMAIL=='Y')
+	{
+	$MAIN.="Total Emails That entered Queue:               $QUEUEcalls  $QUEUEpercent%\n";
+	$MAIN.="Average QUEUE Length for queue emails:         $average_queue_seconds seconds\n";
+	$MAIN.="Average QUEUE Length across all emails:        $average_total_queue_seconds seconds\n";
 
-$CSV_text1.="\"Total Calls That entered Queue:\",\"$QUEUEcalls\",\"$QUEUEpercent%\"\n";
-$CSV_text1.="\"Average QUEUE Length for queue calls:\",\"$average_queue_seconds seconds\"\n";
-$CSV_text1.="\"Average QUEUE Length across all calls:\",\"$average_total_queue_seconds seconds\"\n";
+	$CSV_text1.="\"Total Emails That entered Queue:\",\"$QUEUEcalls\",\"$QUEUEpercent%\"\n";
+	$CSV_text1.="\"Average QUEUE Length for queue emails:\",\"$average_queue_seconds seconds\"\n";
+	$CSV_text1.="\"Average QUEUE Length across all emails:\",\"$average_total_queue_seconds seconds\"\n";
+	}
+else 
+	{
+	$MAIN.="Total Calls That entered Queue:               $QUEUEcalls  $QUEUEpercent%\n";
+	$MAIN.="Average QUEUE Length for queue calls:         $average_queue_seconds seconds\n";
+	$MAIN.="Average QUEUE Length across all calls:        $average_total_queue_seconds seconds\n";
 
+	$CSV_text1.="\"Total Calls That entered Queue:\",\"$QUEUEcalls\",\"$QUEUEpercent%\"\n";
+	$CSV_text1.="\"Average QUEUE Length for queue calls:\",\"$average_queue_seconds seconds\"\n";
+	$CSV_text1.="\"Average QUEUE Length across all calls:\",\"$average_total_queue_seconds seconds\"\n";
+	}
 
+if ($EMAIL=='Y') {
+	$rpt_type_verbiage='EMAIL';
+	$rpt_type_verbiages='EMAILS';
+} else {
+	$rpt_type_verbiage='CALL ';
+	$rpt_type_verbiages='CALLS ';
+}
 
 ##############################
 #########  CALL HOLD TIME BREAKDOWN IN SECONDS
@@ -865,12 +953,12 @@ $CSV_text1.="\"Average QUEUE Length across all calls:\",\"$average_total_queue_s
 $TOTALcalls = 0;
 
 $ASCII_text="\n";
-$ASCII_text.="---------- CALL HOLD TIME BREAKDOWN IN SECONDS       DOWNLOAD\n";
+$ASCII_text.="---------- $rpt_type_verbiage HOLD TIME BREAKDOWN IN SECONDS       DOWNLOAD\n";
 $ASCII_text.="+-------------------------------------------------------------------------------------------+------------+\n";
 $ASCII_text.="|     0     5    10    15    20    25    30    35    40    45    50    55    60    90   +90 | TOTAL      |\n";
 $ASCII_text.="+-------------------------------------------------------------------------------------------+------------+\n";
 
-$CSV_text2.="\n\"CALL HOLD TIME BREAKDOWN IN SECONDS\"\n";
+$CSV_text2.="\n\"$rpt_type_verbiage HOLD TIME BREAKDOWN IN SECONDS\"\n";
 $CSV_text2.="\"\",\"0\",\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"45\",\"50\",\"55\",\"60\",\"90\",\"+90\",\"TOTAL\"\n";
 
 
@@ -1010,12 +1098,12 @@ else
 $BDdropCALLS = 0;
 
 $ASCII_text="\n";
-$ASCII_text.="---------- CALL DROP TIME BREAKDOWN IN SECONDS\n";
+$ASCII_text.="---------- $rpt_type_verbiage DROP TIME BREAKDOWN IN SECONDS\n";
 $ASCII_text.="+-------------------------------------------------------------------------------------------+------------+\n";
 $ASCII_text.="|     0     5    10    15    20    25    30    35    40    45    50    55    60    90   +90 | TOTAL      |\n";
 $ASCII_text.="+-------------------------------------------------------------------------------------------+------------+\n";
 
-$CSV_text2.="\n\"CALL DROP TIME BREAKDOWN IN SECONDS\"\n";
+$CSV_text2.="\n\"$rpt_type_verbiage DROP TIME BREAKDOWN IN SECONDS\"\n";
 $CSV_text2.="\"\",\"0\",\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"45\",\"50\",\"55\",\"60\",\"90\",\"+90\",\"TOTAL\"\n";
 
 $stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and  campaign_id IN($group_SQL) and status IN('DROP','XDROP') group by queue_seconds;";
@@ -1155,12 +1243,12 @@ else
 $BDansweredCALLS = 0;
 
 $ASCII_text="\n";
-$ASCII_text.="           CALL ANSWERED TIME AND PERCENT BREAKDOWN IN SECONDS\n";
+$ASCII_text.="           $rpt_type_verbiage ANSWERED TIME AND PERCENT BREAKDOWN IN SECONDS\n";
 $ASCII_text.="          +-------------------------------------------------------------------------------------------+------------+\n";
 $ASCII_text.="          |     0     5    10    15    20    25    30    35    40    45    50    55    60    90   +90 | TOTAL      |\n";
 $ASCII_text.="----------+-------------------------------------------------------------------------------------------+------------+\n";
 
-$CSV_text2.="\n\"CALL ANSWERED TIME AND PERCENT BREAKDOWN IN SECONDS\"\n";
+$CSV_text2.="\n\"$rpt_type_verbiage ANSWERED TIME AND PERCENT BREAKDOWN IN SECONDS\"\n";
 $CSV_text2.="\"\",\"0\",\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"45\",\"50\",\"55\",\"60\",\"90\",\"+90\",\"TOTAL\"\n";
 
 $stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and  campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL') group by queue_seconds;";
@@ -1443,13 +1531,13 @@ else
 $TOTALcalls = 0;
 
 $ASCII_text="\n";
-$ASCII_text.="---------- CALL HANGUP REASON STATS       DOWNLOAD\n";
+$ASCII_text.="---------- $rpt_type_verbiage HANGUP REASON STATS       DOWNLOAD\n";
 $ASCII_text.="+----------------------+------------+\n";
-$ASCII_text.="| HANGUP REASON        | CALLS      |\n";
+$ASCII_text.="| HANGUP REASON        | $rpt_type_verbiages      |\n";
 $ASCII_text.="+----------------------+------------+\n";
 
-$CSV_text3.="\n\"CALL HANGUP REASON STATS\"\n";
-$CSV_text3.="\"HANGUP REASON\",\"CALLS\"\n";
+$CSV_text3.="\n\"$rpt_type_verbiage HANGUP REASON STATS\"\n";
+$CSV_text3.="\"HANGUP REASON\",\"$rpt_type_verbiages\"\n";
 
 $stmt="select count(*),term_reason from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and  campaign_id IN($group_SQL) group by term_reason order by term_reason;";
 if ($DID=='Y')
@@ -1497,11 +1585,11 @@ if ($report_display_type=="HTML")
 		$i++;
 	}
 	$GRAPH_text="
\n"; - $GRAPH_text.="\n"; - $GRAPH_text.=" \n"; + $GRAPH_text.="
CALL HANGUP REASON STATS
\n"; + $GRAPH_text.=" \n"; $GRAPH_text.=" \n"; $GRAPH_text.=" \n"; - $GRAPH_text.=" \n"; + $GRAPH_text.=" \n"; $GRAPH_text.=" \n"; for ($i=0; $iTOTAL CALLS:\n"; + $GRAPH_text.=" \n"; $GRAPH_text.=" \n"; $GRAPH_text.=" \n"; $GRAPH_text.="
$rpt_type_verbiage HANGUP REASON STATS
REASON CALLS $rpt_type_verbiages
TOTAL ".$rpt_type_verbiage.":".trim($TOTALcalls)."
\n"; @@ -1529,17 +1617,17 @@ else $TOTALcalls = 0; $ASCII_text="\n"; -$ASCII_text.="---------- CALL STATUS STATS DOWNLOAD\n"; -$ASCII_text.="+--------+----------------------+----------------------+------------+------------+----------+----------+\n"; -$ASCII_text.="| STATUS | DESCRIPTION | CATEGORY | CALLS | TOTAL TIME | AVG TIME |CALLS/HOUR|\n"; -$ASCII_text.="+--------+----------------------+----------------------+------------+------------+----------+----------+\n"; +$ASCII_text.="---------- $rpt_type_verbiage STATUS STATS DOWNLOAD\n"; +$ASCII_text.="+--------+----------------------+----------------------+------------+------------+----------+-----------+\n"; +$ASCII_text.="| STATUS | DESCRIPTION | CATEGORY | $rpt_type_verbiages | TOTAL TIME | AVG TIME |$rpt_type_verbiages/HOUR|\n"; +$ASCII_text.="+--------+----------------------+----------------------+------------+------------+----------+-----------+\n"; $GRAPH="

"; $GRAPH.=""; $GRAPH.="
CALLSTOTAL TIMEAVG TIMECALLS/HR

 


"; -$CSV_text4.="\n\"CALL STATUS STATS\"\n"; -$CSV_text4.="\"STATUS\",\"DESCRIPTION\",\"CATEGORY\",\"CALLS\",\"TOTAL TIME\",\"AVG TIME\",\"CALLS/HOUR\"\n"; +$CSV_text4.="\n\"$rpt_type_verbiage STATUS STATS\"\n"; +$CSV_text4.="\"STATUS\",\"DESCRIPTION\",\"CATEGORY\",\"$rpt_type_verbiages\",\"TOTAL TIME\",\"AVG TIME\",\"$rpt_type_verbiages/HOUR\"\n"; @@ -1712,11 +1800,11 @@ else $ASCII_text="\n"; $ASCII_text.="---------- CUSTOM STATUS CATEGORY STATS
DOWNLOAD\n"; $ASCII_text.="+----------------------+------------+--------------------------------+\n"; -$ASCII_text.="| CATEGORY | CALLS | DESCRIPTION |\n"; +$ASCII_text.="| CATEGORY | $rpt_type_verbiages | DESCRIPTION |\n"; $ASCII_text.="+----------------------+------------+--------------------------------+\n"; $CSV_text5.="\n\"CUSTOM STATUS CATEGORY STATS\"\n"; -$CSV_text5.="\"CATEGORY\",\"CALLS\",\"DESCRIPTION\"\n"; +$CSV_text5.="\"CATEGORY\",\"$rpt_type_verbiages\",\"DESCRIPTION\"\n"; $TOTCATcalls=0; $r=0; @@ -1796,12 +1884,12 @@ else $TOTALcalls = 0; $ASCII_text="\n"; -$ASCII_text.="---------- CALL INITIAL QUEUE POSITION BREAKDOWN DOWNLOAD\n"; +$ASCII_text.="---------- $rpt_type_verbiage INITIAL QUEUE POSITION BREAKDOWN DOWNLOAD\n"; $ASCII_text.="+-------------------------------------------------------------------------------------+------------+\n"; $ASCII_text.="| 1 2 3 4 5 6 7 8 9 10 15 20 25 +25 | TOTAL |\n"; $ASCII_text.="+-------------------------------------------------------------------------------------+------------+\n"; -$CSV_text6.="\n\"CALL INITIAL QUEUE POSITION BREAKDOWN\"\n"; +$CSV_text6.="\n\"$rpt_type_verbiage INITIAL QUEUE POSITION BREAKDOWN\"\n"; $CSV_text6.="\"\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"15\",\"20\",\"25\",\"+25\",\"TOTAL\"\n"; @@ -1940,11 +2028,11 @@ $TOTavg=0; $ASCII_text="\n"; $ASCII_text.="---------- AGENT STATS DOWNLOAD\n"; $ASCII_text.="+--------------------------+------------+------------+--------+\n"; -$ASCII_text.="| AGENT | CALLS | TIME H:M:S |AVERAGE |\n"; +$ASCII_text.="| AGENT | $rpt_type_verbiages | TIME H:M:S |AVERAGE |\n"; $ASCII_text.="+--------------------------+------------+------------+--------+\n"; $CSV_text7.="\n\"AGENT STATS\"\n"; -$CSV_text7.="\"AGENT\",\"CALLS\",\"TIME H:M:S\",\"AVERAGE\"\n"; +$CSV_text7.="\"AGENT\",\"$rpt_type_verbiages\",\"TIME H:M:S\",\"AVERAGE\"\n"; $max_calls=1; @@ -1955,7 +2043,7 @@ $GRAPH="

CALLS"; $GRAPH.="
TIME H:M:SAVERAGE

 


"; $graph_header=""; -$CALLS_graph=$graph_header.""; +$CALLS_graph=$graph_header.""; $TIMEHMS_graph=$graph_header.""; $AVERAGE_graph=$graph_header.""; @@ -2175,7 +2263,7 @@ else } $ASCII_text.="\n"; -$ASCII_text.="GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS TAKEN INTO THIS IN-GROUP\n"; +$ASCII_text.="GRAPH IN 15 MINUTE INCREMENTS OF TOTAL $rpt_type_verbiages TAKEN INTO THIS IN-GROUP\n"; $k=1; @@ -2349,12 +2437,12 @@ else ##### Answered wait time breakdown $MAIN.="\n"; -$MAIN.="---------- CALL ANSWERED TIME BREAKDOWN IN SECONDS DOWNLOAD\n"; +$MAIN.="---------- $rpt_type_verbiage ANSWERED TIME BREAKDOWN IN SECONDS DOWNLOAD\n"; $MAIN.="+------+-------------------------------------------------------------------------------------------+------------+\n"; $MAIN.="| HOUR | 0 5 10 15 20 25 30 35 40 45 50 55 60 90 +90 | TOTAL |\n"; $MAIN.="+------+-------------------------------------------------------------------------------------------+------------+\n"; -$CSV_text8.="\n\"CALL ANSWERED TIME BREAKDOWN IN SECONDS\"\n"; +$CSV_text8.="\n\"$rpt_type_verbiage ANSWERED TIME BREAKDOWN IN SECONDS\"\n"; $CSV_text8.="\"HOUR\",\"0\",\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"45\",\"50\",\"55\",\"60\",\"90\",\"+90\",\"TOTAL\"\n"; $ZZ = '00'; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 89f04bc4..a868a88b 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -109,7 +109,7 @@ $QUERY_STRING = getenv("QUERY_STRING"); $Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs'; -$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report , Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs'; +$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound Email Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report , Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs'; $Vtables = 'NONE,log_noanswer,did_agent_log,contact_information'; @@ -3219,12 +3219,13 @@ else # 121212-1529 - Standardization of list_id fields at 19 digits in forms # 121222-2146 - Added new email features # 130102-1135 - Small change to admin log viewing for email accounts +# 130124-1721 - Added Inbound Email report link, added Status Display LEADID options(issue #639) # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.6-392a'; -$build = '130102-1135'; +$admin_version = '2.6-393a'; +$build = '130124-1721'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -22545,7 +22546,7 @@ if ($ADD==31) else {$ASLlink = "$PHP_SELF?ADD=381111111111&label_id=$screen_labels";} echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -34701,6 +34702,8 @@ if ($ADD==999999) {echo "
  • Inbound Report\n";} if ( ( (preg_match("/Inbound Report/",$LOGallowed_reports)) and (preg_match("/Inbound DID Report/",$LOGallowed_reports)) ) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • Inbound Report by DID\n";} + if ( ( (preg_match("/Inbound Report/",$LOGallowed_reports)) and (preg_match("/Inbound Email Report/",$LOGallowed_reports)) ) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) + {echo "
  • Inbound Email Report\n";} if ( (preg_match("/Inbound Service Level Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • Inbound Service Level Report\n";} if ( (preg_match("/Inbound Summary Hourly Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
  • AGENT STATS
    AGENTCALLS
    $rpt_type_verbiages
    TIME H:M:S
    AVERAGE
    Agent Screen Labels: $NWB#vicidial_campaigns-screen_labels$NWE
    Status Display Fields: $NWB#vicidial_campaigns-status_display_fields$NWE
    Status Display Fields: $NWB#vicidial_campaigns-status_display_fields$NWE
    Agent Display Queue Count: $NWB#vicidial_campaigns-display_queue_count$NWE