Added percentages to Agent Time Detail report

Fixed small issue with fcstats.php report

git-svn-id: svn://192.168.202.10@1842 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2012-07-19 18:16:31 +00:00
parent 60ce0e7fd3
commit f7f9dbff54
2 changed files with 67 additions and 15 deletions
@@ -392,17 +392,21 @@ else
$max_dead=1;
$max_customer=1;
$GRAPH="<a name='timegraph'/><table border='0' cellpadding='0' cellspacing='2' width='800'>";
$GRAPH2="<tr><th class='column_header grey_graph_cell' id='timegraph1'><a href='#' onClick=\"DrawGraph('CALLS', '1'); return false;\">CALLS</a></th><th class='column_header grey_graph_cell' id='timegraph2'><a href='#' onClick=\"DrawGraph('TIMECLOCK', '2'); return false;\">TIME CLOCK</a></th><th class='column_header grey_graph_cell' id='timegraph3'><a href='#' onClick=\"DrawGraph('AGENTTIME', '3'); return false;\">AGENT TIME</a></th><th class='column_header grey_graph_cell' id='timegraph4'><a href='#' onClick=\"DrawGraph('WAIT', '4'); return false;\">WAIT</a></th><th class='column_header grey_graph_cell' id='timegraph5'><a href='#' onClick=\"DrawGraph('TALK', '5'); return false;\">TALK</a></th><th class='column_header grey_graph_cell' id='timegraph10'><a href='#' onClick=\"DrawGraph('TALKPCT', '10'); return false;\">TALKTIME%</a></th><th class='column_header grey_graph_cell' id='timegraph6'><a href='#' onClick=\"DrawGraph('DISPO', '6'); return false;\">DISPO</a></th><th class='column_header grey_graph_cell' id='timegraph7'><a href='#' onClick=\"DrawGraph('PAUSE', '7'); return false;\">PAUSE</a></th><th class='column_header grey_graph_cell' id='timegraph8'><a href='#' onClick=\"DrawGraph('DEAD', '8'); return false;\">DEAD</a></th><th class='column_header grey_graph_cell' id='timegraph9'><a href='#' onClick=\"DrawGraph('CUSTOMER', '9'); return false;\">CUSTOMER</a></th>";
$GRAPH2="<tr><th class='column_header grey_graph_cell' id='timegraph1'><a href='#' onClick=\"DrawGraph('CALLS', '1'); return false;\">CALLS</a></th><th class='column_header grey_graph_cell' id='timegraph2'><a href='#' onClick=\"DrawGraph('TIMECLOCK', '2'); return false;\">TIME CLOCK</a></th><th class='column_header grey_graph_cell' id='timegraph3'><a href='#' onClick=\"DrawGraph('AGENTTIME', '3'); return false;\">AGENT TIME</a></th><th class='column_header grey_graph_cell' id='timegraph4'><a href='#' onClick=\"DrawGraph('WAIT', '4'); return false;\">WAIT</a></th><th class='column_header grey_graph_cell' id='timegraph14'><a href='#' onClick=\"DrawGraph('WAITPCT', '14'); return false;\">WAIT %</a></th><th class='column_header grey_graph_cell' id='timegraph5'><a href='#' onClick=\"DrawGraph('TALK', '5'); return false;\">TALK</a></th><th class='column_header grey_graph_cell' id='timegraph10'><a href='#' onClick=\"DrawGraph('TALKPCT', '10'); return false;\">TALKTIME%</a></th><th class='column_header grey_graph_cell' id='timegraph6'><a href='#' onClick=\"DrawGraph('DISPO', '6'); return false;\">DISPO</a></th><th class='column_header grey_graph_cell' id='timegraph11'><a href='#' onClick=\"DrawGraph('DISPOPCT', '11'); return false;\">DISPOTIME%</a></th><th class='column_header grey_graph_cell' id='timegraph7'><a href='#' onClick=\"DrawGraph('PAUSE', '7'); return false;\">PAUSE</a></th><th class='column_header grey_graph_cell' id='timegraph12'><a href='#' onClick=\"DrawGraph('PAUSEPCT', '12'); return false;\">PAUSETIME%</a></th><th class='column_header grey_graph_cell' id='timegraph8'><a href='#' onClick=\"DrawGraph('DEAD', '8'); return false;\">DEAD</a></th><th class='column_header grey_graph_cell' id='timegraph13'><a href='#' onClick=\"DrawGraph('DEADPCT', '13'); return false;\">DEADTIME%</a></th><th class='column_header grey_graph_cell' id='timegraph9'><a href='#' onClick=\"DrawGraph('CUSTOMER', '9'); return false;\">CUSTOMER</a></th>";
$graph_header="<table cellspacing='0' cellpadding='0' class='horizontalgraph'><caption align='top'>AGENT TIME BREAKDOWN</caption><tr><th class='thgraph' scope='col'>STATUS</th>";
$CALLS_graph=$graph_header."<th class='thgraph' scope='col'>CALLS </th></tr>";
$TIMECLOCK_graph=$graph_header."<th class='thgraph' scope='col'>TIME CLOCK</th></tr>";
$AGENTTIME_graph=$graph_header."<th class='thgraph' scope='col'>AGENT TIME</th></tr>";
$WAIT_graph=$graph_header."<th class='thgraph' scope='col'>WAIT</th></tr>";
$WAITPCT_graph=$graph_header."<th class='thgraph' scope='col'>WAIT %</th></tr>";
$TALK_graph=$graph_header."<th class='thgraph' scope='col'>TALK</th></tr>";
$TALKPCT_graph=$graph_header."<th class='thgraph' scope='col'>TALK TIME %</th></tr>";
$DISPO_graph=$graph_header."<th class='thgraph' scope='col'>DISPO</th></tr>";
$DISPOPCT_graph=$graph_header."<th class='thgraph' scope='col'>DISPO TIME %</th></tr>";
$PAUSE_graph=$graph_header."<th class='thgraph' scope='col'>PAUSE</th></tr>";
$PAUSEPCT_graph=$graph_header."<th class='thgraph' scope='col'>PAUSE TIME %</th></tr>";
$DEAD_graph=$graph_header."<th class='thgraph' scope='col'>DEAD</th></tr>";
$DEADPCT_graph=$graph_header."<th class='thgraph' scope='col'>DEAD TIME %</th></tr>";
$CUSTOMER_graph=$graph_header."<th class='thgraph' scope='col'>CUSTOMER</th></tr>";
while ($i < $users_to_print)
@@ -570,15 +574,15 @@ else
if ($file_download < 1)
{
$ASCII_text.="AGENT TIME BREAKDOWN:\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| <a href=\"$LINKbase&stage=NAME\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=LEADS\">CALLS</a> | <a href=\"$LINKbase&stage=TCLOCK\">TIME CLOCK</a> | <a href=\"$LINKbase&stage=TIME\">AGENT TIME</a> | WAIT | TALK | TALK TIME %| DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| <a href=\"$LINKbase&stage=NAME\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=LEADS\">CALLS</a> | <a href=\"$LINKbase&stage=TCLOCK\">TIME CLOCK</a> | <a href=\"$LINKbase&stage=TIME\">AGENT TIME</a> | WAIT | WAIT % | TALK | TALK TIME %| DISPO | DISPOTIME %| PAUSE | PAUSETIME %| DEAD | DEAD TIME %| CUSTOMER | |$sub_statusesHTML\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
}
else
{
$file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,TALK TIME %,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n";
$file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,WAIT %,TALK,TALK TIME %,DISPO,DISPO TIME %,PAUSE,PAUSE TIME %,DEAD,DEAD TIME %,CUSTOMER$sub_statusesFILE\n";
}
##### END print the output to screen or put into file output variable
@@ -598,7 +602,11 @@ else
$SstatusesHTML='';
$SstatusesFILE='';
$Stime[$m] = ($Swait[$m] + $Stalk[$m] + $Sdispo[$m] + $Spause[$m]);
$Swaitpct[$m]=(100*$Swait[$m]/$Stime[$m]);
$Stalkpct[$m]=(100*$Stalk[$m]/$Stime[$m]);
$Sdispopct[$m]=(100*$Sdispo[$m]/$Stime[$m]);
$Spausepct[$m]=(100*$Spause[$m]/$Stime[$m]);
$Sdeadpct[$m]=(100*$Sdead[$m]/$Stime[$m]);
$RAWuser = $Suser[$m];
$RAWcalls = $Scalls[$m];
$RAWtimeSEC = $Stime[$m];
@@ -611,7 +619,11 @@ else
if (trim($Spause[$m])>$max_pause) {$max_pause=trim($Spause[$m]);}
if (trim($Sdead[$m])>$max_dead) {$max_dead=trim($Sdead[$m]);}
if (trim($Scustomer[$m])>$max_customer) {$max_customer=trim($Scustomer[$m]);}
if (trim($Swaitpct[$m])>$max_waitpct) {$max_waitpct=trim($Swaitpct[$m]);}
if (trim($Stalkpct[$m])>$max_talkpct) {$max_talkpct=trim($Stalkpct[$m]);}
if (trim($Sdispopct[$m])>$max_dispopct) {$max_dispopct=trim($Sdispopct[$m]);}
if (trim($Spausepct[$m])>$max_pausepct) {$max_pausepct=trim($Spausepct[$m]);}
if (trim($Sdeadpct[$m])>$max_deadpct) {$max_deadpct=trim($Sdeadpct[$m]);}
$graph_stats[$m][1]=trim($Scalls[$m]);
$graph_stats[$m][3]=trim($Stime[$m]);
$graph_stats[$m][4]=trim($Swait[$m]);
@@ -621,8 +633,16 @@ else
$graph_stats[$m][8]=trim($Sdead[$m]);
$graph_stats[$m][9]=trim($Scustomer[$m]);
$graph_stats[$m][10]=trim(sprintf("%01.2f", $Stalkpct[$m]));
$graph_stats[$m][11]=trim(sprintf("%01.2f", $Sdispopct[$m]));
$graph_stats[$m][12]=trim(sprintf("%01.2f", $Spausepct[$m]));
$graph_stats[$m][13]=trim(sprintf("%01.2f", $Sdeadpct[$m]));
$graph_stats[$m][14]=trim(sprintf("%01.2f", $Swaitpct[$m]));
$Swaitpct[$m]= sprintf("%01.2f", $Swaitpct[$m]);
$Stalkpct[$m]= sprintf("%01.2f", $Stalkpct[$m]);
$Sdispopct[$m]= sprintf("%01.2f", $Sdispopct[$m]);
$Spausepct[$m]= sprintf("%01.2f", $Spausepct[$m]);
$Sdeadpct[$m]= sprintf("%01.2f", $Sdeadpct[$m]);
$Swait[$m]= sec_convert($Swait[$m],$TIME_agenttimedetail);
$Stalk[$m]= sec_convert($Stalk[$m],$TIME_agenttimedetail);
$Sdispo[$m]= sec_convert($Sdispo[$m],$TIME_agenttimedetail);
@@ -638,7 +658,11 @@ else
$RAWpause = $Spause[$m];
$RAWdead = $Sdead[$m];
$RAWcustomer = $Scustomer[$m];
$RAWwaitpct = $Swaitpct[$m];
$RAWtalkpct = $Stalkpct[$m];
$RAWdispopct = $Sdispopct[$m];
$RAWpausepct = $Spausepct[$m];
$RAWdeadpct = $Sdeadpct[$m];
$n=0;
$user_name_found=0;
@@ -753,7 +777,11 @@ else
}
### END loop through each status ###
$Swaitpct[$m]= sprintf("%9s", $Swaitpct[$m])."%";
$Stalkpct[$m]= sprintf("%9s", $Stalkpct[$m])."%";
$Sdispopct[$m]= sprintf("%9s", $Sdispopct[$m])."%";
$Spausepct[$m]= sprintf("%9s", $Spausepct[$m])."%";
$Sdeadpct[$m]= sprintf("%9s", $Sdeadpct[$m])."%";
$Swait[$m]= sprintf("%10s", $Swait[$m]);
$Stalk[$m]= sprintf("%10s", $Stalk[$m]);
$Sdispo[$m]= sprintf("%10s", $Sdispo[$m]);
@@ -781,7 +809,7 @@ else
if ($file_download < 1)
{
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n";
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | |$SstatusesHTML\n";
$graph_stats[$m][0]=trim("$Suser[$m] - $Sname[$m]");
#CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | | LOGIN | TRAIN | TOILET | PRECAL | BREAK | | LUNCH | LAGGED
}
@@ -789,13 +817,17 @@ else
{
if (strlen($RAWtime)<1) {$RAWtime='0';}
if (strlen($RAWwait)<1) {$RAWwait='0';}
if (strlen($RAWwaitpct)<0) {$RAWwaitpct='0.0%';}
if (strlen($RAWtalk)<1) {$RAWtalk='0';}
if (strlen($RAWtalkpct)<0) {$RAWtalkpct='0.0%';}
if (strlen($RAWdispo)<1) {$RAWdispo='0';}
if (strlen($RAWdispopct)<0) {$RAWdispopct='0.0%';}
if (strlen($RAWpause)<1) {$RAWpause='0';}
if (strlen($RAWpausepct)<0) {$RAWpausepct='0.0%';}
if (strlen($RAWdead)<1) {$RAWdead='0';}
if (strlen($RAWdeadpct)<0) {$RAWdeadpct='0.0%';}
if (strlen($RAWcustomer)<1) {$RAWcustomer='0';}
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWtalkpct %,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n";
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWwaitpct %,$RAWtalk,$RAWtalkpct %,$RAWdispo,$RAWdispopct %,$RAWpause,$RAWpausepct %,$RAWdead,$RAWdeadpct %,$RAWcustomer$SstatusesFILE\n";
}
$TOPsorted_output[$m] = $Toutput;
@@ -926,7 +958,11 @@ else
### END loop through each status ###
### call function to calculate and print dialable leads
$TOTwaitpct=sprintf("%01.2f", (100*$TOTwait/$TOTALtime));
$TOTtalkpct=sprintf("%01.2f", (100*$TOTtalk/$TOTALtime));
$TOTdispopct=sprintf("%01.2f", (100*$TOTdispo/$TOTALtime));
$TOTpausepct=sprintf("%01.2f", (100*$TOTpause/$TOTALtime));
$TOTdeadpct=sprintf("%01.2f", (100*$TOTdead/$TOTALtime));
$TOTwait = sec_convert($TOTwait,$TIME_agenttimedetail);
$TOTtalk = sec_convert($TOTtalk,$TIME_agenttimedetail);
$TOTdispo = sec_convert($TOTdispo,$TIME_agenttimedetail);
@@ -936,7 +972,11 @@ else
$TOTALtime = sec_convert($TOTALtime,$TIME_agenttimedetail);
$TOTtimeTC = sec_convert($TOTtimeTC,$TIME_agenttimedetail);
$hTOTwaitpct = sprintf("%10s", $TOTwaitpct)."%";
$hTOTtalkpct = sprintf("%10s", $TOTtalkpct)."%";
$hTOTdispopct = sprintf("%10s", $TOTdispopct)."%";
$hTOTpausepct = sprintf("%10s", $TOTpausepct)."%";
$hTOTdeadpct = sprintf("%10s", $TOTdeadpct)."%";
$hTOTcalls = sprintf("%8s", $TOTcalls);
$hTOTwait = sprintf("%11s", $TOTwait);
$hTOTtalk = sprintf("%11s", $TOTtalk);
@@ -952,9 +992,9 @@ else
if ($file_download < 1)
{
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| TOTALS AGENTS:$hTOT_AGENTS | $hTOTcalls |$hTOTtimeTC |$hTOTALtime |$hTOTwait |$hTOTtalk |$hTOTtalkpct |$hTOTdispo |$hTOTpause |$hTOTdead |$hTOTcustomer | |$SUMstatusesHTML\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
$ASCII_text.="| TOTALS AGENTS:$hTOT_AGENTS | $hTOTcalls |$hTOTtimeTC |$hTOTALtime |$hTOTwait |$hTOTwaitpct |$hTOTtalk |$hTOTtalkpct |$hTOTdispo |$hTOTdispopct |$hTOTpause |$hTOTpausepct |$hTOTdead |$hTOTdeadpct |$hTOTcustomer | |$SUMstatusesHTML\n";
$ASCII_text.="+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
if ($AUTOLOGOUTflag > 0)
{echo " * denotes AUTOLOGOUT from timeclock\n";}
$ASCII_text.="\n\n</PRE>";
@@ -963,7 +1003,7 @@ else
$Sstatus=$sub_statusesARY[$e];
$SstatusTXT=$Sstatus;
if ($Sstatus=="") {$SstatusTXT="(blank)";}
$GRAPH2.="<th class='column_header grey_graph_cell' id='timegraph".(10+$e)."'><a href='#' onClick=\"DrawGraph('$Sstatus', '".(10+$e)."'); return false;\">$SstatusTXT</a></th>";
$GRAPH2.="<th class='column_header grey_graph_cell' id='timegraph".(15+$e)."'><a href='#' onClick=\"DrawGraph('$Sstatus', '".(15+$e)."'); return false;\">$SstatusTXT</a></th>";
}
for ($d=0; $d<count($graph_stats); $d++) {
@@ -978,6 +1018,10 @@ else
$DEAD_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][8]/$max_dead)."' height='16' />".sec_convert($graph_stats[$d][8], 'HF')."</td></tr>";
$CUSTOMER_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][9]/$max_customer)."' height='16' />".sec_convert($graph_stats[$d][9], 'HF')."</td></tr>";
$TALKPCT_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][10]/$max_talkpct)."' height='16' />".$graph_stats[$d][10]." %</td></tr>";
$DISPOPCT_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][11]/$max_dispopct)."' height='16' />".$graph_stats[$d][11]." %</td></tr>";
$PAUSEPCT_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][12]/$max_pausepct)."' height='16' />".$graph_stats[$d][12]." %</td></tr>";
$DEADPCT_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][13]/$max_deadpct)."' height='16' />".$graph_stats[$d][13]." %</td></tr>";
$WAITPCT_graph.=" <tr><td class='chart_td$class'>".$graph_stats[$d][0]."</td><td nowrap class='chart_td value$class'><img src='images/bar.png' alt='' width='".round(400*$graph_stats[$d][14]/$max_waitpct)."' height='16' />".$graph_stats[$d][14]." %</td></tr>";
for ($e=0; $e<count($sub_statusesARY); $e++) {
$Sstatus=$sub_statusesARY[$e];
@@ -997,7 +1041,11 @@ else
$PAUSE_graph.="<tr><th class='thgraph' scope='col'>TOTAL:</th><th class='thgraph' scope='col'>".trim($hTOTpause)."</th></tr></table>";
$DEAD_graph.="<tr><th class='thgraph' scope='col'>TOTAL:</th><th class='thgraph' scope='col'>".trim($hTOTdead)."</th></tr></table>";
$CUSTOMER_graph.="<tr><th class='thgraph' scope='col'>TOTAL:</th><th class='thgraph' scope='col'>".trim($hTOTcustomer)."</th></tr></table>";
$WAITPCT_graph.="<tr><th class='thgraph' scope='col'>AVERAGE:</th><th class='thgraph' scope='col'>".trim($hTOTwaitpct)."</th></tr></table>";
$TALKPCT_graph.="<tr><th class='thgraph' scope='col'>AVERAGE:</th><th class='thgraph' scope='col'>".trim($hTOTtalkpct)."</th></tr></table>";
$DISPOPCT_graph.="<tr><th class='thgraph' scope='col'>AVERAGE:</th><th class='thgraph' scope='col'>".trim($hTOTdispopct)."</th></tr></table>";
$PAUSEPCT_graph.="<tr><th class='thgraph' scope='col'>AVERAGE:</th><th class='thgraph' scope='col'>".trim($hTOTpausepct)."</th></tr></table>";
$DEADPCT_graph.="<tr><th class='thgraph' scope='col'>AVERAGE:</th><th class='thgraph' scope='col'>".trim($hTOTdeadpct)."</th></tr></table>";
for ($e=0; $e<count($sub_statusesARY); $e++) {
$Sstatus=$sub_statusesARY[$e];
$total_var=$Sstatus."_total";
@@ -1016,7 +1064,11 @@ else
$JS_text.=" var PAUSE_graph=\"$PAUSE_graph\";\n";
$JS_text.=" var DEAD_graph=\"$DEAD_graph\";\n";
$JS_text.=" var CUSTOMER_graph=\"$CUSTOMER_graph\";\n";
$JS_text.=" var WAITPCT_graph=\"$WAITPCT_graph\";\n";
$JS_text.=" var TALKPCT_graph=\"$TALKPCT_graph\";\n";
$JS_text.=" var DISPOPCT_graph=\"$DISPOPCT_graph\";\n";
$JS_text.=" var PAUSEPCT_graph=\"$PAUSEPCT_graph\";\n";
$JS_text.=" var DEADPCT_graph=\"$DEADPCT_graph\";\n";
for ($e=0; $e<count($sub_statusesARY); $e++) {
$Sstatus=$sub_statusesARY[$e];
@@ -1024,7 +1076,7 @@ else
$JS_text.=" var ".$Sstatus."_graph=\"".$$graph_var."\";\n";
}
$JS_text.=" for (var i=1; i<=".(9+count($sub_statusesARY))."; i++) {\n";
$JS_text.=" for (var i=1; i<=".(14+count($sub_statusesARY))."; i++) {\n";
$JS_text.=" var cellID=\"timegraph\"+i;\n";
$JS_text.=" document.getElementById(cellID).style.backgroundColor='#DDDDDD';\n";
$JS_text.=" }\n";
@@ -1035,13 +1087,13 @@ else
$JS_text.=" document.getElementById('agent_time_detail_graph').innerHTML=graph_to_display;\n";
$JS_text.="}\n";
$GRAPH3="<tr><td colspan='".(10+$sub_status_count)."' class='graph_span_cell'><span id='agent_time_detail_graph'><BR>&nbsp;<BR></span></td></tr></table><BR><BR>";
$GRAPH3="<tr><td colspan='".(14+$sub_status_count)."' class='graph_span_cell'><span id='agent_time_detail_graph'><BR>&nbsp;<BR></span></td></tr></table><BR><BR>";
# echo $GRAPH.$GRAPH2.$GRAPH3.$max;
}
else
{
$file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTtalkpct %,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n";
$file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTwaitpct %,$TOTtalk,$TOTtalkpct %,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n";
}
}
+1 -1
View File
@@ -424,7 +424,7 @@ while ($i < $users_to_print)
{
$row=mysql_fetch_row($rslt);
$recL=0;
if ( ($row[0]=='SALE') and ($recL < 1) ) {$A1=$row[1]; $recL++; $sales=($sales + $row[1]);}
if ( (preg_match("/\|$row[0]\|/", $sale_dispo_str)) and ($recL < 1) ) {$A1=$row[1]; $recL++; $sales=($sales + $row[1]);}
# if ( ($row[0]=='A2') and ($recL < 1) ) {$A2=$row[1]; $recL++; $sales=($sales + $row[1]);}
# if ( ($row[0]=='A3') and ($recL < 1) ) {$A3=$row[1]; $recL++; $sales=($sales + $row[1]);}
# if ( ($row[0]=='A4') and ($recL < 1) ) {$A4=$row[1]; $recL++; $sales=($sales + $row[1]);}