For the user_stats.php report, Added HELP pop-ups for each section, added agent browser visibility log stats to agent activity section, reformatted most sections

For the agent time detail report, Added agent screen visibility stats
For vicidial.php, Small change for agent screen visibility logging on logout

git-svn-id: svn://192.168.202.10@3392 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-03-19 19:16:55 +00:00
parent aed7014997
commit 6e22100bb2
4 changed files with 289 additions and 116 deletions
+13 -4
View File
@@ -658,10 +658,11 @@
# 210315-2102 - Added CALLBACK manual dial filter option, Issue #1139
# 210317-1207 - Fixes for better consistency in password change process, Issue #1261
# 210318-0236 - Added agent browser visibility logging and Agent Hidden Browser Sounds
# 210319-1500 - Small change for agent screen visibility logging on logout
#
$version = '2.14-626c';
$build = '210318-0236';
$version = '2.14-627c';
$build = '210319-1500';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=95;
$one_mysql_log=0;
@@ -16473,8 +16474,16 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
function LogouT(tempreason,temppause)
{
button_click_log = button_click_log + "" + SQLdate + "-----LogouT---" + tempreason + " " + temppause + "|";
onHidden('1');
onVisible('1');
if (isVisible)
{
onHidden('1');
onVisible('1');
}
else
{
onVisible('1');
onHidden('1');
}
check_for_conf_calls(session_id, '0');
if (MD_channel_look==1)
+78 -29
View File
@@ -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) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 90522-0723 - First build
@@ -55,6 +55,7 @@
# 171012-2015 - Fixed javascript/apache errors with graphs
# 180502-2215 - Added new help display, added CONNECTED column
# 191013-0846 - Fixes for PHP7
# 210318-1558 - Added agent screen visibility stats
#
$startMS = microtime();
@@ -106,6 +107,7 @@ if (strlen($stage)<2) {$stage='NAME';}
if ($search_archived_data=="checked")
{
$agent_log_table="vicidial_agent_log_archive";
$vicidial_agent_visibility_log_table="vicidial_agent_visibility_log_archive";
$table_check_stmt="show tables like 'vicidial_timeclock_log_archive'";
$table_check_rslt=mysql_to_mysqli($table_check_stmt, $link);
if (mysqli_num_rows($table_check_rslt)>0)
@@ -120,6 +122,7 @@ if ($search_archived_data=="checked")
else
{
$agent_log_table="vicidial_agent_log";
$vicidial_agent_visibility_log_table="vicidial_agent_visibility_log";
$timeclock_log_table="vicidial_timeclock_log";
}
@@ -183,6 +186,9 @@ else
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
}
$query_date = preg_replace('/[^-_0-9a-zA-Z]/', '', $query_date);
$end_date = preg_replace('/[^-_0-9a-zA-Z]/', '', $end_date);
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
if ($DB) {echo "|$stmt|\n";}
@@ -198,8 +204,16 @@ $auth=0;
$reports_auth=0;
$admin_auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1,0);
if ($auth_message == 'GOOD')
{$auth=1;}
if ( ($auth_message == 'GOOD') or ($auth_message == '2FA') )
{
$auth=1;
if ($auth_message == '2FA')
{
header ("Content-type: text/html; charset=utf-8");
echo _QXZ("Your session is expired").". <a href=\"admin.php\">"._QXZ("Click here to log in")."</a>.\n";
exit;
}
}
if ($auth > 0)
{
@@ -601,6 +615,8 @@ else
$max_pause=1;
$max_dead=1;
$max_customer=1;
$TOT_HIDDEN=0;
$TOT_VISIBLE=0;
while ($i < $users_to_print)
{
@@ -663,7 +679,8 @@ else
$ss_stmt="select distinct sub_status from ".$agent_log_table." where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and pause_sec > 0 and pause_sec < 65000 $group_SQL $user_group_SQL order by sub_status asc limit 10000000;";
$ss_rslt=mysql_to_mysqli($ss_stmt, $link);
$j=0;
while($ss_row=mysqli_fetch_row($ss_rslt)) {
while($ss_row=mysqli_fetch_row($ss_rslt))
{
$current_ss=$ss_row[0];
$stmt="select $userSQL,sum(pause_sec),sub_status from ".$agent_log_table." where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and pause_sec > 0 and pause_sec < 65000 and sub_status='$current_ss' $group_SQL $user_group_SQL group by user,sub_status order by user,sub_status desc limit 10000000;";
@@ -702,7 +719,7 @@ else
$i++;
$j++;
}
}
}
### END gather pause code information by user IDs
@@ -800,13 +817,13 @@ else
if ($file_download < 1)
{
$ASCII_text.=_QXZ("AGENT TIME BREAKDOWN").":\n";
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| <a href=\"$LINKbase&stage=NAME\">"._QXZ("USER NAME",25)."</a> | <a href=\"$LINKbase&stage=ID\">"._QXZ("ID",8)."</a> | <a href=\"$LINKbase&stage=LEADS\">"._QXZ("CALLS",8)."</a> | <a href=\"$LINKbase&stage=TCLOCK\">"._QXZ("TIME CLOCK",10)."</a> | <a href=\"$LINKbase&stage=TIME\">"._QXZ("LOGIN TIME",10)."</a> |$park_HEADER "._QXZ("WAIT",10)." | "._QXZ("WAIT",8)." % | "._QXZ("TALK",10)." | "._QXZ("TALK TIME",9)." %| "._QXZ("DISPO",10)." | "._QXZ("DISPOTIME",9)." %| "._QXZ("PAUSE",10)." | "._QXZ("PAUSETIME",9)." %| "._QXZ("DEAD",10)." | "._QXZ("DEAD TIME",9)." %| "._QXZ("CUSTOMER",10)." | "._QXZ("CONNECTED",10)." | |$sub_statusesHTML\n";
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD +-------------+-------------+\n";
$ASCII_text.="| <a href=\"$LINKbase&stage=NAME\">"._QXZ("USER NAME",25)."</a> | <a href=\"$LINKbase&stage=ID\">"._QXZ("ID",8)."</a> | <a href=\"$LINKbase&stage=LEADS\">"._QXZ("CALLS",8)."</a> | <a href=\"$LINKbase&stage=TCLOCK\">"._QXZ("TIME CLOCK",10)."</a> | <a href=\"$LINKbase&stage=TIME\">"._QXZ("LOGIN TIME",10)."</a> |$park_HEADER "._QXZ("WAIT",10)." | "._QXZ("WAIT",8)." % | "._QXZ("TALK",10)." | "._QXZ("TALK TIME",9)." %| "._QXZ("DISPO",10)." | "._QXZ("DISPOTIME",9)." %| "._QXZ("PAUSE",10)." | "._QXZ("PAUSETIME",9)." %| "._QXZ("DEAD",10)." | "._QXZ("DEAD TIME",9)." %| "._QXZ("CUSTOMER",10)." | "._QXZ("CONNECTED",10)." | |$sub_statusesHTML | "._QXZ("VISIBLE",11)." | "._QXZ("HIDDEN",11)." |\n";
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD +-------------+-------------+\n";
}
else
{
$file_output .= _QXZ("USER").","._QXZ("ID").","._QXZ("CALLS").","._QXZ("TIME CLOCK").","._QXZ("LOGIN TIME")."$park_HEADER_CSV,"._QXZ("WAIT").","._QXZ("WAIT %").","._QXZ("TALK").","._QXZ("TALK TIME %").","._QXZ("DISPO").","._QXZ("DISPOTIME %").","._QXZ("PAUSE").","._QXZ("PAUSETIME %").","._QXZ("DEAD").","._QXZ("DEAD TIME %").","._QXZ("CUSTOMER").","._QXZ("CONNECTED")."$sub_statusesFILE\n";
$file_output .= _QXZ("USER").","._QXZ("ID").","._QXZ("CALLS").","._QXZ("TIME CLOCK").","._QXZ("LOGIN TIME")."$park_HEADER_CSV,"._QXZ("WAIT").","._QXZ("WAIT %").","._QXZ("TALK").","._QXZ("TALK TIME %").","._QXZ("DISPO").","._QXZ("DISPOTIME %").","._QXZ("PAUSE").","._QXZ("PAUSETIME %").","._QXZ("DEAD").","._QXZ("DEAD TIME %").","._QXZ("CUSTOMER").","._QXZ("CONNECTED")."$sub_statusesFILE,"._QXZ("VISIBLE").","._QXZ("HIDDEN")."\n";
}
##### END print the output to screen or put into file output variable
@@ -960,6 +977,28 @@ else
}
}
### Gather agent screen visibility data from during the time period
$HIDDEN_sec=0; $VISIBLE_sec=0;
$stmt="select count(*),sum(length_in_sec),visibility from ".$vicidial_agent_visibility_log_table." where user='$Suser[$m]' and db_time >= '$query_date_BEGIN' and db_time <= '$query_date_END' and visibility IN('HIDDEN','VISIBLE') group by visibility;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$visibility_results = mysqli_num_rows($rslt);
$v_ct=0;
while ($visibility_results > $v_ct)
{
$row=mysqli_fetch_row($rslt);
if ($row[2] == 'HIDDEN') {$HIDDEN_sec = $row[1];}
if ($row[2] == 'VISIBLE') {$VISIBLE_sec = $row[1];}
$v_ct++;
}
$TOT_HIDDEN = ($TOT_HIDDEN + $HIDDEN_sec);
$TOT_VISIBLE = ($TOT_VISIBLE + $VISIBLE_sec);
$USER_HIDDEN_sec = sec_convert($HIDDEN_sec,$TIME_agenttimedetail);
$pfUSER_HIDDEN_sec = sprintf("%11s", $USER_HIDDEN_sec);
$USER_VISIBLE_sec = sec_convert($VISIBLE_sec,$TIME_agenttimedetail);
$pfUSER_VISIBLE_sec = sprintf("%11s", $USER_VISIBLE_sec);
### BEGIN loop through each status ###
$n=0;
$sub_status_array=array();
@@ -1068,7 +1107,8 @@ else
$graph_stats[$m][19]=trim($user_hpc);
if ($file_download<1) {
if ($file_download<1)
{
if ($non_latin < 1)
{
$Sname[$m]= sprintf("%-25s", $Sname[$m]);
@@ -1083,17 +1123,17 @@ else
$Suser[$m] = sprintf("%-24s", $Suser[$m]);
while(mb_strlen($Suser[$m],'utf-8')>8) {$Suser[$m] = mb_substr("$Suser[$m]", 0, -1,'utf-8');}
}
}
}
if ($file_download < 1)
{
if ($atdr_login_logout_user_link > 0)
{
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?pause_code_rpt=1&begin_date=$query_date&end_date=$end_date&user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | $Sconnected[$m] | |$SstatusesHTML\n";
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?pause_code_rpt=1&begin_date=$query_date&end_date=$end_date&user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | $Sconnected[$m] | |$SstatusesHTML | $pfUSER_VISIBLE_sec | $pfUSER_HIDDEN_sec |\n";
}
else
{
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser&begin_date=$query_date&end_date\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | $Sconnected[$m] | |$SstatusesHTML\n";
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser&begin_date=$query_date&end_date\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | $Sconnected[$m] | |$SstatusesHTML | $pfUSER_VISIBLE_sec | $pfUSER_HIDDEN_sec |\n";
}
$graph_stats[$m][0]=trim("$Suser[$m] - $Sname[$m]");
@@ -1119,7 +1159,7 @@ else
$avg_hold_time=trim($avg_hold_time);
$user_hpc=trim($user_hpc);
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$park_AGENT_INFO_CSV$RAWwait,$RAWwaitpct %,$RAWtalk,$RAWtalkpct %,$RAWdispo,$RAWdispopct %,$RAWpause,$RAWpausepct %,$RAWdead,$RAWdeadpct %,$RAWcustomer,$RAWconnected$SstatusesFILE\n";
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$park_AGENT_INFO_CSV$RAWwait,$RAWwaitpct %,$RAWtalk,$RAWtalkpct %,$RAWdispo,$RAWdispopct %,$RAWpause,$RAWpausepct %,$RAWdead,$RAWdeadpct %,$RAWcustomer,$RAWconnected$SstatusesFILE,$USER_VISIBLE_sec,$USER_HIDDEN_sec\n";
}
$TOPsorted_output[$m] = $Toutput;
@@ -1295,15 +1335,20 @@ else
$hTOTconnected = sprintf("%11s", $TOTconnected);
$hTOTALtime = sprintf("%11s", $TOTALtime);
$hTOTtimeTC = sprintf("%11s", $TOTtimeTC);
$TOT_HIDDEN_HTML = sec_convert($TOT_HIDDEN,$TIME_agenttimedetail);
$pfTOT_HIDDEN_sec = sprintf("%11s", $TOT_HIDDEN_HTML);
$TOT_VISIBLE_HTML = sec_convert($TOT_VISIBLE,$TIME_agenttimedetail);
$pfTOT_VISIBLE_sec = sprintf("%11s", $TOT_VISIBLE_HTML);
###### END LAST LINE TOTALS FORMATTING ##########
if ($file_download < 1)
{
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| "._QXZ("TOTALS",10)." "._QXZ("AGENTS",9,"r").":$hTOT_AGENTS | $hTOTcalls |$hTOTtimeTC |$hTOTALtime |$park_TOTALS$hTOTwait |$hTOTwaitpct |$hTOTtalk |$hTOTtalkpct |$hTOTdispo |$hTOTdispopct |$hTOTpause |$hTOTpausepct |$hTOTdead |$hTOTdeadpct |$hTOTcustomer |$hTOTconnected | |$SUMstatusesHTML\n";
$ASCII_text.="+--------------------------------------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD +-------------+-------------+\n";
$ASCII_text.="| "._QXZ("TOTALS",10)." "._QXZ("AGENTS",9,"r").":$hTOT_AGENTS | $hTOTcalls |$hTOTtimeTC |$hTOTALtime |$park_TOTALS$hTOTwait |$hTOTwaitpct |$hTOTtalk |$hTOTtalkpct |$hTOTdispo |$hTOTdispopct |$hTOTpause |$hTOTpausepct |$hTOTdead |$hTOTdeadpct |$hTOTcustomer |$hTOTconnected | |$SUMstatusesHTML | $pfTOT_VISIBLE_sec | $pfTOT_HIDDEN_sec |\n";
$ASCII_text.="+--------------------------------------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD +-------------+-------------+\n";
if ($AUTOLOGOUTflag > 0)
{
$ASCII_text.= " * "._QXZ("denotes AUTOLOGOUT from timeclock")."\n";
@@ -1323,24 +1368,27 @@ else
$multigraph_text="";
$graph_id++;
$graph_array=array("ATD_CALLSdata|1|CALLS|integer|", "ATD_TIMECLOCKdata|2|TIME CLOCK|time|", "ATD_LOGINTIMEdata|3|LOGIN TIME|time|");
if ($show_parks) {
if ($show_parks)
{
array_push($graph_array, "ATD_PARKSdata|16|PARKS|integer|", "ATD_PARKTIMEdata|17|PARKTIME|time|", "ATD_AVGPARKdata|18|AVGPARK|time|", "ATD_PARKSCALLdata|19|PARKS/CALL|decimal|");
}
}
array_push($graph_array, "ATD_WAITdata|4|WAIT|time|", "ATD_WAITPCTdata|15|WAIT %|percent|", "ATD_TALKdata|5|TALK|time|", "ATD_TALKTIMEPCTdata|11|TALKTIME%|percent|", "ATD_DISPOdata|6|DISPO|time|", "ATD_DISPOTIMEPCTdata|12|DISPOTIME%|percent|", "ATD_PAUSEdata|7|PAUSE|time|", "ATD_PAUSETIMEPCTdata|13|PAUSETIME%|percent|", "ATD_DEADdata|8|DEAD|time|", "ATD_DEADTIMEPCTdata|14|DEADTIME%|percent|", "ATD_CUSTOMERdata|9|CUSTOMER|time|", "ATD_CONNECTEDdata|10|CONNECTED|time|");
for ($e=0; $e<count($sub_statusesARY); $e++) {
for ($e=0; $e<count($sub_statusesARY); $e++)
{
$Sstatus=$sub_statusesARY[$e];
$SstatusTXT=$Sstatus;
if ($Sstatus=="") {$SstatusTXT="(blank)";}
array_push($graph_array, "ATD_SUBSTATUS".$e."data|".($e+19)."|".$SstatusTXT."|time|");
}
}
$default_graph="bar"; # Graph that is initally displayed when page loads
include("graph_color_schemas.inc");
$graph_totals_array=array();
$graph_totals_rawdata=array();
for ($q=0; $q<count($graph_array); $q++) {
for ($q=0; $q<count($graph_array); $q++)
{
$graph_info=explode("|", $graph_array[$q]);
$current_graph_total=0;
$dataset_name=$graph_info[0];
@@ -1360,7 +1408,8 @@ else
$graphConstantsA="\t\t\t\tbackgroundColor: [";
$graphConstantsB="\t\t\t\thoverBackgroundColor: [";
$graphConstantsC="\t\t\t\thoverBorderColor: [";
for ($d=0; $d<count($graph_stats); $d++) {
for ($d=0; $d<count($graph_stats); $d++)
{
$labels.="\"".preg_replace('/ +/', ' ', $graph_stats[$d][0])."\",";
$data.="\"".$graph_stats[$d][$dataset_index]."\",";
$current_graph_total+=$graph_stats[$d][$dataset_index];
@@ -1370,7 +1419,7 @@ else
$graphConstantsA.="\"$bgcolor\",";
$graphConstantsB.="\"$hbgcolor\",";
$graphConstantsC.="\"$hbcolor\",";
}
}
$graphConstantsA.="],\n";
$graphConstantsB.="],\n";
$graphConstantsC.="],\n";
@@ -1378,7 +1427,8 @@ else
$data=preg_replace('/,$/', '', $data)."],\n";
$graph_totals_rawdata[$q]=$current_graph_total;
switch($dataset_type) {
switch($dataset_type)
{
case "time":
$graph_totals_array[$q]=" <caption align=\"bottom\">"._QXZ("TOTAL")." - ".sec_convert($current_graph_total, 'H')." </caption>\n";
$chart_options="options: {tooltips: {callbacks: {label: function(tooltipItem, data) {var value = Math.round(data.datasets[0].data[tooltipItem.index]); return value.toHHMMSS();}}}, legend: { display: false }},";
@@ -1391,7 +1441,7 @@ else
$graph_totals_array[$q]=" <caption align=\"bottom\">"._QXZ("TOTAL").": $current_graph_total</caption>\n";
$chart_options="options: { legend: { display: false }},";
break;
}
}
$datasets.=$data;
$datasets.=$graphConstantsA.$graphConstantsB.$graphConstantsC.$graphConstants; # SEE TOP OF SCRIPT
@@ -1404,7 +1454,7 @@ else
# $JS_text.="prepChart('$default_graph', $graph_id, $q, $dataset_name);\n";
$JS_text.="var main_ctx = document.getElementById(\"CanvasID".$graph_id."_".$q."\");\n";
$JS_text.="var GraphID".$graph_id."_".$q." = new Chart(main_ctx, {type: '$default_graph', $chart_options data: $dataset_name});\n";
}
}
$graph_count=count($graph_array);
$graph_title=_QXZ("AGENT TIME DETAIL REPORT");
@@ -1412,11 +1462,10 @@ else
echo $HTML_graph_head;
$GRAPH.=$graphCanvas;
}
else
{
$file_output .= _QXZ("TOTALS").",$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$park_TOTALS_CSV$TOTwait,$TOTwaitpct %,$TOTtalk,$TOTtalkpct %,$TOTdispo,$TOTdispopct %,$TOTpause,$TOTpausepct %,$TOTdead,$TOTdeadpct %,$TOTcustomer,$TOTconnected$SUMstatusesFILE\n";
$file_output .= _QXZ("TOTALS").",$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$park_TOTALS_CSV$TOTwait,$TOTwaitpct %,$TOTtalk,$TOTtalkpct %,$TOTdispo,$TOTdispopct %,$TOTpause,$TOTpausepct %,$TOTdead,$TOTdeadpct %,$TOTcustomer,$TOTconnected$SUMstatusesFILE,$TOT_VISIBLE_HTML,$TOT_HIDDEN_HTML\n";
}
}
+43 -2
View File
@@ -1,4 +1,4 @@
# version: 20210318023201
# version: 20210319035001
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
@@ -1275,7 +1275,7 @@ template_maker-editing_columns Editing columns <QXZ>If you need to change the fi
template_maker-current_file_layout Current File Layout <QXZ>This is simply a quote-comma-delimited approximation of the layout of the file your template is based on, going by the current template settings. Fields in the file that are not used in your template are shown as -unused- here.</QXZ>
max_stats Maximum System Stats <QXZ>These statistics are cached totals that are stored throughout each day in real-time through back-end processes. For inbound calls, the total calls per in-group are calculated for each call that enters the process that calculates. For the whole system counts, the totals are generated from log entries as well as other in-group and campaign totals. These totals may not add up due to the settings that you have in your system as well as when the call is hung up.</QXZ>
qc_status_codes The Quality Control <QXZ>QC function has its own set of status codes separate from those within the call handling functions of the system. QC status codes must be between 2 and 8 characters in length and contain no special characters like a space or colon. The QC status code description must be between 2 and 30 characters in length. For these functions to work, you must have QC enabled in the System Settings.</QXZ>
agent_time_detail Agent Time Detail <QXZ>In this report you can view how much time agents spent on what.</QXZ><BR><QXZ><U>TIME CLOCK</U> = Time the agent been logged in to the time clock.</QXZ><BR><QXZ><U>AGENT TIME</U> = Total time on the system (<U>WAIT</U> + <U>TALK</U> + <U>DISPO</U> + <U>PAUSE</U>).</QXZ><BR><QXZ><U>WAIT</U> = Time the agent waits for a call.</QXZ><BR><QXZ><U>TALK</U> = Time the agent talks to a customer or is in dead state (<U>DEAD</U> + <U>CUSTOMER</U>).</QXZ><BR><QXZ><U>DISPO</U> = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc).</QXZ><BR><QXZ><U>PAUSE</U> = Time the agent is in pause mode (<U>LOGIN</U> + <U>LAGGED</U> + ...).</QXZ><BR><QXZ><U>DEAD</U> = Time the agent is in a call after the customer has hung up.</QXZ><BR><QXZ><U>CUSTOMER</U> = Time the agent is in a live call with a customer.</QXZ><BR><QXZ><U>CONNECTED</U> = Time the agent is waiting for a live call plus time in a live call with a customer.</QXZ><BR><QXZ>- The next table is pause codes and their time.</QXZ><BR><QXZ><U>LOGIN</U> = The pause code when going from login directly to pause.</QXZ><BR><QXZ><U>LAGGED</U> = The time the agent had some network problem or similar.</QXZ><BR><QXZ><U>ANDIAL</U> = This pause code triggers if the agent been on dispo screen for longer than 1000 seconds.</QXZ><BR><QXZ>and empty is undefined pause code.</QXZ>
agent_time_detail Agent Time Detail <QXZ>In this report you can view how much time agents spent on what.</QXZ><BR><QXZ><U>TIME CLOCK</U> = Time the agent been logged in to the time clock.</QXZ><BR><QXZ><U>AGENT TIME</U> = Total time on the system (<U>WAIT</U> + <U>TALK</U> + <U>DISPO</U> + <U>PAUSE</U>).</QXZ><BR><QXZ><U>WAIT</U> = Time the agent waits for a call.</QXZ><BR><QXZ><U>TALK</U> = Time the agent talks to a customer or is in dead state (<U>DEAD</U> + <U>CUSTOMER</U>).</QXZ><BR><QXZ><U>DISPO</U> = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc).</QXZ><BR><QXZ><U>PAUSE</U> = Time the agent is in pause mode (<U>LOGIN</U> + <U>LAGGED</U> + ...).</QXZ><BR><QXZ><U>DEAD</U> = Time the agent is in a call after the customer has hung up.</QXZ><BR><QXZ><U>CUSTOMER</U> = Time the agent is in a live call with a customer.</QXZ><BR><QXZ><U>CONNECTED</U> = Time the agent is waiting for a live call plus time in a live call with a customer.</QXZ><BR><QXZ>- The next table is pause codes and their time.</QXZ><BR><QXZ><U>LOGIN</U> = The pause code when going from login directly to pause.</QXZ><BR><QXZ><U>LAGGED</U> = The time the agent had some network problem or similar.</QXZ><BR><QXZ><U>ANDIAL</U> = This pause code triggers if the agent been on dispo screen for longer than 1000 seconds.</QXZ><BR><QXZ>and empty is undefined pause code.</QXZ><BR><QXZ><U>VISIBLE</U> = This is a tally of the amount of time the Agent Screen is being viewed by the agent in their web browser while they are logged in.</QXZ><BR><QXZ><U>HIDDEN</U> = This is a tally of the amount of time the Agent Screen is hidden from the view of the agent in their web browser while they are logged in.</QXZ>
agent_status_detail Agent Status Detail <QXZ>In this report you can view what and how many statuses has been selected by the agents.</QXZ><BR><QXZ><U>CALLS</U> = Total number of calls sent to the user.</QXZ><BR><QXZ><U>CIcalls</U> = Total number of call where there was a Human Answer which is set under Admin -> System Statuses.</QXZ><BR><QXZ><U>DNC/CI%</U> = How much in percent DNC (Do Not Call) per Human Answers.</QXZ><BR><QXZ>And the rest is just System Statuses that the agent picked and how many, to find out what they means then head over to Admin -> System Statuses.</QXZ>
agent_performance_detail Agent Performance Detail <QXZ>This is a combination of Agent Time Detail and Agent Status Detail.</QXZ><BR><QXZ>(Statistics related to handling of calls only. What this means is that the top section will only include time involving a phone call. If an agent clicks to go active, then pauses, then goes active again without taking a call, that time will not be included in the top section of this report.)</QXZ><BR><QXZ><U>CALLS</U> = Total number of calls sent to the user.</QXZ><BR><QXZ><U>TIME</U> = Total time of these (<U>PAUSE</U> + <U>WAIT</U> + <U>TALK</U> + <U>DISPO</U>).</QXZ><BR><QXZ><U>PAUSE</U> = Amount of time being paused in related to call handling.</QXZ><BR><QXZ><U>AVG</U> means Average so everything -AVG is for example amount of PAUSE-time divided by total number of calls: (<U>PAUSE</U> / <U>CALLS</U> = <U>PAUSAVG</U>)</QXZ><BR><QXZ><U>WAIT</U> = Time the agent waits for a call.</QXZ><BR><QXZ><U>TALK</U> = Time the agent talks to a customer or is in dead state (<U>DEAD</U> + <U>CUSTOMER</U>).</QXZ><BR><QXZ><U>DISPO</U> = Time the agent uses at the disposition screen (where the agent picks NI, SALE etc).</QXZ><BR><QXZ><U>DEAD</U> = Time the agent is in a call after the customer has hung up.</QXZ><BR><QXZ><U>CUSTOMER</U> = Time the agent is in a live call with a customer.</QXZ><BR><QXZ>And the rest is just System Statuses that the agent picked and how many, to find out what they means then head over to Admin -> System Statuses.</QXZ><BR><QXZ>- Next table is Pause Codes.</QXZ><BR><QXZ><U>LOGIN TIME</U> = Total time on the system (<U>WAIT</U> + <U>TALK</U> + <U>DISPO</U> + <U>PAUSE</U>).</QXZ><BR><QXZ><U>NONPAUSE</U> = Everything except pause (<U>WAIT</U> + <U>TALK</U> + <U>DISPO</U>).</QXZ><BR><QXZ><U>PAUSE</U> = Only Pause.</QXZ><BR><QXZ>- The last table is pause codes and their time (like Agent Time Detail).</QXZ><BR><QXZ><U>LOGIN</U> = The pause code when going from login directly to pause.</QXZ><BR><QXZ><U>LAGGED</U> = The time the agent had some network problem or similar.</QXZ><BR><QXZ><U>ANDIAL</U> = This pause code triggers if the agent been on dispo screen for longer than 1000 seconds.</QXZ><BR><QXZ>and empty is undefined pause code.</QXZ>
team_performance_detail Team Performance Detail <QXZ>This report contains some of the same information as the Agent Time Detail report, as well as several new fields. Also, the users are grouped together within their User Groups, and there is a User Group summary at the bottom of the results.</QXZ><BR><QXZ><U>CALLS</U> = Total number of calls sent to the user.</QXZ><BR><QXZ><U>LEADS</U> = Total number of unique leads the user handled.</QXZ><BR><QXZ><U>CONTACTS</U> = Total number of calls the user handled that were statused in a Customer Contact status.</QXZ><BR><QXZ><U>CONTACT RATIO</U> = Percent of calls where a customer was contacted.</QXZ><BR><QXZ><U>NONPAUSE</U> = Everything except pause (<U>WAIT</U> + <U>TALK</U> + <U>DISPO</U>).</QXZ><BR><QXZ><U>TIME</U> = Total time of these (<U>PAUSE</U> + <U>WAIT</U> + <U>TALK</U> + <U>DISPO</U>).</QXZ><BR><QXZ><U>TALK</U> = Time the agent talks to a customer minus <U>DEAD</U> time.</QXZ><BR><QXZ><U>SALES</U> = Total number of calls the user handled where the SALE status flag is set to Y.</QXZ><BR><QXZ><U>SALES PER WORKING HOUR</U> = Total number of sales divided by system time.</QXZ><BR><QXZ><U>SALES TO LEADS RATIO</U> = Total number of sales divided by leads handled.</QXZ><BR><QXZ><U>SALES TO CONTACTS RATIO</U> = Total number of sales divided by contacts.</QXZ><BR><QXZ><U>SALES PER HOUR</U> = Total number of sales divided by talk time.</QXZ><BR><QXZ><U>INCOMPLETE SALES</U> = Total number of calls statused as QCFAIL.</QXZ><BR><QXZ><U>CANCELLED SALES</U> = Total number of calls statused as QCCANC.</QXZ><BR><QXZ><U>CALLBACKS</U> = Total number of active or live callbacks for this user in the system.</QXZ><BR><QXZ><U>FIRST CALL RESOLUTION</U> = Total number of calls handled divided by leads handled.</QXZ><BR><QXZ><U>AVERAGE SALE TIME</U> = Total number of sales divided by the talk time for those sales calls.</QXZ><BR><QXZ><U>AVERAGE CONTACT TIME</U> = Total number of contacts divided by the talk time for those contact calls.</QXZ>
@@ -1406,3 +1406,44 @@ lead_export_report-export_fields Export Fields <QXZ>STANDARD will include all of
lead_export_report-exclude_call_log_data Exclude Call Log Data <QXZ>If you only want to export lead data, and no log or user information associated with the leads, then set this option to YES, change the -Date Field- to Entry Date and select -Lists-, -Statuses- and a -Campaign-, even though the Campaign will be ignored.</QXZ>
lead_export_report-search_archived_data Search Archived Data <QXZ>If you want to pull data from older leads and-or call logs that have been archived on your system, then you can select either or both of those options here.</QXZ>
settings_compare Settings Compare Utility <QXZ>This utility will allow you to compare the settings from two records in your system and see what settings are different between the two. Step 1, select the type of settings to compare, CAMPAIGNS, LISTS, IN-GROUPS, USERS, etc... Step 2, select the two entries that you want to compare. To start over, click the RESET link.</QXZ>
callerID_breakdown_report-log_second_diff Log Second Diff <QXZ>The maximum number of seconds difference allowed between the call_date value in the vicidial_log table and the call_date value in the vicidial_dial_log table for records from both tables with matching lead_ids to be considered the same call.</QXZ>
cb-bulk-cb-dates Scheduled callback dates <QXZ>The date the leads are scheduled to be called back.</QXZ>
qc_scorecards-active_checkpoint Active (checkpoint) <QXZ>Whether or not the checkpoint is active within the scorecard. Inactive checkpoints are not displayed outside the QC scorecard interface.</QXZ>
qc_scorecards-admin_notes Checkpoint Admin Notes <QXZ>Any administrative notes - these are not viewable to the QC agent.</QXZ>
qc_scorecards-checkpoint_text Checkpoint Text <QXZ>The text instructions for the agent to follow.</QXZ>
qc_scorecards-preset_comments Preset Comments <QXZ>If you want to give the quality control agents the option of adding standardized comments to their QC comments per checkpoint, type them into the corresponding "Preset comments" box, one per line. If a checkpoint has preset comments, they will appear in a drop-down menu to the right of the agent's comment box in their scorecard interface and can be inserted into the comments box by selecting the comment and clicking either the "ADD TO COMMENTS" or "TIMESTAMP & ADD" button.</QXZ>
qc_scorecards-instant_fail Instant Fail <QXZ>Whether or not the checkpoint will have the option to instantly fail the call.</QXZ>
qc_scorecards-modify Modifying checkpoints <QXZ>Any changes made to a checkpoint will be saved automatically so there is no "UPDATE" or "MODIFY" button necessary.</QXZ>
qc_scorecards-new_active Active (scorecard) <QXZ>Whether or not the new scorecard is active. Inactive scorecards are not viewable or usable outside the QC scorecard interface.</QXZ>
qc_scorecards-new_scorecard_id New Scorecard ID <QXZ>The ID code of the new scorecard, similar to the ID of campaigns, user groups, in-groups, etc. Alphanumeric, 20-character max</QXZ>
qc_scorecards-new_scorecard_name New Scorecard Name <QXZ>The full descriptive name of the scorecard. 255-character max</QXZ>
qc_scorecards-order Order <QXZ>The order in which the checkpoint will appear when the scorecard is displayed.</QXZ>
qc_scorecards-points Checkpoint Points <QXZ>The maximum point value of the checkpoint.</QXZ>
rt_state_report Real-Time State report <QXZ>This report compiles statistical information by state or province and displays it graphically on a map of the US, with a subsection for Canadian provinces as well. States and provinces get shaded a color representative of their performance for the type of report selected, meaning the better a state performs the darker it will be shaded on the map. States with no report results will remain in a shade of gray. A comprehensive report is always provided for the entire database, but statistics for individual states and provinces can be brought up simply by clicking on the state on the map (or in the case of small states and Canadian provinces, clicking on the box containing their respective abbreviation). The report is automatically reloaded after a selected interval to reflect the current performance within the selected time frame. It can display a simple inventory breakdown, call volume, contact volume, sales volume, contact rate relative to call volume, and sales rate relative to contact volume. Data can be filtered by campaign, user group, user, in-groups, DIDs, and status types. Additionally, the report can compile data based on either a starting point in time, or a window of time in hours relative to the current time. The report handles both inbound and outbound calls.</QXZ>
rt_state_report-parameters Campaigns,Status Flags,User Groups,Users,In-Groups,DIDs <QXZ>Parameters that may or may not be required based on the type of report run. Available options are dependent on the user permissions. Additionally, selecting specific campaigns combined with selecting -ALL- for ingroups will restrict the -ALL- selection to only ingroups for the selected campaigns. Specific campaign selection will also limit the statuses counted if any status flags are selected.</QXZ>
rt_state_report-report_date Report date/time <QXZ>The date and time to report on through to the current date and time when generating statistics. This will be overriden if the "show results for the past XX hours" parameter is used</QXZ>
rt_state_report-report_type Report Type <QXZ>The type of state/province breakdown report to display.</QXZ><UL><QXZ><LI>Current state counts - covers all the leads in the database</QXZ><BR><QXZ><LI>Call Volume - covers the number of calls made or received in the database</QXZ><BR><QXZ><LI>Contact Volume - covers the number of calls dispositioned as customer contacts made or received in the database.</QXZ><BR><QXZ><LI>Sale Volume - covers the number of calls dispositioned as sales made or received in the database</QXZ><BR><QXZ><LI>Contact Rate - calculates contact rate percentages for leads dispositioned as customer contacts against calls made/received</QXZ><BR><QXZ><LI>Sale Rate - calculates sale rate percentages for leads dispositioned as sales against calls made/received that were dispositioned as customer contacts</QXZ><BR></UL>
rt_state_report-show_results Show results for the past XX hours <QXZ>The number of hours to go back to, relative to the current time, when querying the database for log records to generate the call statistics with. For example, entering "8" in this field means the report will only show statistics for calls handled in the last eight hours.</QXZ>
rt_state_report-target_rate Target rate <QXZ>If this parameter is used and the report type selected is one of the two "rate" reports, any state meeting or exceeding the target volume is automatically shaded the darkest color to signify it has met the target.</QXZ>
rt_state_report-target_volume Target volume <QXZ>If this parameter is used and the report type selected is one of the three "volume" reports, any state meeting or exceeding the target volume is automatically shaded the darkest color to signify it has met the target.</QXZ>
scheduled_callbacks_auto_reschedule Scheduled Callbacks Auto Reschedule <QXZ>This feature only affects ANYONE scheduled callbacks. If DAY_1 is used, it will automatically reschedule lead lead to be called back on the next calling day at thee same time they were called if the resulting disposition of the call was not a Human Answer -Y- status. The next calling day is determined by the Call Time that is set for the campaign. In the case of DAY_1, if tomorrow is not an allowed calling day, the system will look at the next day and then the next day until it finds the next allowable calling day to set the ANYONE scheduled callback for. There are up to 6 DAY options, then there are up to 3 WEEK options, then there are up to 6 MONTH options. Default is DISABLED.</QXZ>
scheduled_callbacks_timezones_container Scheduled Callbacks Local Timezones <QXZ>If set to something other than ---DISABLED---, the selected TIMEZONE_LIST type of Settings Container will be used to display a list of time zones in the Scheduled Callback panel of the agent screen that would be used to set the scheduled callback by one of those local times. A TIMEZONE_LIST type of Settings Container would need to be created that will contain one timezone per line with each line containing the 3-letter Country Code, the TimeZone Code, a Y or N for whether Daylight Saving Time is observed in that zone, and a short description of the time zone as you want it to appear to the agents. For example, for the Eastern United States time zone, you could put -USA,EST,Y,Eastern Time Zone-, without the dashes. To see a list of the available time zone combinations on your system, go to the Admin, System Settings page and click on the -Phone Codes- link on that page. Default is DISABLED, and the scheduled callbacks screen will use the agent server time to set callbacks.</QXZ>
user_stats-date_field Date Fields <QXZ>These fields are where you define the date range you want to see User Stats for. Default is today.</QXZ>
user_stats-call_status Call Status <QXZ>If you only want to see call logs on this page with a specific status, enter it here. Default is -blank- for disabled.</QXZ>
user_stats-search_archived_data Search Archived Data <QXZ>If your system has log archiving enabled, and you want to search within the archives for User log data, select this checkbox. Default is unchecked.</QXZ>
user_stats-agent_pause_logs Agent Pause Logs <QXZ>This report will show you the agent pauses with pause codes and pause time durations for the selected date range.</QXZ>
user_stats-agent_parked_call_logs Agent Parked Call Logs <QXZ>This report will show you the call details and durations for calls that this agent has parked on hold for the selected date range.</QXZ>
user_stats-agent_talk_time_and_status Agent Talk Time and Status <QXZ>This section will show you all of the total number of calls and call durations by status of inbound and outbound calls handled by this agent during the selected time range. This data is based upon call log data, not agent activity log data, which is separate and may not show the same call durations.</QXZ>
user_stats-agent_login_and_logout_time Agent Login and Logout Time <QXZ>This section will show you the Agent Screen Login and Logout events for this agent for the selected time range.</QXZ><BR><QXZ><U>EVENT</U> = Either a LOGIN or LOGOUT event, the agent logging into or out of the Agent Screen.</QXZ><BR><QXZ><U>DATE</U> = The date-time-stamp of the event.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logging into or out of.</QXZ><BR><QXZ><U>GROUP</U> = The User Group of the agent at the time they logged in or out.</QXZ><BR><QXZ><U>SESSION</U> = The Session ID when the agent first logged in to that session.</QXZ><BR><QXZ><U>HOURS</U> = The time duration, in hours:minutes:seconds, of the agent session.</QXZ><BR><QXZ><U>SERVER</U> = The IP Address of the server that the agent logged into. For some LOGOUT events, this area may show that a manager force-logged-out the agent, with the user ID of the manager that forced the logout of the agent session.</QXZ><BR><QXZ><U>PHONE</U> = The phone account that the agent logged in with.</QXZ><BR><QXZ><U>COMPUTER</U> = The IP Address that the agent logged in from. If the server or agent are behind a seperated network, this IP Address may be for a network gateway device instead of the actual computer.</QXZ><BR><QXZ><U>PHONE LOGIN</U> = The Phone Login used when the agent logged into the agent screen. This may be different from the PHONE if Phone Aliases are in use on the system.</QXZ><BR><QXZ><U>PHONE IP</U> = If enabled on your system, this can show the IP address of the phone device that the agent connected to their session through.</QXZ>
user_stats-timeclock_login_and_logout_time Timeclock Login and Logout Time <QXZ>This section will show the timeclock punch log for this User for the selected time range.</QXZ><BR><QXZ><U>ID EDIT</U> = This is the unique Timeclock punch ID number. If you are a manager with the ability to edit timeclock records then you can click on this ID number to see the record and modify the punch times and add comments to the punch record. If a punch record has been edited by a amanger or is a system forced logout, you will see a star next to the ID here.</QXZ><BR><QXZ><U>EVENT</U> = Either a LOGIN or LOGOUT event, the agent logging into or out of the Timeclock.</QXZ><BR><QXZ><U>DATE</U> = The date-time-stamp of the event.</QXZ><BR><QXZ><U>IP ADDRESS</U> = The IP Address that the agent logged in from. If the server or agent are behind a seperated network, this IP Address may be for a network gateway device instead of the actual computer.</QXZ><BR><QXZ><U>GROUP</U> = The User Group of the agent at the time they punched in or out of the timeclock.</QXZ><BR><QXZ><U>HOURS</U> = The time duration, in hours:minutes:seconds, of the timeclock session.</QXZ>
user_stats-closer_ingroup_selection_logs Closer In-Group Selection Logs <QXZ>This section will show the In-Groups, Email-Groups and Chat-Groups that the agent is set to receive calls from after they log into the agent screen.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the specific agent selection action was completed.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logging into.</QXZ><BR><QXZ><U>BLEND</U> = Whether the agent was set to also take outbound calls during this sesstion, 1 = Yes, 2 = No.</QXZ><BR><QXZ><U>GROUPS</U> = The list of In-Groups, Email-Groups and Chat-Groups that the agent is set to receive calls from starting at this selection record time.</QXZ><BR><QXZ><U>MANAGER</U> = If a manager has used the Real-Time Report to modify the agent selected in-groups, the user ID of the manager will appear in this column.</QXZ>
user_stats-outbound_calls Outbound Calls for this Time Period <QXZ>This section will show the manual dial and auto-dial outbound calls handled by this agent during the selected time period, most recent call first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the outbound call was initiated in the system.</QXZ><BR><QXZ><U>LENGTH</U> = The length of the outbound call in seconds.</QXZ><BR><QXZ><U>STATUS</U> = The status assigned to the call by the agent after the call was hung up.</QXZ><BR><QXZ><U>PHONE</U> = The phone number the call was placed to.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when the outbound call was placed.</QXZ><BR><QXZ><U>GROUP</U> = The User Group that the agent was a member of at the time the call was placed.</QXZ><BR><QXZ><U>LIST</U> = The List ID of the lead that was called at the time the call was placed.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was called. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>HANGUP REASON</U> = The reason the call was hung up, if the AGENT or CALLER hung up the call first.</QXZ>
user_stats-outbound_emails Outbound Emails for this Time Period <QXZ>This section will show the outbound emails sent through the Agent Screen in response to inbound emails that the agent has handled during the selected time period, most recent email first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the outbound email was sent.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when the outbound call was placed.</QXZ><BR><QXZ><U>EMAIL TO</U> = The email address that the email was sent to.</QXZ><BR><QXZ><U>ATTACHMENTS</U> = A list of any attachments that the agent included in their reply email.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was emailed. You can click on this link to see more details about this lead, including past emails and the ability to modify lead information.</QXZ><BR><QXZ><U>MESSAGE</U> = The beginning of the message of the email that was sent.</QXZ>
user_stats-inbound_calls Inbound Closer Calls for this Time Period <QXZ>This section will show the inbound and closer-transferred calls handled by this agent during the selected time period, most recent call first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the inbound call was received in the In-Group.</QXZ><BR><QXZ><U>LENGTH</U> = The length of the inbound call in seconds.</QXZ><BR><QXZ><U>STATUS</U> = The status assigned to the call by the agent after the call was hung up.</QXZ><BR><QXZ><U>PHONE</U> = The phone number the call was received from.</QXZ><BR><QXZ><U>IN-GROUP</U> = The In-Group the call was received into.</QXZ><BR><QXZ><U>WAIT</U> = The amount of time in seconds the customer had to wait before being sent to the agent.</QXZ><BR><QXZ><U>AGENT</U> = The amount of time in seconds the customer was on the phone with the agent.</QXZ><BR><QXZ><U>LIST</U> = The List ID of the lead that called in at the time of the call.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that called in. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>HANGUP REASON</U> = The reason the call was hung up, if the AGENT or CALLER hung up the call first.</QXZ>
user_stats-agent_activity Agent Activity for this time period <QXZ>This section will show the agent screen logged-in activity for the selected time period, most recent activity first. Each record is started by a PAUSE action.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the agent started a new pause state.</QXZ><BR><QXZ><U>PAUSE</U> = The number of seconds the agent was in a paused state for this entry.</QXZ><BR><QXZ><U>WAIT</U> = The number of seconds the agent was waiting for a phone call for this entry. For outbound manual dial phone calls, this is the ring time before the call was answered.</QXZ><BR><QXZ><U>TALK</U> = The number of seconds the agent was in talking state for this entry.</QXZ><BR><QXZ><U>DISPO</U> = The number of seconds the agent was in the disposition screen for this entry.</QXZ><BR><QXZ><U>DEAD</U> = The number of seconds while in the talking state after which the customer had already hung up.</QXZ><BR><QXZ><U>CUSTOMER</U> = The number of seconds the agent was actually speaking to the customer.</QXZ><BR><QXZ><U>VISIBLE</U> = The number of seconds the agent screen was viewable since the last time it was hudden.</QXZ><BR><QXZ><U>HIDDEN</U> = The number of seconds the agent screen was hidden from the view of the agent since the last time it was visible.</QXZ><BR><QXZ><U>STATUS</U> = The status assigned to the call by the agent after the call was hung up.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was handled by the agent. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>TYPE</U> = The type of call handled by the agent during this activity record. -M- is manual dial outbound, -A- is auto-dial outbound, -I- is an inbound call, -E- is an inbound email and -C- is a website customer chat.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when this agent activity happened.</QXZ><BR><QXZ><U>PAUSE CODE</U> = The pause code selected or assigned to this agent activity record.</QXZ>
user_stats-recordings Recordings for this Time Period <QXZ>This section will show the call recordings made for this User during the selected time period, most recent recordings first.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was handled by the agent during this call recording. You can click on this link to see more details about this lead, including past calls, recordings and the ability to modify lead information.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the call recording was started.</QXZ><BR><QXZ><U>SECONDS</U> = The length in seconds of the call recording.</QXZ><BR><QXZ><U>RECID</U> = The unique recording ID in the system for this call recording.</QXZ><BR><QXZ><U>FILENAME</U> = The file name of the call recording, without the suffix extension at the end.</QXZ><BR><QXZ><U>LOCATION</U> = The URL or web address of the recording. This link may be able to be clicked on to download or listen to the call recording, depending on how your system is set up.</QXZ><BR><QXZ><U>MUTE</U> = If recording muting is allowed on your system, this will show the number of times during the call recording that muting was enabled, if any.</QXZ>
user_stats-manual_calls Manual Outbound Calls for this Time Period <QXZ>This section will show the manual dial phone calls placed by the agent, including 3way calls, during the selected time period, most recent call first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the outbound call was initiated by the agent.</QXZ><BR><QXZ><U>CALL TYPE</U> = The type of phone call placed.</QXZ><BR><QXZ><U>SERVER</U> = The IP Address of the server that the agent placed the call from.</QXZ><BR><QXZ><U>PHONE</U> = The phone number the call was placed to.</QXZ><BR><QXZ><U>DIALED</U> = The dial string the call was placed using.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was called. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>CALLERID</U> = The outbound Caller ID Number that was used when the call was placed.</QXZ><BR><QXZ><U>ALIAS</U> = If a Phone Alias was selected by the user when the call was placed, it will be shown here.</QXZ><BR><QXZ><U>PRESET</U> = If a Preset number was selected by the user when the call was placed, it will be shown here.</QXZ><BR><QXZ><U>C3HU</U> = If the call was a 3way call, and the customer hung up before either of the other two parties, the amount of time the customer was in the call will be shown here.</QXZ>
user_stats-lead_searches Lead Searches for this Time Period <QXZ>This section will show the agent screen lead searches conducted by the agent during this time period, most recent search first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the lead search was conducted by the agent.</QXZ><BR><QXZ><U>TYPE</U> = The type of search that was conducted.</QXZ><BR><QXZ><U>RESULTS</U> = The number of matches that were returned to the agent by the system for the search.</QXZ><BR><QXZ><U>SEC</U> = The number of seconds the search took for the system to process before returning results.</QXZ><BR><QXZ><U>QUERY</U> = The search query as run by the system.</QXZ>
user_stats-preview_skips Preview Lead Skips for this Time Period <QXZ>This section will show the previewed leads that were skipped by the agent during this time period, most recent skips first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the previewed lead was skipped by the agent.</QXZ><BR><QXZ><U>LEAD</U> = The Lead ID of the lead that was skipped. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>STATUS</U> = The status of the lead that was skipped.</QXZ><BR><QXZ><U>COUNT</U> = The called count of the lead that was skipped.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when this previewed lead was skipped.</QXZ>
user_stats-switch_leads Agent Lead Switches for this Time Period <QXZ>This section will show the Agent Lead Switches that happened during the selected time period, a lead switch is when an inbound call goes to the agent, the agent searches for a lead in the system and they select another lead to tie their current call to. Most recent lead switch is shown first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the lead was switched by the agent.</QXZ><BR><QXZ><U>FROM LEAD ID</U> = The Lead ID of the lead that the agent started the call with. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>TO LEAD ID</U> = The Lead ID of the lead that the agent switched the call to during the call. You can click on this link to see more details about this lead, including past calls and the ability to modify lead information.</QXZ><BR><QXZ><U>CALL ID</U> = The original Call ID in the system before the Lead ID was switched.</QXZ><BR><QXZ><U>UNIQUEID</U> = The phone system uniqieid of the call that had its lead switched.</QXZ><BR><QXZ><U>PHONE</U> = The phone number of the lead that was switched.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when they switched the lead.</QXZ>
user_stats-pause_code_approvals Manager Pause Code Approvals for this Time Period <QXZ>This section will show the agent pause code approvals that this Manager User approved during the selected time period, only for pause codes that require manager approval, most recent approvals first.</QXZ><BR><QXZ><U>DATE TIME</U> = The date-time-stamp when the agent pause code was approved by this user.</QXZ><BR><QXZ><U>AGENT</U> = The User ID of the agent that had their pause code approved.</QXZ><BR><QXZ><U>AGENT USER GROUP</U> = The User Group of the agent at the time that they had their pause code approved.</QXZ><BR><QXZ><U>CAMPAIGN</U> = The campaign the agent was logged into when they had their pause code approved.</QXZ><BR><QXZ><U>PAUSE CODE</U> = The pause code that was approved.</QXZ>
+155 -81
View File
@@ -63,6 +63,7 @@
# 200501-0811 - Added NVAuser option for NVA recordings user column
# 200702-1710 - Added ANI to INBOUND/CLOSER records for NVAuser, added secondary check to find lead ID for DIDs
# 210317-0058 - Changed lead-modify page links to javascript because of Chrome
# 210319-1338 - Added HELP pop-ups for each section, added agent browser visibility log stats to agent activity section, reformatted most sections
#
$startMS = microtime();
@@ -141,7 +142,7 @@ if ($qm_conf_ct > 0)
### ARCHIVED DATA CHECK CONFIGURATION
$archives_available="N";
$log_tables_array=array("vicidial_log", "vicidial_agent_log", "vicidial_closer_log", "vicidial_user_log", "vicidial_timeclock_log", "vicidial_user_closer_log", "vicidial_email_log", "call_log", "recording_log", "user_call_log", "vicidial_lead_search_log", "vicidial_agent_skip_log");
$log_tables_array=array("vicidial_log", "vicidial_agent_log", "vicidial_closer_log", "vicidial_user_log", "vicidial_timeclock_log", "vicidial_user_closer_log", "vicidial_email_log", "call_log", "recording_log", "user_call_log", "vicidial_lead_search_log", "vicidial_agent_skip_log","vicidial_agent_visibility_log");
for ($t=0; $t<count($log_tables_array); $t++)
{
$table_name=$log_tables_array[$t];
@@ -154,6 +155,7 @@ if ($search_archived_data)
$vicidial_closer_log_table=use_archive_table("vicidial_closer_log");
$vicidial_user_log_table=use_archive_table("vicidial_user_log");
$vicidial_agent_log_table=use_archive_table("vicidial_agent_log");
$vicidial_agent_visibility_log_table="vicidial_agent_visibility_log";
$vicidial_timeclock_log_table=use_archive_table("vicidial_timeclock_log");
$vicidial_user_closer_log_table=use_archive_table("vicidial_user_closer_log");
$vicidial_email_log_table=use_archive_table("vicidial_email_log");
@@ -170,6 +172,7 @@ else
$vicidial_closer_log_table="vicidial_closer_log";
$vicidial_user_log_table="vicidial_user_log";
$vicidial_agent_log_table="vicidial_agent_log";
$vicidial_agent_visibility_log_table="vicidial_agent_visibility_log";
$vicidial_timeclock_log_table="vicidial_timeclock_log";
$vicidial_user_closer_log_table="vicidial_user_closer_log";
$vicidial_email_log_table="vicidial_email_log";
@@ -451,7 +454,12 @@ else
$HEADER.="<html>\n";
$HEADER.="<head>\n";
$HEADER.="<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
$HEADER.="<script language=\"JavaScript\" src=\"help.js\"></script>\n";
$HEADER.="<link rel=\"stylesheet\" href=\"calendar.css\">\n";
$HEADER.="<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
$HEADER.="<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>\n";
$HEADER.="<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
if ($did > 0)
@@ -491,10 +499,12 @@ if ($did > 0)
##### END Set variables to make header show properly #####
#require("admin_header.php");
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
$MAIN.="<TABLE WIDTH=770 BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR BGCOLOR=#E6E6E6><TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>\n";
$MAIN.="<TABLE WIDTH=970 BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR BGCOLOR=#E6E6E6><TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>\n";
if ($did > 0)
{$MAIN.="<B> &nbsp; "._QXZ("DID Call Stats for")." $user";}
else
@@ -537,20 +547,20 @@ $MAIN.=" 'controlname': 'end_date'\n";
$MAIN.="});\n";
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
$MAIN.="</script>\n";
$MAIN.="</script> $NWB#user_stats-date_field$NWE\n";
if (strlen($user)>1)
{$MAIN.="<input type=hidden name=user value=\"$user\"> &nbsp; &nbsp; &nbsp; \n";}
else
{$MAIN.="<input type=text name=user size=12 maxlength=10> &nbsp; &nbsp; &nbsp; \n";}
$MAIN.=_QXZ("Call status").": <input type=text name=call_status size=7 maxlength=6 value=\"$call_status\">\n";
$MAIN.=_QXZ("Call status").": <input type=text name=call_status size=7 maxlength=6 value=\"$call_status\"> $NWB#user_stats-call_status$NWE\n";
if ($archives_available=="Y")
{
$MAIN.="<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
$MAIN.=" &nbsp; <input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")." $NWB#user_stats-search_archived_data$NWE\n";
}
$MAIN.="<input style='background-color:#$SSbutton_color' type=submit name=submit value='"._QXZ("submit")."'>\n";
$MAIN.=" &nbsp; <input style='background-color:#$SSbutton_color' type=submit name=submit value='"._QXZ("submit")."'>\n";
$MAIN.=" &nbsp; &nbsp; &nbsp; $user - $full_name<BR><BR>\n";
@@ -582,12 +592,12 @@ if ($pause_code_rpt >= 1)
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
$rows_to_print = mysqli_num_rows($rslt);
$MAIN.="<B>"._QXZ("AGENT PAUSE LOGS").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=11'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Pause Logs").": $NWB#user_stats-agent_pause_logs$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=11'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<center><TABLE width=600 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=2>"._QXZ("EVENT TIME")."</td><td align=right><font size=2>"._QXZ("CAMPAIGN ID")."</td><td align=right><font size=2>"._QXZ("USER GROUP")."</td><td align=right><font size=2>"._QXZ("PAUSE CODE")."</td><td align=right><font size=2>"._QXZ("PAUSE LENGTH (HH:MM:SS)")."</td></tr>\n";
$CSV_text11.="\""._QXZ("AGENT PAUSE LOGS")."\"\n";
$CSV_text11.="\""._QXZ("Agent Pause Logs")."\"\n";
$CSV_text11.="\"\",\""._QXZ("EVENT TIME")."\",\""._QXZ("CAMPAIGN ID")."\",\""._QXZ("USER GROUP")."\",\""._QXZ("PAUSE CODE")."\",\""._QXZ("PAUSE LENGTH (HH:MM:SS)")."\"\n";
$o=0; $total_pause_time=0;
@@ -625,12 +635,12 @@ elseif ($park_rpt >= 1)
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
$rows_to_print = mysqli_num_rows($rslt);
$MAIN.="<B>"._QXZ("AGENT PARKED CALL LOGS").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=12'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Parked Call Logs").": $NWB#user_stats-agent_parked_call_logs$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=12'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<center><TABLE width=600 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=2>"._QXZ("PARKED TIME")."</td><td align=right><font size=2>"._QXZ("STATUS")."</td><td align=right><font size=2>"._QXZ("LEAD ID")."</td><td align=right><font size=2>"._QXZ("PARKED SEC")."</td></tr>\n";
$CSV_text12.="\""._QXZ("AGENT PARKED CALL LOGS")."\"\n";
$CSV_text12.="\""._QXZ("Agent Parked Call Logs")."\"\n";
$CSV_text12.="\"\",\""._QXZ("PARKED TIME")."\",\""._QXZ("STATUS")."\",\""._QXZ("LEAD ID")."\",\""._QXZ("PARKED SEC")."\"\n";
$o=0; $total_park_time=0;
@@ -665,12 +675,12 @@ else
if ($did < 1)
{
##### vicidial agent talk time and status #####
$MAIN.="<B>"._QXZ("AGENT TALK TIME AND STATUS").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=1'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Talk Time and Status").": $NWB#user_stats-agent_talk_time_and_status$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=1'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=2>"._QXZ("STATUS")."</td><td align=right><font size=2>"._QXZ("COUNT")."</td><td align=right><font size=2>"._QXZ("HOURS:MM:SS")."</td></tr>\n";
$CSV_text1.="\""._QXZ("AGENT TALK TIME AND STATUS")."\"\n";
$CSV_text1.="\""._QXZ("Agent Talk Time and Status")."\"\n";
$CSV_text1.="\"\",\""._QXZ("STATUS")."\",\""._QXZ("COUNT")."\",\""._QXZ("HOURS:MM:SS")."\"\n";
$stmt="SELECT count(*),status, sum(length_in_sec) from ".$vicidial_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $query_call_status group by status order by status";
@@ -755,11 +765,11 @@ else
$MAIN.="<center>\n";
$MAIN.="<B>"._QXZ("AGENT LOGIN/LOGOUT TIME").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=2'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=850 cellspacing=0 cellpadding=1>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Login and Logout Time").": $NWB#user_stats-agent_login_and_logout_time$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=2'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=2>"._QXZ("EVENT")." </td><td align=right><font size=2> "._QXZ("DATE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("GROUP")."</td><td align=right><font size=2>"._QXZ("SESSION")."<BR>"._QXZ("HOURS:MM:SS")."</td><td align=right><font size=2>"._QXZ("SERVER")."</td><td align=right><font size=2>"._QXZ("PHONE")."</td><td align=right><font size=2>"._QXZ("COMPUTER")."</td><td align=right><font size=2>"._QXZ("PHONE")."<BR>"._QXZ("LOGIN")."</td><td align=right><font size=2>"._QXZ("PHONE IP")."</td></tr>\n";
$CSV_text2.="\""._QXZ("AGENT LOGIN/LOGOUT TIME")."\"\n";
$CSV_text2.="\""._QXZ("Agent Login and Logout Time")."\"\n";
$CSV_text2.="\"\",\""._QXZ("EVENT")."\",\""._QXZ("DATE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("GROUP")."\",\""._QXZ("HOURS:MM:SS")."\",\""._QXZ("SESSION")."\",\""._QXZ("SERVER")."\",\""._QXZ("PHONE")."\",\""._QXZ("COMPUTER")."\",\""._QXZ("PHONE_LOGIN")."\",\""._QXZ("PHONE_IP")."\"\n";
$stmt="SELECT event,event_epoch,event_date,campaign_id,user_group,session_id,server_ip,extension,computer_ip,phone_login,phone_ip from ".$vicidial_user_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by event_date;";
@@ -861,10 +871,10 @@ else
$MAIN.="<center>\n";
$MAIN.="<B>"._QXZ("TIMECLOCK LOGIN/LOGOUT TIME").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=3'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Timeclock Login and Logout Time").": $NWB#user_stats-timeclock_login_and_logout_time$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=3'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=550 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=2>"._QXZ("ID")." </td><td><font size=2>"._QXZ("EDIT")." </td><td align=right><font size=2>"._QXZ("EVENT")." </td><td align=right><font size=2> "._QXZ("DATE")."</td><td align=right><font size=2> "._QXZ("IP ADDRESS")."</td><td align=right><font size=2> "._QXZ("GROUP")."</td><td align=right><font size=2>"._QXZ("HOURS:MM:SS")."</td></tr>\n";
$CSV_text3.="\""._QXZ("TIMECLOCK LOGIN/LOGOUT TIME")."\"\n";
$CSV_text3.="\""._QXZ("Timeclock Login and Logout Time")."\"\n";
$CSV_text3.="\"\",\""._QXZ("ID")."\",\""._QXZ("EDIT")."\",\""._QXZ("EVENT")."\",\""._QXZ("DATE")."\",\""._QXZ("IPADDRESS")."\",\""._QXZ("GROUP")."\",\""._QXZ("HOURS:MM:SS")."\"\n";
$stmt="SELECT event,event_epoch,user_group,login_sec,ip_address,timeclock_id,manager_user from ".$vicidial_timeclock_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_epoch >= '$SQepoch' and event_epoch <= '$EQepoch';";
@@ -944,11 +954,11 @@ else
$MAIN.="<center>\n";
$MAIN.="<B>"._QXZ("CLOSER IN-GROUP SELECTION LOGS").":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=4'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=670 cellspacing=0 cellpadding=1>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Closer In-Group Selection Logs").": $NWB#user_stats-closer_ingroup_selection_logs$NWE </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=4'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2> "._QXZ("CAMPAIGN")."</td><td align=left><font size=2>"._QXZ("BLEND")."</td><td align=left><font size=2> "._QXZ("GROUPS")."</td><td align=left><font size=2> "._QXZ("MANAGER")."</td></tr>\n";
$CSV_text4.="\""._QXZ("CLOSER IN-GROUP SELECTION LOGS")."\"\n";
$CSV_text4.="\""._QXZ("Closer In-Group Selection Logs")."\"\n";
$CSV_text4.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("BLEND")."\",\""._QXZ("GROUPS")."\",\""._QXZ("MANAGER")."\"\n";
$stmt="SELECT user,campaign_id,event_date,blended,closer_campaigns,manager_change from ".$vicidial_user_closer_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by event_date desc limit 1000;";
@@ -982,7 +992,7 @@ else
##### vicidial agent outbound calls for this time period #####
$MAIN.="<B>"._QXZ("OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=5'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Outbound Calls for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-outbound_calls$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=5'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=700 cellspacing=0 cellpadding=1>\n";
if ($firstlastname_display_user_stats > 0)
{
@@ -992,7 +1002,7 @@ else
{
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("GROUP")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td></tr>\n";
}
$CSV_text5.="\""._QXZ("OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text5.="\""._QXZ("Outbound Calls for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
if ($firstlastname_display_user_stats > 0)
{$CSV_text5.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LENGTH")."\",\""._QXZ("STATUS")."\",\""._QXZ("PHONE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("GROUP")."\",\""._QXZ("LIST")."\",\""._QXZ("LEAD")."\",\""._QXZ("NAME")."\",\""._QXZ("HANGUP REASON")."\"\n";}
else
@@ -1071,10 +1081,10 @@ else
if ($allow_emails>0)
{
$MAIN.="<B>"._QXZ("OUTBOUND EMAILS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=5'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=670 cellspacing=0 cellpadding=3>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("USER")."</td><td align=left><font size=2> "._QXZ("CAMPAIGN")."</td><td align=left><font size=2> "._QXZ("EMAIL TO")."</td><td align=right><font size=2> "._QXZ("ATTACHMENTS")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td></tr>\n";
$CSV_text5.="\""._QXZ("OUTBOUND EMAILS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Outbound Emails for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-outbound_emails$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=5'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=3>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2> "._QXZ("CAMPAIGN")."</td><td align=left><font size=2> "._QXZ("EMAIL TO")."</td><td align=right><font size=2> "._QXZ("ATTACHMENTS")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td></tr>\n";
$CSV_text5.="\""._QXZ("Outbound Emails for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text5.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("USER")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("EMAIL TO")."\",\""._QXZ("ATTACHMENT")."\",\""._QXZ("LEAD")."\",\""._QXZ("MESSAGE")."\"\n";
$stmt="SELECT email_log_id,email_row_id,lead_id,email_date,user,email_to,message,campaign_id,attachments from ".$vicidial_email_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and email_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and email_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by email_date desc limit 10000;";
@@ -1096,16 +1106,15 @@ else
$MAIN .= "<tr $bgcolor>";
$MAIN .= "<td><font size=1>$u</td>";
$MAIN .= "<td align=left><font size=1> &nbsp; $row[3]</td>";
$MAIN .= "<td align=left><font size=2> &nbsp; $row[4] </td>\n";
$MAIN .= "<td align=left><font size=2> &nbsp; $row[3]</td>";
$MAIN .= "<td align=left><font size=2> &nbsp; $row[7]</td>\n";
$MAIN .= "<td align=left><font size=1> &nbsp; $row[5]</td>\n";
$MAIN .= "<td align=left><font size=1> &nbsp; $row[8] </td>\n";
$MAIN .= "<td align=left><font size=1> &nbsp; <A HREF=\"admin_modify_lead.php?lead_id=$row[2]\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$row[2]', '_blank');return false;\">$row[2]</A> </td>\n";
$MAIN .= "<td align=left><font size=2> &nbsp; $row[5]</td>\n";
$MAIN .= "<td align=left><font size=2> &nbsp; $row[8] </td>\n";
$MAIN .= "<td align=right><font size=2> &nbsp; <A HREF=\"admin_modify_lead.php?lead_id=$row[2]\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$row[2]', '_blank');return false;\">$row[2]</A> </td>\n";
$MAIN .= "</tr>\n";
$MAIN .= "<tr>";
$MAIN .= "<td><font size=1> &nbsp; </td>\n";
$MAIN .= "<td align=left colspan=6 $bgcolor><font size=1> "._QXZ("MESSAGE").": $row[6] </td>\n";
$MAIN .= "<td align=left colspan=5 $bgcolor><font size=1> "._QXZ("MESSAGE").": $row[6] </td>\n";
$MAIN .= "</tr>\n";
$CSV_text5.="\"\",\"$u\",\"$row[3]\",\"$row[4]\",\"$row[7]\",\"$row[5]\",\"$row[8]\",\"$row[2]\",\"$row[6]\"\n";
@@ -1117,24 +1126,24 @@ else
##### vicidial agent inbound calls for this time period #####
$MAIN.="<B>"._QXZ("INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=6'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Inbound Closer Calls for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-inbound_calls$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=6'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
if ($firstlastname_display_user_stats > 0)
{
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("WAIT (S)")."</td><td align=right><font size=2> "._QXZ("AGENT (S)")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("NAME")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td></tr>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("IN-GROUP")."</td><td align=right><font size=2> "._QXZ("WAIT (S)")."</td><td align=right><font size=2> "._QXZ("AGENT (S)")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("NAME")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td></tr>\n";
}
else
{
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("WAIT (S)")."</td><td align=right><font size=2> "._QXZ("AGENT (S)")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td></tr>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("IN-GROUP")."</td><td align=right><font size=2> "._QXZ("WAIT (S)")."</td><td align=right><font size=2> "._QXZ("AGENT (S)")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td></tr>\n";
}
$CSV_text6.="\""._QXZ("INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text6.="\""._QXZ("Inbound Closer Calls for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
if ($firstlastname_display_user_stats > 0)
{
$CSV_text6.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LENGTH")."\",\""._QXZ("STATUS")."\",\""._QXZ("PHONE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("WAIT(S)")."\",\""._QXZ("AGENT(S)")."\",\""._QXZ("LIST")."\",\""._QXZ("LEAD")."\",\""._QXZ("NAME")."\",\""._QXZ("HANGUP REASON")."\"\n";
$CSV_text6.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LENGTH")."\",\""._QXZ("STATUS")."\",\""._QXZ("PHONE")."\",\""._QXZ("IN-GROUP")."\",\""._QXZ("WAIT(S)")."\",\""._QXZ("AGENT(S)")."\",\""._QXZ("LIST")."\",\""._QXZ("LEAD")."\",\""._QXZ("NAME")."\",\""._QXZ("HANGUP REASON")."\"\n";
}
else
{
$CSV_text6.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LENGTH")."\",\""._QXZ("STATUS")."\",\""._QXZ("PHONE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("WAIT(S)")."\",\""._QXZ("AGENT(S)")."\",\""._QXZ("LIST")."\",\""._QXZ("LEAD")."\",\""._QXZ("HANGUP REASON")."\"\n";
$CSV_text6.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LENGTH")."\",\""._QXZ("STATUS")."\",\""._QXZ("PHONE")."\",\""._QXZ("IN-GROUP")."\",\""._QXZ("WAIT(S)")."\",\""._QXZ("AGENT(S)")."\",\""._QXZ("LIST")."\",\""._QXZ("LEAD")."\",\""._QXZ("HANGUP REASON")."\"\n";
}
$stmt="SELECT call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason,closecallid from ".$vicidial_closer_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $query_call_status order by call_date desc limit 10000;";
@@ -1249,14 +1258,29 @@ else
##### vicidial agent activity records for this time period #####
if ($did < 1)
{
$MAIN.="<B>"._QXZ("AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=7'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td colspan=2><font size=1> &nbsp; </td><td colspan=6 align=center bgcolor=white><font size=1>"._QXZ("these fields are in seconds")." </td><td colspan=4><font size=1> &nbsp; </td></tr>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("PAUSE")."</td><td align=left><font size=2> "._QXZ("WAIT")."</td><td align=left><font size=2> "._QXZ("TALK")."</td><td align=right><font size=2> "._QXZ("DISPO")."</td><td align=right><font size=2> "._QXZ("DEAD")."</td><td align=right><font size=2> "._QXZ("CUSTOMER")."</td><td align=right><font size=2> "._QXZ("STATUS")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("TYPE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("PAUSE CODE")."</td></tr>\n";
$CSV_text7.="\""._QXZ("AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text7.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("PAUSE")."\",\""._QXZ("WAIT")."\",\""._QXZ("TALK")."\",\""._QXZ("DISPO")."\",\""._QXZ("DEAD")."\",\""._QXZ("CUSTOMER")."\",\""._QXZ("STATUS")."\",\""._QXZ("LEAD")."\",\""._QXZ("TYPE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("PAUSE CODE")."\"\n";
$Aevent_time=array();
$Alead_id=array();
$Acampaign_id=array();
$Apause_sec=array();
$Await_sec=array();
$Atalk_sec=array();
$Adispo_sec=array();
$Adead_sec=array();
$Astatus=array();
$Apause_code=array();
$Auser_group=array();
$Acomments=array();
$Acustomer_sec=array();
$Aagent_log_id=array();
$stmt="SELECT event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group,comments from ".$vicidial_agent_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) $query_call_status order by event_time desc limit 10000;";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Activity for this time period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-agent_activity$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=7'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td colspan=2><font size=1> &nbsp; </td><td colspan=8 align=center bgcolor=white><font size=1>"._QXZ("these fields are in seconds")." </td><td colspan=4><font size=1> &nbsp; </td></tr>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("PAUSE")."</td><td align=left><font size=2> "._QXZ("WAIT")."</td><td align=left><font size=2> "._QXZ("TALK")."</td><td align=right><font size=2> "._QXZ("DISPO")."</td><td align=right><font size=2> "._QXZ("DEAD")."</td><td align=right><font size=2> "._QXZ("CUSTOMER")."</td><td align=right><font size=2> "._QXZ("VISIBLE")."</td><td align=right><font size=2> "._QXZ("HIDDEN")."</td><td align=right><font size=2> "._QXZ("STATUS")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("TYPE")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("PAUSE CODE")."</td></tr>\n";
$CSV_text7.="\""._QXZ("Agent Activity for this time period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text7.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("PAUSE")."\",\""._QXZ("WAIT")."\",\""._QXZ("TALK")."\",\""._QXZ("DISPO")."\",\""._QXZ("DEAD")."\",\""._QXZ("CUSTOMER")."\",\""._QXZ("VISIBLE")."\",\""._QXZ("HIDDEN")."\",\""._QXZ("STATUS")."\",\""._QXZ("LEAD")."\",\""._QXZ("TYPE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("PAUSE CODE")."\"\n";
$stmt="SELECT event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group,comments,agent_log_id from ".$vicidial_agent_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) $query_call_status order by event_time desc limit 10000;";
if ($DB) {$MAIN.="agent activity|$stmt|";}
$rslt=mysql_to_mysqli($stmt, $link);
$logs_to_print = mysqli_num_rows($rslt);
@@ -1268,24 +1292,64 @@ else
$TOTALdispoSECONDS=0;
$TOTALdeadSECONDS=0;
$TOTALcustomerSECONDS=0;
$TOT_HIDDEN=0;
$TOT_VISIBLE=0;
while ($logs_to_print > $u)
{
$row=mysqli_fetch_row($rslt);
$event_time = $row[0];
$lead_id = $row[1];
$campaign_id = $row[2];
$pause_sec = $row[3];
$wait_sec = $row[4];
$talk_sec = $row[5];
$dispo_sec = $row[6];
$dead_sec = $row[7];
$status = $row[8];
$pause_code = $row[9];
$user_group = $row[10];
$comments = $row[11];
$customer_sec = ($talk_sec - $dead_sec);
if ($customer_sec < 0)
{$customer_sec=0;}
$Aevent_time[$u] = $row[0];
$Alead_id[$u] = $row[1];
$Acampaign_id[$u] = $row[2];
$Apause_sec[$u] = $row[3];
$Await_sec[$u] = $row[4];
$Atalk_sec[$u] = $row[5];
$Adispo_sec[$u] = $row[6];
$Adead_sec[$u] = $row[7];
$Astatus[$u] = $row[8];
$Apause_code[$u] = $row[9];
$Auser_group[$u] = $row[10];
$Acomments[$u] = $row[11];
$Aagent_log_id[$u] = $row[12];
$Acustomer_sec[$u] = ($Atalk_sec[$u] - $Adead_sec[$u]);
if ($Acustomer_sec[$u] < 0)
{$Acustomer_sec[$u]=0;}
$u++;
}
$u=0;
while ($logs_to_print > $u)
{
$event_time = $Aevent_time[$u];
$lead_id = $Alead_id[$u];
$campaign_id = $Acampaign_id[$u];
$pause_sec = $Apause_sec[$u];
$wait_sec = $Await_sec[$u];
$talk_sec = $Atalk_sec[$u];
$dispo_sec = $Adispo_sec[$u];
$dead_sec = $Adead_sec[$u];
$status = $Astatus[$u];
$pause_code = $Apause_code[$u];
$user_group = $Auser_group[$u];
$comments = $Acomments[$u];
$agent_log_id = $Aagent_log_id[$u];
$customer_sec = $Acustomer_sec[$u];
$HIDDEN_sec=0; $VISIBLE_sec=0;
$stmt="select count(*),sum(length_in_sec),visibility from ".$vicidial_agent_visibility_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and db_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and db_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' and visibility IN('HIDDEN','VISIBLE') and agent_log_id='$agent_log_id' group by visibility;";
$rslt=mysql_to_mysqli($stmt, $link);
$visibility_results = mysqli_num_rows($rslt);
if ($DB) {echo "$visibility_results|$stmt\n";}
$v_ct=0;
while ($visibility_results > $v_ct)
{
$row=mysqli_fetch_row($rslt);
if ($row[2] == 'HIDDEN') {$HIDDEN_sec = $row[1];}
if ($row[2] == 'VISIBLE') {$VISIBLE_sec = $row[1];}
$v_ct++;
}
$TOT_HIDDEN = ($TOT_HIDDEN + $HIDDEN_sec);
$TOT_VISIBLE = ($TOT_VISIBLE + $VISIBLE_sec);
if ($HIDDEN_sec < 1) {$HIDDEN_sec='';}
if ($VISIBLE_sec < 1) {$VISIBLE_sec='';}
if (preg_match("/1$|3$|5$|7$|9$/i", $u))
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
@@ -1321,6 +1385,8 @@ else
$MAIN.="<td align=right><font size=2> &nbsp; </td>\n";
$MAIN.="<td align=right><font size=2> &nbsp; </td>\n";
$MAIN.="<td align=right><font size=2> &nbsp; </td>\n";
$MAIN.="<td align=right><font size=2> &nbsp; </td>\n";
$MAIN.="<td align=right><font size=2> &nbsp; </td>\n";
$MAIN.="<td align=right><font size=2> &nbsp; </td></tr>\n";
}
@@ -1334,6 +1400,8 @@ else
$MAIN.="<td align=right><font size=2> $dispo_sec </td>\n";
$MAIN.="<td align=right><font size=2> $dead_sec </td>\n";
$MAIN.="<td align=right><font size=2> $customer_sec </td>\n";
$MAIN.="<td align=right><font size=2> $VISIBLE_sec </td>\n";
$MAIN.="<td align=right><font size=2> $HIDDEN_sec </td>\n";
$MAIN.="<td align=right><font size=2> $status </td>\n";
$MAIN.="<td align=right><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$lead_id\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$lead_id', '_blank');return false;\">$lead_id</A> </td>\n";
$call_type='';
@@ -1350,7 +1418,7 @@ else
{$MAIN.="<td align=right><font size=2> &nbsp;</td>\n";}
$MAIN.="<td align=right><font size=2> $campaign_id </td>\n";
$MAIN.="<td align=right><font size=2> $pause_code </td></tr>\n";
$CSV_text7.="\"\",\"$u\",\"$event_time\",\"$pause_sec\",\"$wait_sec\",\"$talk_sec\",\"$dispo_sec\",\"$dead_sec\",\"$customer_sec\",\"$status\",\"$lead_id\",\"$call_type\",\"$campaign_id\",\"$pause_code \"\n";
$CSV_text7.="\"\",\"$u\",\"$event_time\",\"$pause_sec\",\"$wait_sec\",\"$talk_sec\",\"$dispo_sec\",\"$dead_sec\",\"$customer_sec\",\"$VISIBLE_sec\",\"$HIDDEN_sec\",\"$status\",\"$lead_id\",\"$call_type\",\"$campaign_id\",\"$pause_code \"\n";
}
$MAIN.="<tr bgcolor=white>";
@@ -1361,8 +1429,10 @@ else
$MAIN.="<td align=right><font size=2> $TOTALdispoSECONDS</td>\n";
$MAIN.="<td align=right><font size=2> $TOTALdeadSECONDS</td>\n";
$MAIN.="<td align=right><font size=2> $TOTALcustomerSECONDS</td>\n";
$MAIN.="<td colspan=4><font size=2> &nbsp; </td></tr>\n";
$CSV_text7.="\"\",\"\",\""._QXZ("TOTALS")."\",\"$TOTALpauseSECONDS\",\"$TOTALwaitSECONDS\",\"$TOTALtalkSECONDS\",\"$TOTALdispoSECONDS\",\"$TOTALdeadSECONDS\",\"$TOTALcustomerSECONDS\"\n";
$MAIN.="<td align=right><font size=2> $TOT_VISIBLE</td>\n";
$MAIN.="<td align=right><font size=2> $TOT_HIDDEN</td>\n";
$MAIN.="<td colspan=5><font size=2> &nbsp; </td></tr>\n";
$CSV_text7.="\"\",\"\",\""._QXZ("TOTALS")."\",\"$TOTALpauseSECONDS\",\"$TOTALwaitSECONDS\",\"$TOTALtalkSECONDS\",\"$TOTALdispoSECONDS\",\"$TOTALdeadSECONDS\",\"$TOTALcustomerSECONDS\",\"$TOT_VISIBLE\",\"$TOT_HIDDEN\"\n";
$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H');
$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H');
@@ -1370,6 +1440,8 @@ else
$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H');
$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H');
$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H');
$TOTALvisibleSECONDShh = sec_convert($TOT_VISIBLE,'H');
$TOTALhiddenSECONDShh = sec_convert($TOT_HIDDEN,'H');
$MAIN.="<tr bgcolor=white>";
$MAIN.="<td colspan=2><font size=1>"._QXZ("(in HH:MM:SS)")."</td>";
@@ -1379,10 +1451,12 @@ else
$MAIN.="<td align=right><font size=2> $TOTALdispoSECONDShh</td>\n";
$MAIN.="<td align=right><font size=2> $TOTALdeadSECONDShh</td>\n";
$MAIN.="<td align=right><font size=2> $TOTALcustomerSECONDShh</td>\n";
$MAIN.="<td colspan=4><font size=2> &nbsp; </td></tr>\n";
$CSV_text7.="\"\",\"\",\""._QXZ("(in HH:MM:SS)")."\",\"$TOTALpauseSECONDShh\",\"$TOTALwaitSECONDShh\",\"$TOTALtalkSECONDShh\",\"$TOTALdispoSECONDShh\",\"$TOTALdeadSECONDShh\",\"$TOTALcustomerSECONDShh\"\n";
$MAIN.="<td align=right><font size=2> $TOTALvisibleSECONDShh</td>\n";
$MAIN.="<td align=right><font size=2> $TOTALhiddenSECONDShh</td>\n";
$MAIN.="<td colspan=5><font size=2> &nbsp; </td></tr>\n";
$CSV_text7.="\"\",\"\",\""._QXZ("(in HH:MM:SS)")."\",\"$TOTALpauseSECONDShh\",\"$TOTALwaitSECONDShh\",\"$TOTALtalkSECONDShh\",\"$TOTALdispoSECONDShh\",\"$TOTALdeadSECONDShh\",\"$TOTALcustomerSECONDShh\",\"$TOTALvisibleSECONDShh\",\"$TOTALhiddenSECONDShh\"\n";
$MAIN.="</TABLE></center><BR><BR>\n";
$MAIN.="</TABLE><BR><BR>\n";
}
@@ -1403,10 +1477,10 @@ else
$ANI_column = "<td align=center><font size=2>"._QXZ("ANI")." &nbsp; </td>";
$ANI_column_csv = ",\""._QXZ("ANI")."\"";
}
$MAIN.="<B>"._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=8'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Recordings for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-recordings$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=8'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td>$agent_column<td align=left><font size=2> "._QXZ("LEAD")."</td>$ANI_column<td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("SECONDS")." </td><td align=left><font size=2> &nbsp; "._QXZ("RECID")."</td><td align=center><font size=2>"._QXZ("FILENAME")."</td><td align=center><font size=2>"._QXZ("LOCATION")." &nbsp; </td>$mute_column</tr>\n";
$CSV_text8.="\""._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text8.="\""._QXZ("Recordings for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text8.="\"\",\"#\"$agent_column_csv,\""._QXZ("LEAD")."\",\"$ANI_column_csv\",\""._QXZ("DATE/TIME")."\",\""._QXZ("SECONDS")."\",\""._QXZ("RECID")."\",\""._QXZ("FILENAME")."\",\""._QXZ("LOCATION")."\"$mute_column_csv\n";
if (strlen($query_call_status) > 5)
@@ -1546,10 +1620,10 @@ else
{
##### vicidial agent outbound user manual calls for this time period #####
$MAIN.="<B>"._QXZ("MANUAL OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=9'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Manual Outbound Calls for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-manual_calls$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=9'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2> "._QXZ("CALL TYPE")."</td><td align=left><font size=2> "._QXZ("SERVER")."</td><td align=left><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> "._QXZ("DIALED")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("CALLERID")."</td><td align=right><font size=2> "._QXZ("ALIAS")."</td><td align=right><font size=2> "._QXZ("PRESET")."</td><td align=right><font size=2>"._QXZ("C3HU")."</td></tr>\n";
$CSV_text9.="\""._QXZ("MANUAL OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text9.="\""._QXZ("Manual Outbound Calls for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text9.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("CALL TYPE")."\",\""._QXZ("SERVER")."\",\""._QXZ("PHONE")."\",\""._QXZ("DIALED")."\",\""._QXZ("LEAD")."\",\""._QXZ("CALLERID")."\",\""._QXZ("ALIAS")."\",\""._QXZ("PRESET")."\",\""._QXZ("C3HU")."\"\n";
$stmt="SELECT call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id,preset_name,customer_hungup,customer_hungup_seconds from ".$user_call_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by call_date desc limit 10000;";
@@ -1628,10 +1702,10 @@ else
{
##### vicidial lead searches for this time period #####
$MAIN.="<B>"._QXZ("LEAD SEARCHES FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=10'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Lead Searches for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-lead_searches$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=10'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>"._QXZ("DATE/TIME")." &nbsp; </td><td align=left NOWRAP><font size=2> "._QXZ("TYPE")." &nbsp; </td><td align=left NOWRAP><font size=2> "._QXZ("RESULTS")." &nbsp; </td><td align=left NOWRAP><font size=2> "._QXZ("SEC")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("QUERY")."</td></tr>\n";
$CSV_text10.="\""._QXZ("LEAD SEARCHES FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text10.="\""._QXZ("Lead Searches for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text10.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("TYPE")."\",\""._QXZ("RESULTS")."\",\""._QXZ("SEC")."\",\""._QXZ("QUERY")."\"\n";
$stmt="SELECT event_date,source,results,seconds,search_query from ".$vicidial_lead_search_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by event_date desc limit 10000;";
@@ -1670,10 +1744,10 @@ else
{
##### vicidial agent manual dial lead preview skips for this time period #####
$MAIN.="<B>"._QXZ("PREVIEW LEAD SKIPS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=11'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Preview Lead Skips for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-preview_skips$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=11'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>"._QXZ("DATE/TIME")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("LEAD ID")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("STATUS")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("COUNT")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("CAMPAIGN")."</td></tr>\n";
$CSV_text11.="\""._QXZ("PREVIEW LEAD SKIPS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text11.="\""._QXZ("Preview Lead Skips for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text11.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LEAD ID")."\",\""._QXZ("STATUS")."\",\""._QXZ("COUNT")."\",\""._QXZ("CAMPAIGN")."\"\n";
$stmt="SELECT user,event_date,lead_id,campaign_id,previous_status,previous_called_count from ".$vicidial_agent_skip_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and event_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by event_date desc limit 10000;";
@@ -1702,10 +1776,10 @@ else
$MAIN.="</TABLE><BR><BR>\n";
##### BEGIN switch lead log entries #####
$MAIN.="<B>"._QXZ("AGENT LEAD SWITCHES FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=13'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Agent Lead Switches for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-switch_leads$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=13'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>"._QXZ("DATE/TIME")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("FROM LEAD ID")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("TO LEAD ID")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("CALL ID")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("UNIQUEID")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("PHONE")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("CAMPAIGN")."</td></tr>\n";
$CSV_text13.="\""._QXZ("AGENT LEAD SWITCHES FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text13.="\""._QXZ("Agent Lead Switches for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text13.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("FROM LEAD ID")."\",\""._QXZ("TO LEAD ID")."\",\""._QXZ("CALL ID")."\",\""._QXZ("UNIQUEID")."\",\""._QXZ("PHONE")."\",\""._QXZ("CAMPAIGN")."\"\n";
$stmt="SELECT event_time,lead_id,stage,caller_code,uniqueid,comments,campaign_id from ".$vicidial_agent_function_log." where user='" . mysqli_real_escape_string($link, $user) . "' and event_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' and function='switch_lead' order by event_time desc limit 10000;";
@@ -1736,10 +1810,10 @@ else
$MAIN.="</TABLE><BR><BR>\n";
##### BEGIN manager pause code approval entries #####
$MAIN.="<B>"._QXZ("MANAGER PAUSE CODE APPROVALS FOR THIS TIME PERIOD: (10000 record limit)")."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=14'>["._QXZ("DOWNLOAD")."]</a></B>\n";
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Manager Pause Code Approvals for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-pause_code_approvals$NWE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='$download_link&file_download=14'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>"._QXZ("DATE/TIME")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("AGENT")." &nbsp; </td><td align=center NOWRAP><font size=2> "._QXZ("AGENT USER GROUP")." &nbsp; </td><td align=center NOWRAP><font size=2> "._QXZ("CAMPAIGN")." &nbsp; </td><td align=right NOWRAP><font size=2> "._QXZ("PAUSE CODE")." &nbsp; </td></tr>\n";
$CSV_text14.="\""._QXZ("MANAGER PAUSE CODE APPROVALS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
$CSV_text14.="\""._QXZ("Manager Pause Code Approvals for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
$CSV_text14.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("AGENT")."\",\""._QXZ("AGENT USER GROUP")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("PAUSE CODE")."\"\n";
$stmt="SELECT event_time,user,user_group,campaign_id,comments from ".$vicidial_agent_function_log." where stage='" . mysqli_real_escape_string($link, $user) . "' and event_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and event_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' and function='mgrapr_pause_code' order by event_time desc limit 10000;";