From f7722788368dba4c7e32efa777150957c56b9912 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 11 Apr 2014 18:44:11 +0000 Subject: [PATCH] Added the Performance Comparison Report git-svn-id: svn://192.168.202.10@2101 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 2 + .../AST_performance_comparison_report.php | 927 ++++++++++++++++++ www/vicidial/admin.php | 11 +- 3 files changed, 936 insertions(+), 4 deletions(-) create mode 100644 www/vicidial/AST_performance_comparison_report.php diff --git a/UPGRADE b/UPGRADE index d166828f..252fb545 100644 --- a/UPGRADE +++ b/UPGRADE @@ -201,6 +201,8 @@ OTHER CHANGES: direct a call to a specific system DID instead of only going to the Filter Action. +38. Added Performance Comparison Report + diff --git a/www/vicidial/AST_performance_comparison_report.php b/www/vicidial/AST_performance_comparison_report.php new file mode 100644 index 00000000..baf74b7f --- /dev/null +++ b/www/vicidial/AST_performance_comparison_report.php @@ -0,0 +1,927 @@ +, Joe Johnson 0) + { + $row=mysqli_fetch_row($rslt); + $non_latin = $row[0]; + $outbound_autodial_active = $row[1]; + $slave_db_server = $row[2]; + $reports_use_slave_db = $row[3]; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) + { + $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER); + $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW); + } +else + { + $PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW); + $PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER); + } + +$auth=0; +$reports_auth=0; +$admin_auth=0; +$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1); +if ($auth_message == 'GOOD') + {$auth=1;} + +if ($auth > 0) + { + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $admin_auth=$row[0]; + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $reports_auth=$row[0]; + + if ($reports_auth < 1) + { + $VDdisplayMESSAGE = "You are not allowed to view reports"; + Header ("Content-type: text/html; charset=utf-8"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; + exit; + } + if ( ($reports_auth > 0) and ($admin_auth < 1) ) + { + $ADD=999999; + $reports_only_user=1; + } + } +else + { + $VDdisplayMESSAGE = "Login incorrect, please try again"; + if ($auth_message == 'LOCK') + { + $VDdisplayMESSAGE = "Too many login attempts, try again in 15 minutes"; + Header ("Content-type: text/html; charset=utf-8"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; + exit; + } + Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n"; + exit; + } + +##### BEGIN log visit to the vicidial_report_log table ##### +$LOGip = getenv("REMOTE_ADDR"); +$LOGbrowser = getenv("HTTP_USER_AGENT"); +$LOGscript_name = getenv("SCRIPT_NAME"); +$LOGserver_name = getenv("SERVER_NAME"); +$LOGserver_port = getenv("SERVER_PORT"); +$LOGrequest_uri = getenv("REQUEST_URI"); +$LOGhttp_referer = getenv("HTTP_REFERER"); +if (preg_match("/443/i",$LOGserver_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} +if (($LOGserver_port == '80') or ($LOGserver_port == '443') ) {$LOGserver_port='';} +else {$LOGserver_port = ":$LOGserver_port";} +$LOGfull_url = "$HTTPprotocol$LOGserver_name$LOGserver_port$LOGrequest_uri"; + +$LOGhostname = php_uname('n'); +if (strlen($LOGhostname)<1) {$LOGhostname='X';} +if (strlen($LOGserver_name)<1) {$LOGserver_name='X';} + +$stmt="SELECT webserver_id FROM vicidial_webservers where webserver='$LOGserver_name' and hostname='$LOGhostname' LIMIT 1;"; +$rslt=mysql_to_mysqli($stmt, $link); +if ($DB) {echo "$stmt\n";} +$webserver_id_ct = mysqli_num_rows($rslt); +if ($webserver_id_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $webserver_id = $row[0]; + } +else + { + ##### insert webserver entry + $stmt="INSERT INTO vicidial_webservers (webserver,hostname) values('$LOGserver_name','$LOGhostname');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $affected_rows = mysqli_affected_rows($link); + $webserver_id = mysqli_insert_id($link); + } + +$stmt="INSERT INTO vicidial_report_log set event_date=NOW(), user='$PHP_AUTH_USER', ip_address='$LOGip', report_name='$report_name', browser='$LOGbrowser', referer='$LOGhttp_referer', notes='$LOGserver_name:$LOGserver_port $LOGscript_name |$group[0], $query_date, $end_date, $shift, $file_download, $report_display_type|', url='$LOGfull_url', webserver='$webserver_id';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_to_mysqli($stmt, $link); +$report_log_id = mysqli_insert_id($link); +##### END log visit to the vicidial_report_log table ##### + +if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) ) + { + mysqli_close($link); + $use_slave_server=1; + $db_source = 'S'; + require("dbconnect_mysqli.php"); + $HTML_text.="\n"; + } + +$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';"; +if ($DB) {$HTML_text.="|$stmt|\n";} +$rslt=mysql_to_mysqli($stmt, $link); +$row=mysqli_fetch_row($rslt); +$LOGuser_group = $row[0]; + +$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';"; +if ($DB) {$HTML_text.="|$stmt|\n";} +$rslt=mysql_to_mysqli($stmt, $link); +$row=mysqli_fetch_row($rslt); +$LOGallowed_campaigns = $row[0]; +$LOGallowed_reports = $row[1]; +$LOGadmin_viewable_groups = $row[2]; +$LOGadmin_viewable_call_times = $row[3]; + +if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) + { + Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "You are not allowed to view this report: |$PHP_AUTH_USER|$report_name|\n"; + exit; + } + +$LOGallowed_campaignsSQL=''; +$whereLOGallowed_campaignsSQL=''; +if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) + { + $rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns); + $rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL); + $LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')"; + $whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')"; + } +$regexLOGallowed_campaigns = " $LOGallowed_campaigns "; + +$LOGadmin_viewable_groupsSQL=''; +$whereLOGadmin_viewable_groupsSQL=''; +if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) ) + { + $rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups); + $rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL); + $LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; + $whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; + } + +$LOGadmin_viewable_call_timesSQL=''; +$whereLOGadmin_viewable_call_timesSQL=''; +if ( (!preg_match('/\-\-ALL\-\-/i', $LOGadmin_viewable_call_times)) and (strlen($LOGadmin_viewable_call_times) > 3) ) + { + $rawLOGadmin_viewable_call_timesSQL = preg_replace("/ -/",'',$LOGadmin_viewable_call_times); + $rawLOGadmin_viewable_call_timesSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_call_timesSQL); + $LOGadmin_viewable_call_timesSQL = "and call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')"; + $whereLOGadmin_viewable_call_timesSQL = "where call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')"; + } + +$MT[0]=''; +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!isset($group)) {$group = '';} +if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} + +$today=$query_date; +$date_ary=explode("-", $today); +$yesterday=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-1, $date_ary[0])); +$twodaysago=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-2, $date_ary[0])); +$threedaysago=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-3, $date_ary[0])); +$fivedaysago=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-5, $date_ary[0])); +$tendaysago=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-10, $date_ary[0])); +$thirtydaysago=date("Y-m-d", mktime(0, 0, 0, $date_ary[1], $date_ary[2]-30, $date_ary[0])); + + +$rpt_date_array=array(); +$rpt_subtitle_array=array(); +array_push($rpt_date_array, "$today", "$yesterday", "$twodaysago", "$threedaysago", "$fivedaysago", "$tendaysago", "$thirtydaysago"); +array_push($rpt_subtitle_array, "TODAY", "YESTERDAY", "2 DAYS AGO", "3 DAYS AGO", "5 DAYS AGO", "10 DAYS AGO", "30 DAYS AGO"); + + +$i=0; +$group_string='|'; +$group_ct = count($group); +while($i < $group_ct) + { + $group_string .= "$group[$i]|"; + $i++; + } + +$i=0; +$users_string='|'; +$users_ct = count($users); +while($i < $users_ct) + { + $users_string .= "$users[$i]|"; + $i++; + } + +$stmt="select campaign_id from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; +$rslt=mysql_to_mysqli($stmt, $link); +if ($DB) {$HTML_text.="$stmt\n";} +$campaigns_to_print = mysqli_num_rows($rslt); +$i=0; +while ($i < $campaigns_to_print) + { + $row=mysqli_fetch_row($rslt); + $groups[$i] =$row[0]; + if (preg_match('/\-ALL/',$group_string) ) + {$group[$i] = $groups[$i];} + $i++; + } +for ($i=0; $i\"HELP\""; + +$HTML_head.="\n"; +$HTML_head.="\n"; +$HTML_head.="\n"; + + +$HTML_head.="\n"; +$HTML_head.="\n"; +$HTML_head.="\n"; + +$HTML_head.="\n"; +$HTML_head.="$report_name\n"; + + $short_header=1; + +# require("admin_header.php"); + +$HTML_text.="
"; + +$HTML_text.="
\n"; +$HTML_text.="
Today's date:
"; +$HTML_text.="\n"; +$HTML_text.=""; + +$HTML_text.="\n"; +/* +$HTML_text.="
to
"; + +$HTML_text.="\n"; +*/ + +$HTML_text.="
Campaigns:
"; +$HTML_text.="\n"; +$HTML_text.="
User Groups:
"; +$HTML_text.="\n"; +$HTML_text.="
Users:
"; +$HTML_text.="\n"; +$HTML_text.="
Shift:
"; +$HTML_text.="\n"; +$HTML_text.="
"; +$HTML_text.="Display as:
"; +$HTML_text.="

