forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
2 years ago
|
<?php
|
||
|
|
||
|
require_once("bd.php");
|
||
|
|
||
|
$dac = $_GET["listaDacs"];
|
||
|
|
||
|
|
||
|
|
||
|
$result = pg_query($dbcon, GetQuery($dac));
|
||
|
|
||
|
|
||
|
$linhas = "<table width=\"760\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
|
||
|
<tr>
|
||
|
<td>Nome</td>
|
||
|
<td>Ramal</td>
|
||
|
<td>Matrícula</td>
|
||
|
<td>Login</td>
|
||
|
<td>Modo Atend. </td>
|
||
|
<td>Orig/Dest</td>
|
||
|
<td>Status</td>
|
||
|
<td>Duração</td>
|
||
|
<td>Canal</td>
|
||
|
<td>Logado</td>
|
||
|
</tr>";
|
||
|
|
||
|
while ($agente = pg_fetch_row($result)) {
|
||
|
|
||
|
$linhas .= " <tr>
|
||
|
<td nowrap>$agente[0]</td>
|
||
|
<td>$agente[1]</td>
|
||
|
<td>$agente[2]</td>
|
||
|
<td>$agente[3]</td>
|
||
|
<td>$agente[4]</td>
|
||
|
<td>$agente[6]</td>
|
||
|
<td>$agente[7]</td>
|
||
|
<td>$agente[8]</td>
|
||
|
<td>$agente[9]</td>
|
||
|
<td>$agente[10]</td>
|
||
|
</tr>";
|
||
|
}
|
||
|
$linhas .= "</table>";
|
||
|
echo $linhas;
|
||
|
|
||
|
function GetQuery($dac) {
|
||
|
|
||
|
return "select nome, ramal, matricula, tempo_login, modo_atendimento, dac, origem_destino,
|
||
|
status, duracao, canal, logado
|
||
|
from pbx_supervisor_agentes
|
||
|
where dac = (select nome from pbx_dacs where id = $dac) order by 1
|
||
|
";
|
||
|
}
|
||
|
|
||
|
?>
|