From 9e4893aa2519a47bec92e6706e0b16509bfc163f Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 2 Mar 2016 03:14:49 +0000 Subject: [PATCH] Lengthened user name field in Agent status and time detail reports git-svn-id: svn://192.168.202.10@2483 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../www/vicidial/AST_agent_status_detail.php | 41 +++++++++-------- .../www/vicidial/AST_agent_time_detail.php | 44 ++++++++++--------- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php index f8f11924..c5a8eef7 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php @@ -29,6 +29,7 @@ # 150603-1532 - Statuses are now sorted in alphabetical order # 151112-1345 - Added ability to search archive logs and show defunct users # 160121-2209 - Added report title header, default report format, cleaned up formatting +# 160301-2051 - Expanded full name to 25 characters on text display # $startMS = microtime(); @@ -629,9 +630,9 @@ else if ($file_download < 1) { $ASCII_text.="CALLS STATS BREAKDOWN:\n"; - $ASCII_text.="+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - $ASCII_text.="| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; - $ASCII_text.="+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; + $ASCII_text.="+---------------------------+----------+--------+--------+--------+$statusesHEAD\n"; + $ASCII_text.="| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + $ASCII_text.="+---------------------------+----------+--------+--------+--------+$statusesHEAD\n"; for ($i=0; $i15) {$Sfull_name = substr("$Sfull_name", 0, -1);} - $Suser = sprintf("%-8s", $Suser); - while(strlen($Suser)>8) {$Suser = substr("$Suser", 0, -1);} - } - else - { - $Sfull_name= sprintf("%-45s", $Sfull_name); - while(mb_strlen($Sfull_name,'utf-8')>15) {$Sfull_name = mb_substr("$Sfull_name", 0, -1,'utf-8');} + if ($non_latin < 1) + { + $Sfull_name= sprintf("%-25s", $Sfull_name); + while(strlen($Sfull_name)>25) {$Sfull_name = substr("$Sfull_name", 0, -1);} + $Suser = sprintf("%-8s", $Suser); + while(strlen($Suser)>8) {$Suser = substr("$Suser", 0, -1);} + } + else + { + $Sfull_name= sprintf("%-45s", $Sfull_name); + while(mb_strlen($Sfull_name,'utf-8')>15) {$Sfull_name = mb_substr("$Sfull_name", 0, -1,'utf-8');} - $Suser = sprintf("%-24s", $Suser); - while(mb_strlen($Suser,'utf-8')>8) {$Suser = mb_substr("$Suser", 0, -1,'utf-8');} + $Suser = sprintf("%-24s", $Suser); + while(mb_strlen($Suser,'utf-8')>8) {$Suser = mb_substr("$Suser", 0, -1,'utf-8');} + } } - $DNCcountPCTs = ( MathZDC($DNCcount, $CIScount) * 100); $RAWdncPCT = $DNCcountPCTs; # $DNCcountPCTs = round($DNCcountPCTs,2); @@ -888,9 +891,9 @@ else if ($file_download < 1) { - $ASCII_text.="+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - $ASCII_text.="| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $CIScountTOT| $DNCcountPCT%|$SUMstatusesHTML\n"; - $ASCII_text.="+----------------------------+--------+--------+--------+$statusesHEAD\n"; + $ASCII_text.="+---------------------------+----------+--------+--------+--------+$statusesHEAD\n"; + $ASCII_text.="| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $CIScountTOT| $DNCcountPCT%|$SUMstatusesHTML\n"; + $ASCII_text.="+--------------------------------------+--------+--------+--------+$statusesHEAD\n"; $ASCII_text.="\n\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php index 2eebbe16..51ab6069 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php @@ -46,6 +46,7 @@ # 151110-1612 - Changed download function to always export time with hours # 151112-1335 - Added option to search archived tables # 160121-2037 - Added report title header, default report format, cleaned up formatting +# 160301-2051 - Expanded full name to 25 characters on text display # $startMS = microtime(); @@ -790,9 +791,9 @@ else if ($file_download < 1) { $ASCII_text.=_QXZ("AGENT TIME BREAKDOWN").":\n"; - $ASCII_text.="+-----------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - $ASCII_text.="| "._QXZ("USER NAME",15)." | "._QXZ("ID",8)." | "._QXZ("CALLS",8)." | "._QXZ("TIME CLOCK",10)." | "._QXZ("LOGIN TIME",10)." |$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)." | |$sub_statusesHTML\n"; - $ASCII_text.="+-----------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + $ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + $ASCII_text.="| "._QXZ("USER NAME",25)." | "._QXZ("ID",8)." | "._QXZ("CALLS",8)." | "._QXZ("TIME CLOCK",10)." | "._QXZ("LOGIN TIME",10)." |$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)." | |$sub_statusesHTML\n"; + $ASCII_text.="+---------------------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { @@ -1048,21 +1049,22 @@ else $graph_stats[$m][18]=trim($user_hpc); - if ($non_latin < 1) - { - $Sname[$m]= sprintf("%-15s", $Sname[$m]); - while(strlen($Sname[$m])>15) {$Sname[$m] = substr("$Sname[$m]", 0, -1);} - $Suser[$m] = sprintf("%-8s", $Suser[$m]); - while(strlen($Suser[$m])>8) {$Suser[$m] = substr("$Suser[$m]", 0, -1);} - } - else - { - $Sname[$m]= sprintf("%-45s", $Sname[$m]); - while(mb_strlen($Sname[$m],'utf-8')>15) {$Sname[$m] = mb_substr("$Sname[$m]", 0, -1,'utf-8');} - $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 ($non_latin < 1) + { + $Sname[$m]= sprintf("%-25s", $Sname[$m]); + while(strlen($Sname[$m])>25) {$Sname[$m] = substr("$Sname[$m]", 0, -1);} + $Suser[$m] = sprintf("%-8s", $Suser[$m]); + while(strlen($Suser[$m])>8) {$Suser[$m] = substr("$Suser[$m]", 0, -1);} + } + else + { + $Sname[$m]= sprintf("%-45s", $Sname[$m]); + while(mb_strlen($Sname[$m],'utf-8')>15) {$Sname[$m] = mb_substr("$Sname[$m]", 0, -1,'utf-8');} + $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) { @@ -1277,9 +1279,9 @@ else 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 | |$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 | |$SUMstatusesHTML\n"; + $ASCII_text.="+--------------------------------------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) { $ASCII_text.= " * "._QXZ("denotes AUTOLOGOUT from timeclock")."\n";