<ahref="#"onclick="abre_janela('700', '520', 'index.php?idProg=11028&pbxReqREQUESTuest=1&acao=inseri&acao2=novo<?phpecho$filtroNovo;?>');"><imgsrc="admin/images/novo.gif"width="20"height="20"border="0"align="absmiddle">NOVA CONTA </a>
</td>
</tr>
</table>
<tdalign="right"nowrap="nowrap">
<ahref="#"onclick="abre_janela('700', '520', 'index.php?idProg=11028&pbxRequest=1&acao=inseri&acao2=novo<?phpecho$filtroNovo;?>');"><imgsrc="admin/images/novo.gif"width="20"height="20"border="0"align="absmiddle">NOVA CONTA </a>
</td>
</tr>
<tr>
@ -91,7 +72,7 @@
<th>Status</th>
<thalign="center">Ações</th>
</tr>
<?php
<?
$janW = '500';
$janH = '400';
@ -101,10 +82,6 @@
$compl = sprintf("and (a.nome ilike %s or a.apelido ilike %s or a.matricula::text ilike %s)", $compl, $compl, $compl);
}
if($statusAtivo == "A" || $statusAtivo == "D"){
$compl .= " AND a.status = '$statusAtivo' ";
}
$query = "select a.id, a.nome, a.apelido, a.matricula, b.nome as empresa, c.nome_depto as departamento, a.status
from pbx_cs_usuarios a, pbx_empresa b, pbx_departamentos c
<tdstyle="border:0"><divalign="center"><ahref="#"onclick="abre_janela('700', '520', 'index.php?idProg=11028&pbxRequest=1&acao=edita&id=<?echo$dados['id'];?><?echo$params;?>');"><imgsrc="images/edit.gif"title="EDITAR O USUÁRIO:<?echo$dados['nome'];?>"width="16"height="16"border="0"></a></div></td>
<?phpif($dados['status']=="A"){?>
<?if($dados['status']=="A"){?>
<tdstyle="border:0"><divalign="center"><ahref="#"onclick="excluir('<?echo$dados['id'];?>', '<?echo$dados['nome'];?>', 'DESEJA REALMENTE DESABILITAR O USUÁRIO:<?echo$dados['nome'];?>', 'index.php?idProg=10028&pbxRequest=1&acao=deleta&id=<?echo$dados['matricula'];?><?echo$params;?>', 'USUARIOS');"><imgsrc="images/delete.gif"title="DESABILITAR O USUÁRIO:<?echo$dados['nome'];?>"width="16"height="16"border="0"></a></div></td>
<tdcolspan="8"><divalign="center"class="info"><imgsrc="images/shutdown.gif"width="24"height="24"border="0"align="absmiddle"/> Não foram encontrados registros </div></td>
<imgsrc="imgSite/anotacoes.png"alt="Bloco de Anotações"align="absmiddle"width="32"height="32"border="0"title="Bloco de Anotações">
Bloco de Anotações
</span>
</td>
</tr>
</table>';
/*
* Personalise esta função se necessitar de outras opções de filtro.
if (!IsPostBack() || !count($this->GetData()[0])) {
$dataRel[] = sprintf("<tr><tdalign=\"center\"colspan=\"%s\">%s</td></tr></table>", count($dadosCabecalio), (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!'));
$query = "select a.id_text, a.conteudo, a.matricula_agente, a.fone_cliente, a.data, b.apelido from pbx_anotacoes a, pbx_usuarios b where b.matricula = a.matricula_agente::text ";
,case when(length(f.src) >= 10)then substring(f.src,2) else f.src end as telefone
,'ATENDIDA' as condicao
,'1' as digito
,'NAO' as transferido
,'1' as tentativa
,f.calldate as datahora
,(min(f.duration) * interval '1 second' ) as duracao
,f.channel as canal
,'-' as campo_1
,case when((select count(*) from pbx_pesquisa_questoes where pp_id = a.pp_id) = count(b.pq_id))then 'RESPONDEU TODAS AS PERGUNDAS' else 'RESPONDEU ATE A PERGUNTA ' || max(b.pq_display) end as finalizacao
,(select STRING_AGG(remove_acentos(pq_questao), ';') from pbx_pesquisa_questoes where pp_id = a.pp_id) as perguntas
,STRING_AGG( remove_acentos(c.po_opcao), ';') as respostas
,split_part(e.pp_nome, '-', 1) as campo15
,split_part(e.pp_nome, '-', 2) as campo16
from pbx_pesquisa_movimento a
inner join pbx_pesquisa_questoes b on b.pp_id = a.pp_id and b.pq_id = a.pq_id
inner join pbx_pesquisa_opcoes c on c.pp_id = b.pp_id and c.pq_id = b.pq_id and c.po_id = a.po_id
inner join (select uniqueid, umv_ura_nome from pbx_ura_movimento where umv_ura_opcao is not null) d on d.uniqueid = a.uniqueid
inner join pbx_pesquisa e on e.pp_id = a.pp_id
inner join pbx_bilhetes f on f.uniqueid = a.uniqueid
where a.pm_data >= '$dataIni'
and a.pm_data <= '$dataFim'
and a.pp_id = $ppId
and a.pl_id = $plId
group by a.uniqueid, a.pl_id, a.pp_id, a.pm_data, e.pp_nome,getddd(f.src, '0'),f.src,case when(length(f.src) >= 10)then substring(f.src,2) else f.src end,f.calldate,f.duration,f.channel
order by a.uniqueid, calldate;";
$result = $this->___GetQuery($query);
$row = pg_fetch_all($result);
$this->SetData($row ? $row : array());
} else {
$query = "SELECT pq_display, pq_questao,
(select count(*)
from pbx_pesquisa_movimento
@ -189,7 +149,25 @@
$rows = pg_fetch_all($res);
$this->SetData($rows ? $rows : array());
}
}
$query = "SELECT fila, d.matricula, apelido,
SUM(CASE WHEN (c.data_reg IS NOT NULL)THEN 1 ELSE 0 END) AS envio_pesquisa,
SUM(CASE WHEN (c.data_fim IS NOT NULL)THEN 1 ELSE 0 END) AS completou_pesquisa,
COUNT(*) AS chamadas_realizadas
FROM pbx_bilhetes a
INNER JOIN pbx_eventos_dacs b ON a.uniqueid = b.uid2
LEFT JOIN pbx_pesquisa_regitra c ON a.uniqueid = c.uniqueid
LEFT JOIN pbx_usuarios d ON d.matricula = SUBSTRING(b.agente, 7, 4)
WHERE calldate::DATE >= '$dataIni'
AND calldate::DATE <= '$dataFim'
AND b.evento IN('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL', 'COMPLETACALLER', 'COMPLETAAGENT')
$dataRel[] = sprintf("<tr><tdalign=\"center\"colspan=\"%s\"><b>%s</b></td></tr></table>", count($dadosCabecalio), (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'O ARQUIVO FOI GERADO EM EXCEL CLICK NO ICONE PARA PODER REALIZAR O DOWNLOAD! Foram encontados ' . count($this->GetData()[0]) . ' registros para essa pesquisa!'));
$this->___dataRel[] = $dataRel;
return;
}
if (!IsPostBack() || !count($this->GetData()[0])) {
$dataRel[] = sprintf("<tr><tdalign=\"center\"colspan=\"%s\">%s</td></tr></table>", count($dadosCabecalio), (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!'));
$jsStartup[] = "alert('Arquivo gerado com sucesso!');";
}
// if ($fileProc = processaLista($listaClietne, $nomeArquivo)) {
// DownloadArquivo($fileProc);
// }
}
} catch (Exception $ex) {
$msg = $ex->getMessage();
@ -124,7 +124,7 @@ function processaLista($arquivo, $nomeArquivo) {
$idNtp = RegistroInc($dbcon, "select id from pbx_listanegra where UPPER(nome) = 'NAO PERTURBE' and id_pai is null");
$sql = "delete from tb_lista_discador a where exists(select '' from pbx_listanegra where numero = a.numero and (id_pai = '{$idNtp}' or flag = 'NAO PERTUBE'));";
if (!pg_query($dbcon, $sql)) {
throw new Exception("Năo foi possível verificar a tabela de lista negra!" . pg_last_error());
throw new Exception("Năo foi possível verificar a tabela de lista negra!");
}
$sql = "select numero from tb_lista_discador";
@ -140,6 +140,7 @@ function processaLista($arquivo, $nomeArquivo) {
fclose($handReproc);
if (!file_exists($arqReproc)) {
throw new Exception("Não foi possível criar o arquivo no diretório!");
$jsStartup[] = "alert('Seu acesso foi bloqueado por inúmeras tentativas de acesso inválidos! Para o desbloqueio, realize a alteração de senha ou consulte seu Administrador.');";
<td style="border:0;"><a href="#" onclick="ComplementoCampanha();"><img src="imgSite/anexo16.png" alt="Infromações Detalhadas do Contato" width="25" height="25" border="0" title="Infromações Detalhadas do Contato" /></a></td>
{/if}
<td style="border:0;"><img class="copyjs" data-clipboard-target="#linkaudio" src="imgSite/link-closed-solid-25.png" alt="Link para Áudio" width="25" height="25" border="0" title="Copia link de áudio para área de transferência!" /></td>
<td style="border:0;"><a href="javaScript:NovaJanela('index.php?idProg=17', 'agenteAnota', '920', '600', 'resizable=NO,scrollbars=NO');"><img src="imgSite/anotacoes.png" alt="Bloco de Anotações" width="25" height="25" border="0" title="Bloco de Anotações" /></a></td>
<td style="border:0;"><a href="javaScript:NovaJanela('index.php?idProg=17', 'agenteAnota', '700', '600', 'resizable=NO,scrollbars=NO');"><img src="imgSite/anotacoes.png" alt="Bloco de Anotações" width="25" height="25" border="0" title="Bloco de Anotações" /></a></td>
<td style="border:0;"><a href="javaScript:NovaJanela('index.php?idProg=19&ramal={$ramal_monitor}', 'agenteHistorico', '850', '320', 'resizable=NO,scrollbars=NO');"><img src="imgSite/history.png" alt="Histórico das Chamadas" width="25" height="25" border="0" title="Histórico das Chamadas" /></a></td>