|
|
@ -2,8 +2,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
$tpLayout = 1; |
|
|
|
$tpLayout = 1; |
|
|
|
$dac = $_GET["dac"]; |
|
|
|
$dac = $_GET["dac"]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$nomeTpl = "supervisao/RelSupOriginadas.tpl"; |
|
|
|
$nomeTpl = "supervisao/RelSupOriginadas.tpl"; |
|
|
|
|
|
|
|
|
|
|
|
$query = " select a.calldate::time as hora, |
|
|
|
$query = " select a.calldate::time as hora, |
|
|
@ -22,18 +20,15 @@ $query = " select a.calldate::time as hora, |
|
|
|
and b.fila = '$dac' |
|
|
|
and b.fila = '$dac' |
|
|
|
order by 1"; |
|
|
|
order by 1"; |
|
|
|
|
|
|
|
|
|
|
|
//echo $query; |
|
|
|
|
|
|
|
$result = pg_query($dbcon, $query); |
|
|
|
$result = pg_query($dbcon, $query); |
|
|
|
$numrow = 0; |
|
|
|
$numrow = 0; |
|
|
|
$linhas = ""; |
|
|
|
$linhas = ""; |
|
|
|
$duracaoTotal = ''; |
|
|
|
|
|
|
|
while ($row = pg_fetch_array($result)) { |
|
|
|
while ($row = pg_fetch_array($result)) { |
|
|
|
$hora = $row["hora"]; |
|
|
|
$hora = $row["hora"]; |
|
|
|
$destino = ocultarTelefone($row["destino"]); |
|
|
|
$destino = ocultarTelefone($row["destino"]); |
|
|
|
$tempo = SecondToStrTime($row["tmo"]); |
|
|
|
$tempo = SecondToStrTime($row["tmo"]); |
|
|
|
$agente = $row["agente"]; |
|
|
|
$agente = $row["agente"]; |
|
|
|
$ramalAgente = $row["ramal_agente"]; |
|
|
|
$ramalAgente = $row["ramal_agente"]; |
|
|
|
//$proto = $row["protocolo"]; |
|
|
|
|
|
|
|
$proto = substr($row["protocolo"], 0, 4) . "-" . substr($row["protocolo"], 4); |
|
|
|
$proto = substr($row["protocolo"], 0, 4) . "-" . substr($row["protocolo"], 4); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -45,18 +40,14 @@ while ($row = pg_fetch_array($result)) { |
|
|
|
<td nowrap align=\"left\" class=\"headData\">$ramalAgente</td> |
|
|
|
<td nowrap align=\"left\" class=\"headData\">$ramalAgente</td> |
|
|
|
<td nowrap align=\"center\" class=\"headData\">$proto</td> |
|
|
|
<td nowrap align=\"center\" class=\"headData\">$proto</td> |
|
|
|
</tr>"; |
|
|
|
</tr>"; |
|
|
|
//$linhas .= sprintf($linha, FormataDBDataHora($row["hora"]), $row["destino"], SecondToStrTime($row["tmo"]),$row["agente"],$row["ramal_agente"] ); |
|
|
|
|
|
|
|
$duracaoTotal += $row["hora"]; |
|
|
|
|
|
|
|
$numrow++; |
|
|
|
$numrow++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$duracaoTotal = SecondToStrTime($duracaoTotal); |
|
|
|
|
|
|
|
$linhas .= "<tr align=\"center\"> |
|
|
|
$linhas .= "<tr align=\"center\"> |
|
|
|
<th nowrap align=\"left\" colspan=\"5\" >Total</th> |
|
|
|
<th nowrap align=\"left\" colspan=\"5\" >Total</th> |
|
|
|
<th nowrap class=\"headData\">$numrow</th> |
|
|
|
<th nowrap class=\"headData\">$numrow</th> |
|
|
|
</tr>"; |
|
|
|
</tr>"; |
|
|
|
|
|
|
|
|
|
|
|
//print $linhas; |
|
|
|
|
|
|
|
$smarty->assign('linhas', $linhas); |
|
|
|
$smarty->assign('linhas', $linhas); |
|
|
|
GetTemplate($smarty, $nomeTpl); |
|
|
|
GetTemplate($smarty, $nomeTpl); |
|
|
|
?> |
|
|
|
?> |
|
|
|