diff --git a/agente/agentert.php b/agente/agentert.php index 73c027f5..cc745300 100644 --- a/agente/agentert.php +++ b/agente/agentert.php @@ -1,5 +1,4 @@ assign("client_status", GetStatusProspect()); + $smarty->assign("client_status", GetStatusProspect($_POST["client_status"])); $smarty->assign("client_tipo_contato", GetClientTipoContato("0")); if ($_SESSION["txtConsulta"]) $smarty->assign("client_telefone", $_SESSION["txtConsulta"]); diff --git a/contacteFunc.php b/contacteFunc.php index c44486be..76c0088f 100644 --- a/contacteFunc.php +++ b/contacteFunc.php @@ -828,6 +828,17 @@ function IsSupervisor($db) { function GetClassificacao($db, $idClas, $dac, $useSelect = 1) { $query = " SELECT clas_id, clas_descricao FROM pbx_classifica_atendimento where clas_status = 1 and clas_id in(select clas_id from pbx_classifica_dacs where id_dac = '$dac' ) order by 2"; $result = @pg_query($db, $query); + + if(!$result){ + + $clas=""; + + return $clas; + } + + $clas = $useSelect ? " */ - - $query = "select id, nome_depto from pbx_departamentos where empresa = '$empresa'"; + $query = "select id, nome_depto from pbx_departamentos where empresa = $empresa"; $result = !$dbcon ? pg_query($query) : pg_query($dbcon, $query); + + if(!$result){ + $site = ""; + return $site; + } + + $codSel = $depto; if ($useSelect) diff --git a/discador/kingDiscador.php b/discador/kingDiscador.php index 8a9fad44..30f9ff72 100644 --- a/discador/kingDiscador.php +++ b/discador/kingDiscador.php @@ -12,16 +12,17 @@ $data = GetConfKing(); if ($data) { - $link = mysql_connect($data['king_host'], $data['king_user'], $data['king_password']); if (!$link) { - throw new Exception('Não foi possível conectar ao banco de dados do King Dialer; Error: ' . mysql_error()); + throw new Exception('Não foi possível conectar ao banco de dados do King Dialer; Error: ' . mysqli_error($link)); + } + mysqli_select_db($data['king_base'], $link); + + if(mysqli_error($link)){ + throw new Exception("Error:". mysqli_error($link)); } - mysql_select_db($data['king_base'], $link); - } - - if (mysql_error()) { - throw new Exception("Error: " . mysql_error()); } + + } /** diff --git a/discador/listaDiscador.php b/discador/listaDiscador.php index d6170a97..316815c9 100644 --- a/discador/listaDiscador.php +++ b/discador/listaDiscador.php @@ -1,5 +1,6 @@ GetData()[0])) { - $dataRel[] = sprintf("%s", count(1) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $dataRel[] = sprintf("%s", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); $this->___dataRel[] = $dataRel; return; } diff --git a/relatorios/callcenter/geral/rechamadas.php b/relatorios/callcenter/geral/rechamadas.php index 3f986d09..6e84af24 100644 --- a/relatorios/callcenter/geral/rechamadas.php +++ b/relatorios/callcenter/geral/rechamadas.php @@ -1,5 +1,4 @@ GetData()[0])) { - $dataRel[] = sprintf("%s", count(1) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $dataRel[] = sprintf("%s", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); $this->___dataRel[] = $dataRel; return; } diff --git a/relatorios/callcenter/geral/relAgenteProducao.php b/relatorios/callcenter/geral/relAgenteProducao.php index 834e5a59..3384c960 100644 --- a/relatorios/callcenter/geral/relAgenteProducao.php +++ b/relatorios/callcenter/geral/relAgenteProducao.php @@ -1,5 +1,7 @@ 'align="center"', + 'Hora' => 'align="center"', + 'Origem' => 'align="center"', + 'TMA' => 'align="center"', + 'Agente' => 'align="center"', + 'Status' => 'align="center"' + ); + /* * Inicia o relatório. */ @@ -323,8 +334,11 @@ class RelClassificacaoMensal extends Relatorios { /* * Verifica se retornou dados */ + + //$dadosCabecalio + if (!IsPostBack() || !count($this->GetData()[0])) { - $dataRel[] = sprintf("%s", count(1) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $dataRel[] = sprintf("%s", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); $this->___dataRel[] = $dataRel; return; } diff --git a/relatorios/callcenter/geral/relContribuinte.php b/relatorios/callcenter/geral/relContribuinte.php index da1e89df..6c45e02c 100644 --- a/relatorios/callcenter/geral/relContribuinte.php +++ b/relatorios/callcenter/geral/relContribuinte.php @@ -1,5 +1,6 @@ GetData()[0])) { - $dataRel[] = sprintf("%s", count(1) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $dataRel[] = sprintf("%s", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); $this->___dataRel[] = $dataRel; return; } diff --git a/relatorios/callcenter/geral/relTransfer.php b/relatorios/callcenter/geral/relTransfer.php index 79d4f475..c90606e9 100644 --- a/relatorios/callcenter/geral/relTransfer.php +++ b/relatorios/callcenter/geral/relTransfer.php @@ -310,7 +310,7 @@ * Verifica se retornou dados */ if (!IsPostBack() || !count($this->GetData()[0])) { - $dataRel[] = sprintf("%s", count(1) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $dataRel[] = sprintf("%s", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); $this->___dataRel[] = $dataRel; return; } @@ -438,8 +438,14 @@ ORDER BY 2", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim), $this->___dac, $this->___dac); $resp = pg_query($dbcon, $query); + + + if(!$resp) { + return ""; + } + $result = pg_fetch_all($resp); - + $row = " - + + diff --git a/templates/pesquisa/pesquisaLibera.htm b/templates/pesquisa/pesquisaLibera.htm index 7b76b175..9f4c09e6 100644 --- a/templates/pesquisa/pesquisaLibera.htm +++ b/templates/pesquisa/pesquisaLibera.htm @@ -13,11 +13,11 @@ Palavra Chave - - + + - - + + {$imgNovo}