Browse Source

remocao de variavel inutilizada que estava gerando erro, e linhas comentadas.

1.8.1-monitor
douglas.strappasson 11 months ago
parent
commit
79ffc5597f
  1. 9
      supervisao/RelSupOriginadas.php
  2. 10
      supervisao/RelSupRecebidas.php

9
supervisao/RelSupOriginadas.php

@ -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);
?> ?>

10
supervisao/RelSupRecebidas.php

@ -1,10 +1,7 @@
<?php <?php
$tpLayout = 1; $tpLayout = 1;
$dac = $_GET["dac"]; $dac = $_GET["dac"];
$nomeTpl = "supervisao/RelSupRecebidas.tpl"; $nomeTpl = "supervisao/RelSupRecebidas.tpl";
$query = " select a.calldate::time as hora, a.src as origem, a.billsec as tmo, coalesce(c.apelido, '-') as agente, $query = " select a.calldate::time as hora, a.src as origem, a.billsec as tmo, coalesce(c.apelido, '-') as agente,
@ -21,11 +18,9 @@ $query = " select a.calldate::time as hora, a.src as origem, a.billsec as tmo,
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["origem"]); $destino = ocultarTelefone($row["origem"]);
@ -43,20 +38,15 @@ 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>";
$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>";
$smarty->assign('linhas', $linhas); $smarty->assign('linhas', $linhas);
GetTemplate($smarty, $nomeTpl); GetTemplate($smarty, $nomeTpl);
?> ?>

Loading…
Cancel
Save