\n"; +$HTML_text.="$NWB#agent_performance_detail$NWE\n"; +$HTML_text.="
        "; + +$HTML_text.="          \n"; +$HTML_text.=" REPORTS \n"; +$HTML_text.="\n"; +$HTML_text.="
"; + +$HTML_text.="
\n\n"; + + +$HTML_text.="
\n";
+
+
+if (!$group)
+	{
+	$HTML_text.="\n";
+	$HTML_text.="PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
+	$HTML_text.=" NOTE: stats taken from shift specified\n";
+	}
+
+else
+	{
+	if ($shift == 'AM') 
+		{
+		$time_BEGIN=$AM_shift_BEGIN;
+		$time_END=$AM_shift_END;
+		if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}   
+		if (strlen($time_END) < 6) {$time_END = "15:14:59";}
+		}
+	if ($shift == 'PM') 
+		{
+		$time_BEGIN=$PM_shift_BEGIN;
+		$time_END=$PM_shift_END;
+		if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
+		if (strlen($time_END) < 6) {$time_END = "23:15:00";}
+		}
+	if ($shift == 'ALL') 
+		{
+		if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
+		if (strlen($time_END) < 6) {$time_END = "23:59:59";}
+		}
+	$query_date_BEGIN = "$query_date $time_BEGIN";   
+	$query_date_END = "$end_date $time_END";
+
+
+	#########################
+
+
+
+	$ASCII_text="---------- PERFORMANCE Details -------------\n";
+
+	$HTML_text.="Agent Performance Comparison                        $NOW_TIME\n";
+	$HTML_text.="Starting date: $query_date                         [DOWNLOAD]\n\n";
+
+	$CSV_header1.="\"Agent Performance Comparison                        $NOW_TIME\"\n";
+	$CSV_header1.="\"Starting date: $query_date\"\n\n";
+
+
+
+	# Get full list of agents for the past 30 days
+	$initial_user_stmt="select distinct vicidial_agent_log.user, full_name from vicidial_agent_log, vicidial_users where event_time <= '$query_date $time_END' and event_time >= '$thirtydaysago $time_BEGIN' $group_SQL $user_group_SQL $user_SQL and vicidial_agent_log.user=vicidial_users.user order by full_name asc";
+	if ($DB) {echo $initial_user_stmt;}
+	$initial_user_rslt=mysql_to_mysqli($initial_user_stmt, $link);
+	while ($user_row=mysqli_fetch_array($initial_user_rslt)) 
+		{
+		$agent_performance_array[$user_row[0]][0]=$user_row[1];
+		}
+
+	# Get full list of sale dispositions for selected campaigns/system
+	$sale_stmt="select distinct status from vicidial_campaign_statuses where sale='Y' $group_SQL UNION select distinct status from vicidial_statuses order by status asc";
+	$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
+	$sale_status_str="|";
+	while ($sale_row=mysqli_fetch_row($sale_rslt)) 
+		{
+		$sale_status_str.="$sale_row[0]|";
+		}
+
+	$CSV_header1.='"","",';
+	$CSV_header2.='"USER NAME","ID",';
+
+	$ASCII_header1.="|                            |";
+	$ASCII_header2.="+-----------------+----------+";
+	$ASCII_header3.="| USER NAME       | ID       |";
+
+	$GRAPH="
\n"; + $GRAPH.=""; + + $GRAPH2=""; + for ($q=0; $qCALLS"; + $GRAPH2.=""; + $GRAPH2.=""; + $GRAPH2.=""; + $GRAPH2.=""; + $GRAPH2.=""; + } + + $TOTALS_array[0]="TOTALS"; + $graph_TOTALS_array[0]+="TOTALS"; + + for ($q=0; $qCALLS"; + $SALES_graph[$q]=$graph_header.""; + $SALECONV_graph[$q]=$graph_header.""; + $SPH_graph[$q]=$graph_header.""; + $TIME_graph[$q]=$graph_header.""; + + ######### + + $stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec), vicidial_users.user_group from vicidial_users,vicidial_agent_log where event_time <= '$query_date $time_END' and event_time >= '$rpt_date $time_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<65000 and wait_sec<65000 and talk_sec<65000 and dispo_sec<65000 $group_SQL $user_group_SQL $user_SQL group by user,full_name,user_group,status order by full_name,user,status desc limit 500000;"; + $rslt=mysql_to_mysqli($stmt, $link); + $rows_to_print = mysqli_num_rows($rslt); + $i=0; + + while ($i < $rows_to_print) + { + $row=mysqli_fetch_row($rslt); + $agent_performance_array[$row[3]][$array_offset]+=$row[0]; # CALLS FOR TIME RANGE + if(preg_match("/\|$row[7]\|/", $sale_status_str)) + { + $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 + $i++; + } + + $j=0; + while (list($key, $val)=each($agent_performance_array)) { # CYCLE THROUGH EACH USER + for ($k=0; $k<2; $k++) + { + $agent_performance_array[$key][($array_offset+$k)]+=0; # Add zero so there are no null values; + } + $agent_performance_array[$key][($array_offset+2)]=sprintf("%0.2f", MathZDC(100*$agent_performance_array[$key][($array_offset+1)], $agent_performance_array[$key][$array_offset])); + $agent_performance_array[$key][($array_offset+3)]=sprintf("%0.2f", MathZDC($agent_performance_array[$key][($array_offset+1)], MathZDC($agent_performance_array[$key][($array_offset+4)], 3600))); + $agent_performance_array[$key][($array_offset+4)]+=0; + + $graph_stats[$j][0]="$key - ".$val[0]; + for ($k=0; $k<5; $k++) + { + $graph_stats[$j][($k+1)]=$agent_performance_array[$key][($array_offset+$k)]; + } + for ($k=0; $k<5; $k++) + { # Cycle through and check for max values + if ($agent_performance_array[$key][($array_offset+$k)]>$max_stats[($k+1)]) {$max_stats[($k+1)]=$agent_performance_array[$key][($array_offset+$k)];} + $graph_TOTALS_array[($array_offset+$k)]+=$agent_performance_array[$key][($array_offset+$k)]; + } + $j++; + } + reset($agent_performance_array); + + for ($j=0; $j"; + $SALES_graph[$q].=" "; + $SALECONV_graph[$q].=" "; + $SPH_graph[$q].=" "; + $TIME_graph[$q].=" "; + } + + $CALLS_graph[$q].=" "; + $SALES_graph[$q].=" "; + $SALECONV_graph[$q].=" "; + $SPH_graph[$q].=" "; + $TIME_graph[$q].=" "; + } + + $JS_text.="function DrawGraph(graph, th_id) {\n"; + $JS_onload.="\tDrawGraph('CALLS_".preg_replace('/[^0-9]/', '', $rpt_date_array[0])."', '1');\n"; + for ($q=0; $q15) {$full_name = substr("$full_name", 0, -1);} + $user = sprintf("%-8s", $user); + while(strlen($user)>8) {$user = substr("$user", 0, -1);} + } + else + { + $full_name= sprintf("%-45s", $full_name); + while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');} + $user = sprintf("%-24s", $user); + while(mb_strlen($user,'utf-8')>8) {$user = mb_substr("$user", 0, -1,'utf-8');} + } + $CSV_text.="\"$full_name\",\"$user\","; + $ASCII_text.=" ".$full_name." | ".$user." ||"; + + for ($q=0; $q + diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index a96b5ec8..27e2fa3f 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -109,9 +109,9 @@ $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; $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, Email Log Report, Carrier Log Report, Campaign Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report'; +$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, Performance Comparison Report, 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, Email Log Report, Carrier Log Report, Campaign Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report'; -$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, Email Log Report, Lists Pass Report, Called Counts List IDs Report'; +$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, Performance Comparison Report, 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, Email Log Report, Lists Pass Report, Called Counts List IDs Report'; $Vtables = 'NONE,log_noanswer,did_agent_log,contact_information'; @@ -3289,12 +3289,13 @@ else # 140313-1014 - Added warning to in-groups if they are not set as allowed in any campaigns # 140314-1134 - Added more strict enforcement of level 9 report and user permissions and definable max stats days # 140404-1007 - Added new DID filter features for DNC matching and URL DID Redirects +# 140411-1434 - Added Performance Comparison Report # # 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.8-432a'; -$build = '140404-1007'; +$admin_version = '2.8-433a'; +$build = '140411-1434'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -31556,6 +31557,8 @@ if ($ADD==999999) {echo "
  • Agent Performance Detail\n";} if ( (preg_match("/Team Performance Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • Team Performance Detail\n";} + if ( (preg_match("/Performance Comparison Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) + {echo "
  • Performance Comparison Report\n";} if ( (preg_match("/Single Agent Daily/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • Single Agent Daily\n";} if ( (preg_match("/User Group Login Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
  • PERFORMANCE SUMMARY
    SALESSALE CONV %SALES PER HOURTIME
    SALES
    SALE CONV %
    SALES PER HOUR
    TIME
    ".$graph_stats[$j][1]."
    ".$graph_stats[$j][0]."".$graph_stats[$j][2]."
    ".$graph_stats[$j][0]."".$graph_stats[$j][3]."
    ".$graph_stats[$j][0]."".$graph_stats[$j][4]."
    ".$graph_stats[$j][0]."".sec_convert($graph_stats[$j][5], 'H')."
    TOTAL:".$graph_TOTALS_array[($array_offset)]."
    TOTAL:".$graph_TOTALS_array[($array_offset+1)]."
    TOTAL:".$graph_TOTALS_array[($array_offset+2)]."
    TOTAL:".$graph_TOTALS_array[($array_offset+3)]."
    TOTAL:".sec_convert($graph_TOTALS_array[($array_offset+4)], 'H')."