diff --git a/admin/CadContexto.php b/admin/CadContexto.php
index e2e4f96f..6a8dc1d4 100644
--- a/admin/CadContexto.php
+++ b/admin/CadContexto.php
@@ -178,7 +178,7 @@
}
} else if ($acao == INSERT) {
if ($gravar) {
- @pg_query($dbcon, "begin");
+ pg_query($dbcon, "begin");
try {
if (empty($nome))
throw new Exception("Informe um nome para o contexto!");
@@ -192,7 +192,7 @@
(nome,recorte,acrescenta,opcao,acao,inclui_padrao, direcao_chamada)
VALUES ('$nome','$recorte','$acrescenta','$opcao','$acao_opcao','$inclui_padrao', '$direcao_chamada')";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(1)Não foi possível realizar a operação!");
@@ -205,12 +205,12 @@
$idContexto = $dados['id'];
GravaComplemento($dbcon, $idContexto);
- @pg_query($dbcon, "commit");
+ pg_query($dbcon, "commit");
$mensagems[] = "Registro inserido com sucesso!";
$acoesCliente[] = "fecha_popup(0,'index.php?idProg=10027&pbxRequest=1$param&acao=$acao');";
gera_arquivos($dbcon, "CONTEXTOS");
} catch (Exception $e) {
- @pg_query($dbcon, "rollback");
+ pg_query($dbcon, "rollback");
$mensagems[] = $e->getMessage();
}
}
@@ -219,7 +219,7 @@
if ($gravar) {
- @pg_query($dbcon, "begin");
+ pg_query($dbcon, "begin");
try {
$query = "UPDATE pbx_contextos
SET nome = '$nome',
@@ -235,7 +235,7 @@
throw new Exception("Informe pelo menos um \"Tronco\" ou \"Acao\" para cada modelo!");
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(1)Não foi possível realizar a operação!");
@@ -244,12 +244,12 @@
* selecionadas pelo usuario durante a operação.
*/
GravaComplemento($dbcon, $idContexto);
- @pg_query($dbcon, "commit");
+ pg_query($dbcon, "commit");
gera_arquivos($dbcon, "CONTEXTOS");
$mensagems[] = "Registro alterado com sucesso!";
$acoesCliente[] = "fecha_popup(0,'index.php?idProg=10027&pbxRequest=1$param&acao=$acao');";
} catch (Exception $e) {
- @pg_query($dbcon, "rollback");
+ pg_query($dbcon, "rollback");
$mensagems[] = $e->getMessage();
}
}//fim gravar
@@ -258,7 +258,7 @@
from pbx_contextos
WHERE id = '$idContexto' ";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result || !@pg_num_rows($result)) {
$mensagems[] = "Não foi possível selecionar o \"Contexto\"!";
@@ -425,12 +425,12 @@
while ($row = pg_fetch_row($result)) {
$idModelo = $row[0];
$query = "select count(*) from pbx_contextos_canais_tmp where id_modelo = '$idModelo'";
- $result1 = @pg_query($dbcon, $query);
+ $result1 = pg_query($dbcon, $query);
$rowCont = @pg_fetch_row($result1);
$query = "select count(*) from pbx_contextos_opcoes_tmp where id_modelo = '$idModelo'";
- $result1 = @pg_query($dbcon, $query);
+ $result1 = pg_query($dbcon, $query);
$rowCont1 = @pg_fetch_row($result1);
if (!$rowCont[0] && !$rowCont1[0])
@@ -442,27 +442,27 @@
function GravaComplemento($dbcon, $idContexto) {
$query = "delete from pbx_contextos_canais where id_contexto = '$idContexto'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(3)Não foi possível realizar a operação!");
$query = "delete from pbx_contextos_modelos where id_contexto = '$idContexto'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(4)Não foi possível realizar a operação!");
$query = "delete from pbx_contextos_canais where id_contexto = '$idContexto'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(5)Não foi possível realizar a operação!");
$query = "delete from pbx_contextos_opcoes where id_contexto = '$idContexto'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(6)Não foi possível realizar a operação!");
$query = "select id, modelo, recorte, acrescenta, portabilidade from pbx_contextos_modelos_tmp";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
throw new Exception("(7)Não foi possível realizar a operação!");
@@ -475,13 +475,13 @@
$query = "insert into pbx_contextos_modelos(id_contexto, modelo, recorte, acrescenta, portabilidade)
values('$idContexto', '$modelo', '$rec', '$acresc', '$porta')";
- $resultTmp = @pg_query($dbcon, $query);
+ $resultTmp = pg_query($dbcon, $query);
if (!$resultTmp)
throw new Exception("(8)Não foi possível realizar a operação!");
// Ultimo modelo inserido
$query = "select max(id) from pbx_contextos_modelos";
- $resultTmp = @pg_query($dbcon, $query);
+ $resultTmp = pg_query($dbcon, $query);
if (!$resultTmp)
throw new Exception("(9)Não foi possível realizar a operação!");
@@ -494,7 +494,7 @@
select '$idContexto', canal, '$idModeloAtual'
from pbx_contextos_canais_tmp
where id_modelo = '$idModeloTmp'";
- $resultTmp = @pg_query($dbcon, $query);
+ $resultTmp = pg_query($dbcon, $query);
if (!$resultTmp)
throw new Exception("(10)Não foi possível realizar a operação!");
//insere opcoes
@@ -504,7 +504,7 @@
select '$idContexto', opcao, acao, '$idModeloAtual'
from pbx_contextos_opcoes_tmp
where id_modelo = '$idModeloTmp'";
- $resultTmp = @pg_query($dbcon, $query);
+ $resultTmp = pg_query($dbcon, $query);
if (!$resultTmp)
throw new Exception("(11)Não foi possível realizar a operação!");
}
diff --git a/admin/CadHost.php b/admin/CadHost.php
index bcc6c528..164328e6 100644
--- a/admin/CadHost.php
+++ b/admin/CadHost.php
@@ -55,13 +55,13 @@
//Esta função deve ser chamada sempre antes do inicio da transação
$idHost = GetSequencia($dbcon, 'pbx_hosts');
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
$query = "INSERT INTO pbx_hosts(id, descricao,host,empresa,usuario,senha,basedados,porta,faixa_inicial,faixa_final, master)
VALUES ('$idHost', '$descricao','$host','$empresa','$usuario','$senha','$basedados','$porta','$faixa_inicial','$faixa_final', '$master')";
if ($result) {
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
}
if ($result) {
$result = @GravaRpl($dbcon, $query);
@@ -72,19 +72,19 @@
}
if ($result) {
- $result = @pg_query($dbcon, 'commit');
+ $result = pg_query($dbcon, 'commit');
}
if (!$result) {
$numErro++;
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
echo "";
}
}
if ($acao == "edita") {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
$query = "UPDATE pbx_hosts
SET descricao='$descricao', host='$host', empresa='$empresa',usuario='$usuario',senha='$senha',
@@ -93,7 +93,7 @@
WHERE id=$id";
if ($result) {
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
}
if ($result) {
$result = @GravaRpl($dbcon, $query);
@@ -106,11 +106,11 @@
}
if ($result) {
- $result = @pg_query($dbcon, 'commit');
+ $result = pg_query($dbcon, 'commit');
}
if (!$result) {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
echo "";
}
}
@@ -145,7 +145,7 @@
function AtualizaMaster($dbcon, $id) {
$query = "UPDATE pbx_hosts SET master = '0' WHERE id <> $id";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if ($result) {
$result = @GravaRpl($dbcon, $query);
}
diff --git a/admin/CadListaNegra.php b/admin/CadListaNegra.php
index 98bdece4..1915607c 100644
--- a/admin/CadListaNegra.php
+++ b/admin/CadListaNegra.php
@@ -80,7 +80,7 @@
}
} catch (Exception $ex) {
WriteLog($ex->getMessage(), '/var/log/asterisk/lista_negra_cad.log');
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
}
}
diff --git a/admin/CadRotasEntrada.php b/admin/CadRotasEntrada.php
index 206dc40a..00e75360 100644
--- a/admin/CadRotasEntrada.php
+++ b/admin/CadRotasEntrada.php
@@ -365,7 +365,7 @@
exit();
} catch (Exception $ex) {
if ($inTran) {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
}
$errosApl = 1;
GravaLogForms($ex->getMessage());
diff --git a/admin/CadUsuario.php b/admin/CadUsuario.php
index 3ed97339..225accaa 100644
--- a/admin/CadUsuario.php
+++ b/admin/CadUsuario.php
@@ -243,7 +243,7 @@
throw new Exception('Não foi possível finalizar a transação!');
} catch (Exception $ex) {
if ($inTran)
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$msgErro = $ex->getMessage();
$numErros++;
}
diff --git a/admin/arquivos.php b/admin/arquivos.php
index f598b832..d9192c9d 100644
--- a/admin/arquivos.php
+++ b/admin/arquivos.php
@@ -90,7 +90,7 @@ if ($acao == 'deleta') {
Alert("Arquivo excluido com sucesso!");
} catch (Exception $ex) {
if ($inTran)
- @pg_query('rollback');
+ pg_query('rollback');
Alert($ex->getMessage());
}
}
diff --git a/admin/cadConfMail.php b/admin/cadConfMail.php
index 1893731e..aee51d33 100644
--- a/admin/cadConfMail.php
+++ b/admin/cadConfMail.php
@@ -72,7 +72,7 @@
if ($padrao == 'S') {
$query = "update pbx_confmail set padrao = 'N'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
$query = "INSERT INTO pbx_confmail(conta, porta, timeout, protocolo, dominio, tsl, tsl_certificado, tsl_check, logfile, hosts, de, auth, usuario, senha,padrao)
@@ -87,7 +87,7 @@
if ($padrao == 'S') {
$query = "update pbx_confmail set padrao = 'N'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
$query = "UPDATE pbx_confmail
diff --git a/admin/cadConfMailTeste.php b/admin/cadConfMailTeste.php
index 693f5015..c8c4fcad 100644
--- a/admin/cadConfMailTeste.php
+++ b/admin/cadConfMailTeste.php
@@ -13,7 +13,7 @@ $idMail = $form['idMail'];
if (IsPostBack()) {
$query = "select hosts, usuario, senha, porta, tsl
from pbx_confmail where id = $idMail";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!is_email($email)) {
echo "";
diff --git a/admin/cadHorariosLG.php b/admin/cadHorariosLG.php
index 4ceab0d8..b6cf8f23 100644
--- a/admin/cadHorariosLG.php
+++ b/admin/cadHorariosLG.php
@@ -60,7 +60,7 @@
function ___GetHorarioLG() {
$query = "SELECT * FROM pbx_horarios WHERE nome = 'LIGUE_GRATIS_VERIFICA'";
- $resp = @pg_query($query);
+ $resp = pg_query($query);
$resp = pg_fetch_assoc($resp);
if ($resp['nome']) {
@@ -77,7 +77,7 @@
$query = "SELECT b.id, todos_dias_semana, horario_inicio, horario_fim, semana, semana_fim FROM pbx_horarios a
INNER JOIN pbx_horarios_itens b ON a.id = b.id_horario
WHERE a.nome = 'LIGUE_GRATIS_VERIFICA' ORDER BY 1";
- $resp = @pg_query($query);
+ $resp = pg_query($query);
$resp = pg_fetch_all($resp);
foreach ($SSvars as $session) {
diff --git a/admin/cadLiguegratis.php b/admin/cadLiguegratis.php
index 9b63929e..fc9666be 100644
--- a/admin/cadLiguegratis.php
+++ b/admin/cadLiguegratis.php
@@ -42,7 +42,7 @@
* CADASTRO DE ROTA DE SAIDA FIXO/MOVEL
*/
$sql = "INSERT INTO pbx_rotas_saida (nome,musica_espera,musica,anuncio,operadora,recorte,acrescenta,tipo,portabilidade) VALUES ('LIGUE_GRATIS_$tipo','N', NULL, NULL, NULL,0,NULL,'E',0);";
- @pg_query($sql);
+ pg_query($sql);
___GetPGError('inserir', 'a rota de saida');
/*
@@ -56,14 +56,14 @@
$modelosSaida = explode('||', $modelos[$tipo]);
foreach ($modelosSaida as $modelo) {
$sqlModelo = "INSERT INTO pbx_rotas_saida_modelos(id_rota,modelo) VALUES({$resp['id']},'$modelo');";
- @pg_query($sqlModelo);
+ pg_query($sqlModelo);
___GetPGError('inserir', 'os modelos');
}
} else {
$channel = $_SESSION["SSchannel{$tipo}"];
foreach ($channel as $canal) {
$sqlCanal = "DELETE FROM pbx_rotas_saida_canais WHERE id_rota = {$res['id']};";
- @pg_query($sqlCanal);
+ pg_query($sqlCanal);
___GetPGError('deletar', 'os canais ' . $tipo);
}
}
@@ -75,7 +75,7 @@
$channel = $_SESSION["SSchannel{$tipo}"];
foreach ($channel as $canal) {
$sqlCanal = "INSERT INTO pbx_rotas_saida_canais (id_rota,canal,recorta,acrescenta) VALUES({$resp['id']},'$canal',0,null);";
- @pg_query($sqlCanal);
+ pg_query($sqlCanal);
___GetPGError('inserir', 'os canais');
}
}
@@ -92,25 +92,25 @@
if (!___GetHorarioLG()) {
$sql = "INSERT INTO pbx_arquivo_som (arq_data,arq_nome,arq_nome_sistema,arq_descricao,arq_path_origem,arq_path_destino,arq_orig_tamanho,arq_dest_tamanho,arq_md5,userreg) VALUES('1995-11-21','fora_de_horario_lg','fora_de_horario_lg','fora_de_horario_lg','/var/lib/asterisk/sounds/customizados/fora_de_horario_lg.mp3','/var/lib/asterisk/sounds/customizados/fora_de_horario_lg.ulaw',133808,66655,'81c016e775ced0bb6815f81161e8e9de','admin');";
- @pg_query($sql);
+ pg_query($sql);
$sql1 = "INSERT INTO pbx_anuncios (nome,musica,teste,opcao,acao) VALUES('LIGUE_GRATIS_MENSAGEM','fora_de_horario_lg.ulaw', NULL,NULL, NULL);";
- @pg_query($sql1);
+ pg_query($sql1);
$sql2 = "SELECT id FROM pbx_anuncios WHERE nome = 'LIGUE_GRATIS_MENSAGEM'";
$resp = pg_fetch_assoc(pg_query($sql2));
$sql3 = "INSERT INTO pbx_horarios (nome, discar, opcao_nao, acao_nao, status) values('LIGUE_GRATIS_VERIFICA', null, 'anuncios', '{$resp['id']}',1);";
- @pg_query($sql3);
+ pg_query($sql3);
$sql4 = "SELECT id FROM pbx_horarios WHERE nome = 'LIGUE_GRATIS_VERIFICA'";
$resp1 = pg_fetch_assoc(pg_query($sql4));
$sql5 = "INSERT INTO pbx_anuncios (nome,musica,teste,opcao,acao) VALUES('LIGUE_GRATIS_RECEBE','silencio.ulaw', NULL,'horarios', '{$resp1['id']}');";
- @pg_query($sql5);
+ pg_query($sql5);
$sql6 = "INSERT INTO pbx_anuncios (nome,musica,teste,opcao,acao) VALUES('LIGUE_GRATIS_RETORNA','silencio.ulaw', NULL , NULL, NULL);";
- @pg_query($sql6);
+ pg_query($sql6);
$sql7 = "SELECT id FROM pbx_anuncios WHERE nome = 'LIGUE_GRATIS_RETORNA'";
$resp2 = pg_fetch_assoc(pg_query($sql7));
@@ -228,7 +228,7 @@
function ___GetHorarioLG() {
$query = "SELECT * FROM pbx_horarios WHERE nome = 'LIGUE_GRATIS_VERIFICA'";
- $resp = @pg_query($query);
+ $resp = pg_query($query);
$resp = pg_fetch_assoc($resp);
if ($resp['nome']) {
@@ -242,7 +242,7 @@
$query = "SELECT a.id as id_horarios, b.id, todos_dias_semana, horario_inicio, horario_fim, semana, semana_fim,acao FROM pbx_horarios a
INNER JOIN pbx_horarios_itens b ON a.id = b.id_horario
WHERE a.nome = 'LIGUE_GRATIS_VERIFICA' ORDER BY b.id";
- $resp = @pg_query($query);
+ $resp = pg_query($query);
$resp = pg_fetch_all($resp);
return $resp;
@@ -253,7 +253,7 @@
semana_fim, todos_dias_mes, dias_mes, dias_mes_fim, todos_mes, mes,
mes_fim, opcao, acao, feriado)
VALUES({$idHorario},'{$ssInicio}','{$ssFim}',$inter,'$ini','$fim',1,0,0,1,'0','0','anuncios','{$acao}','I');";
- @pg_query($query);
+ pg_query($query);
___GetPGError('inserir', 'os horarios');
}
diff --git a/admin/cadTroncosDahdi.php b/admin/cadTroncosDahdi.php
index 157e2694..15ed92f6 100644
--- a/admin/cadTroncosDahdi.php
+++ b/admin/cadTroncosDahdi.php
@@ -722,7 +722,7 @@ function _Dispodahdi($db, $dispId) {
$item = "";
$query = "SELECT id, ( nome || '(' || interface || ')' ) as nome FROM pbx_troncos_dahdi where tipo_cadastro = 'D' order by nome";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
while ($row = pg_fetch_array($result)) {
$id = $row['id'];
diff --git a/admin/campanhaUsuario.php b/admin/campanhaUsuario.php
index d49fc0bc..725fa5da 100644
--- a/admin/campanhaUsuario.php
+++ b/admin/campanhaUsuario.php
@@ -19,7 +19,7 @@ if (isset($fieldsForm['btIncAgente'])) {
} else {
$query = "insert into pbx_campanha_usuarios(cmp_id, matricula)values(%s, '%s')";
$query = sprintf($query, $idCampanha, $fieldsForm['listaAgentes']);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
$fieldsForm['erro'] = $result ? fmtMsg('Agente incluido com sucesso!') : fmtErro('O agente não pode ser incluido!', pg_last_error($dbcon));
}
} else if (isset($fieldsForm['btRmAgente'])) {
@@ -28,7 +28,7 @@ if (isset($fieldsForm['btIncAgente'])) {
} else {
$query = "delete from pbx_campanha_usuarios where cmp_id = %s and matricula = '%s'";
$query = sprintf($query, $idCampanha, $fieldsForm['listaAgenteInc']);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
$fieldsForm['erro'] = $result ? fmtMsg('Agente removido com sucesso!') : fmtErro('O agente não pode ser removido!', pg_last_error($dbcon));
}
}
diff --git a/admin/departamentos.php b/admin/departamentos.php
index 9b0a87ba..d659550c 100644
--- a/admin/departamentos.php
+++ b/admin/departamentos.php
@@ -49,7 +49,7 @@ if ($acao == "deleta") {
throw new Exception('Não foi possível finalizar a transação!');
} catch (Exception $ex) {
if ($inTran)
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$msg = $ex->getMessage();
}
}
diff --git a/admin/funcoes.php b/admin/funcoes.php
index 65fd84e2..c6ef32b3 100644
--- a/admin/funcoes.php
+++ b/admin/funcoes.php
@@ -2639,7 +2639,7 @@ function gera_arquivos($dbcon, $tipo, $reload = 1, $reloadUra = 1) {
$escreveCustom = fopen($arqCustom, 'w');
$query = "select * FROM pbx_contextos order by id asc";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
while ($dados = @pg_fetch_array($result)) {
/*
* Inicializa variaveis com informa��es do contexto corrente
@@ -2677,7 +2677,7 @@ function gera_arquivos($dbcon, $tipo, $reload = 1, $reloadUra = 1) {
* Grava��o dos modelos relacionado ao contexto corrente
*/
$query = "select id, id_contexto, modelo, recorte, acrescenta, portabilidade from pbx_contextos_modelos where id_contexto = '$idContexto'";
- $result2 = @pg_query($dbcon, $query);
+ $result2 = pg_query($dbcon, $query);
while ($dadosModelo = @pg_fetch_array($result2)) {
$modelo = $dadosModelo["modelo"];
$idModelo = $dadosModelo["id"];
@@ -2707,7 +2707,7 @@ function gera_arquivos($dbcon, $tipo, $reload = 1, $reloadUra = 1) {
* Grava Trocos ou Acoes conforme cofigurado pelo usu�rio
*/
$query = "select id, id_contexto, id_modelo, canal from pbx_contextos_canais where id_modelo = '$idModelo'";
- $result3 = @pg_query($dbcon, $query);
+ $result3 = pg_query($dbcon, $query);
$existeTronco = 0;
@@ -2735,7 +2735,7 @@ function gera_arquivos($dbcon, $tipo, $reload = 1, $reloadUra = 1) {
*/
$query = "select id, tipo, username, max_ligacoes, callerid, callerid_tronco from pbx_troncos where nome = '$canal' ";
- $result4 = @pg_query($dbcon, $query);
+ $result4 = pg_query($dbcon, $query);
$dadosTronco = @pg_fetch_array($result4);
@@ -2776,7 +2776,7 @@ function gera_arquivos($dbcon, $tipo, $reload = 1, $reloadUra = 1) {
fwrite($escreve, $linha);
$query = "select opcao, acao from pbx_contextos_opcoes where id_modelo = '$idModelo' ";
- $result5 = @pg_query($dbcon, $query);
+ $result5 = pg_query($dbcon, $query);
$dadosAcao = @pg_fetch_array($result5);
$opcao = $dadosAcao["opcao"];
$acao = $dadosAcao["acao"];
@@ -4006,10 +4006,10 @@ function aupdArq($texto, $qtd) {
function GetSequencias($nomeTable) {
$existeTable = 0;
- $result = @pg_query('begin');
+ $result = pg_query('begin');
$query = "select id from pbx_sequencia where name_table = '$nomeTable'";
if ($result)
- $result = @pg_query($query);
+ $result = pg_query($query);
if ($result)
$existeTable = pg_num_rows($result);
@@ -4019,13 +4019,13 @@ function GetSequencias($nomeTable) {
$seq = $dados['id'] + 1;
} else if ($result) {
$query = "insert into pbx_sequencia(name_table, id)values('$nomeTable', 0)";
- $result = $result && @pg_query($query);
+ $result = $result && pg_query($query);
$seq = 1;
}
$query = "update pbx_sequencia set id = $seq where name_table = '$nomeTable'";
- $result = $result && @pg_query($query);
- $result = $result && @pg_query('commit');
+ $result = $result && pg_query($query);
+ $result = $result && pg_query('commit');
return $seq;
}
diff --git a/admin/hosts.php b/admin/hosts.php
index ae7d863e..0ed012f0 100644
--- a/admin/hosts.php
+++ b/admin/hosts.php
@@ -7,11 +7,11 @@ if ($acao == "deleta") {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
$query = "delete from pbx_cs_usuarios_hosts where id_host= (select id from pbx_hosts where host = '$id')";
if ($result) {
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
}
if ($result) {
$result = @GravaRpl($dbcon, $query);
@@ -19,19 +19,19 @@ if ($acao == "deleta") {
$query = "delete from pbx_hosts where host='$id'";
if ($result) {
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
}
if ($result) {
$result = @GravaRpl($dbcon, $query);
}
if ($result) {
- $result = @pg_query($dbcon, 'commit');
+ $result = pg_query($dbcon, 'commit');
}
if (!$result) {
$msgErro = "Não foi possível realizar a operação! Erro: " . error_get_last();
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$numErros++;
$jsStartup[] = "alert('$msgErro');";
}
diff --git a/admin/listaNegraRotas.php b/admin/listaNegraRotas.php
index 2fe2e03b..cb67a23b 100644
--- a/admin/listaNegraRotas.php
+++ b/admin/listaNegraRotas.php
@@ -13,23 +13,23 @@ if (isset($_REQUEST['btIncRota'])) {
if (empty($_REQUEST['listaRotas'])) {
$_REQUEST['erro'] = fmtMsg('Selecione uma rota!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($_REQUEST['listaRotas'] as $idRotas) {
$id = explode('|', $idRotas);
$idRota = $id[1];
$tiporota = $id[0];
$query = "insert into pbx_listanegra_rota(id_rota, id_lista, tipo_rota)values('%s', '%s', '%s')";
$query = sprintf($query, $idRota, $idLista, $tiporota);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result) {
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
$_REQUEST['erro'] = fmtMsg('Rota incluida com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$_REQUEST['erro'] = fmtErro('A Rota não pode ser incluido!', pg_last_error($dbcon));
}
}
@@ -37,7 +37,7 @@ if (isset($_REQUEST['btIncRota'])) {
if (empty($_REQUEST['listaRotaInc'])) {
$_REQUEST['erro'] = fmtMsg('Selecione uma Rotagr!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($_REQUEST['listaRotaInc'] as $idRotas) {
$id = explode('|', $idRotas);
$idRota = $id[1];
@@ -45,16 +45,16 @@ if (isset($_REQUEST['btIncRota'])) {
$query = "delete from pbx_listanegra_rota where id_rota = '%s' and id_lista = '%s' and tipo_rota = '%s'";
$query = sprintf($query, $idRota, $idLista, $tiporota);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result) {
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
$_REQUEST['erro'] = fmtMsg('Rota removida com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$_REQUEST['erro'] = fmtErro('A Rota não pode ser removido!', pg_last_error($dbcon));
}
}
diff --git a/admin/lista_negra.php b/admin/lista_negra.php
index 979cb8b2..3e0961b0 100644
--- a/admin/lista_negra.php
+++ b/admin/lista_negra.php
@@ -44,7 +44,7 @@ if ($acao == "deleta") {
} catch (Exception $ex) {
WriteLog($ex->getMessage(),'/var/log/asterisk/lista_negra_cad.log');
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
}
}
?>
diff --git a/admin/musicas.php b/admin/musicas.php
index b062ce9d..d62aac89 100644
--- a/admin/musicas.php
+++ b/admin/musicas.php
@@ -7,12 +7,12 @@ $recontaPag = ($acao == 'inseri') || ($acao == "deleta") || isset($_GET['pesquis
if ($acao == "deleta") {
$query = "select directory from pbx_musichold_grupos where id = '$id'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
$row = pg_fetch_row($result);
$diretorio = $row[0];
$query = "delete from pbx_musichold_grupos where id='$id'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
gera_arquivos($dbcon, 'MUSICHOLD_GRUPOS');
$comando = sprintf('rm -rf %s', $diretorio);
diff --git a/admin/queuesAudios.php b/admin/queuesAudios.php
index e75a0f25..f502616c 100644
--- a/admin/queuesAudios.php
+++ b/admin/queuesAudios.php
@@ -13,20 +13,20 @@ if (isset($fieldsForm['btIncGrupo'])) {
if (empty($fieldsForm['listaGrupos'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um grupo!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($fieldsForm['listaGrupos'] as $idGrupo) {
$query = "insert into pbx_fila_audios(gp_id, id)values('%s', '%s')";
$query = sprintf($query, $idGrupo, $idFila);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result) {
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
$fieldsForm['erro'] = fmtMsg('Grupo incluido com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = fmtErro('O grupo não pode ser incluido!', pg_last_error($dbcon));
}
}
@@ -34,11 +34,11 @@ if (isset($fieldsForm['btIncGrupo'])) {
if (empty($fieldsForm['listaGrupoInc'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um Grupo!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($fieldsForm['listaGrupoInc'] as $idGrupo) {
$query = "delete from pbx_fila_audios where gp_id = %s and id = %s";
$query = sprintf($query, $idGrupo, $idFila);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
@@ -64,7 +64,7 @@ if (isset($fieldsForm['btIncGrupo'])) {
pg_query($dbcon, 'commit');
$fieldsForm['erro'] = fmtMsg('Grupo removido com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = fmtErro('O grupo não pode ser removido!', pg_last_error($dbcon));
}
}
diff --git a/admin/queuesGrupos.php b/admin/queuesGrupos.php
index 47a61b2c..446cf49d 100644
--- a/admin/queuesGrupos.php
+++ b/admin/queuesGrupos.php
@@ -13,20 +13,20 @@ if (isset($fieldsForm['btIncGrupo'])) {
if (empty($fieldsForm['listaGrupos'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um grupo!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($fieldsForm['listaGrupos'] as $idGrupo) {
$query = "insert into pbx_fila_grupos(gp_id, id)values('%s', '%s')";
$query = sprintf($query, $idGrupo, $idFila);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result) {
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
$fieldsForm['erro'] = fmtMsg('Grupo incluido com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = fmtErro('O grupo não pode ser incluido!', pg_last_error($dbcon));
}
}
@@ -34,11 +34,11 @@ if (isset($fieldsForm['btIncGrupo'])) {
if (empty($fieldsForm['listaGrupoInc'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um Grupo!');
} else {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
foreach ($fieldsForm['listaGrupoInc'] as $idGrupo) {
$query = "delete from pbx_fila_grupos where gp_id = %s and id = %s";
$query = sprintf($query, $idGrupo, $idFila);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
@@ -64,7 +64,7 @@ if (isset($fieldsForm['btIncGrupo'])) {
pg_query($dbcon, 'commit');
$fieldsForm['erro'] = fmtMsg('Grupo removido com sucesso!');
} else {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = fmtErro('O grupo não pode ser removido!', pg_last_error($dbcon));
}
}
diff --git a/admin/rotasEntrada.php b/admin/rotasEntrada.php
index f880be50..e12a4dce 100644
--- a/admin/rotasEntrada.php
+++ b/admin/rotasEntrada.php
@@ -38,7 +38,7 @@ if ($acao == "deleta") {
PbxAlert("Rota excluida com sucesso!");
} catch (Exception $ex) {
if ($inTran)
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
GravaLogForms($ex->getMessage(), 'DeletaRota');
PbxAlert("Erro ao excluir a rota!");
}
diff --git a/admin/rotasSaida.php b/admin/rotasSaida.php
index fd3bbeb1..ef4d125c 100644
--- a/admin/rotasSaida.php
+++ b/admin/rotasSaida.php
@@ -54,7 +54,7 @@ if ($acao == "deleta") {
PbxAlert("Rota excluida com sucesso!");
} catch (Exception $ex) {
if ($inTran)
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
GravaLogForms($ex->getMessage(), 'DeletaRotaSaida');
PbxAlert("Erro ao excluir a Rota de Saida!");
}
diff --git a/admin/uraRamais.php b/admin/uraRamais.php
index 6c8bde67..2d60fee7 100644
--- a/admin/uraRamais.php
+++ b/admin/uraRamais.php
@@ -15,14 +15,14 @@
$fieldsForm['erro'] = fmtMsg('Selecione um ramal!');
} else {
try {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
if ($result) {
$cont = 0;
foreach ($fieldsForm['listaRamaisDisponiveis'] as $ramal) {
$query = "insert into pbx_grupo_ura_ramal(id_ura, id_ramal)values(%s, %s)";
$query = sprintf($query, $_SESSION['SSIdUraRamal'], $ramal);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
CadastraRamalDestino($dbcon, $_SESSION['SSIdUraRamal'], $ramal);
if (!$result)
@@ -30,13 +30,13 @@
$cont++;
}
}
- $result = $result && @pg_query($dbcon, 'commit');
+ $result = $result && pg_query($dbcon, 'commit');
if (!$result) {
throw new Exception('A operação não pode ser realizada!');
}
$fieldsForm['erro'] = $cont > 1 ? fmtMsg('Ramais incluidos com sucesso!') : fmtMsg('Ramal incluido com sucesso!');
} catch (Exception $e) {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
fmtErro($e->getMessage(), pg_last_error($dbcon));
}
}
@@ -47,7 +47,7 @@
$fieldsForm['erro'] = fmtMsg('Selecione um ramal!');
} else {
try {
- $result = @pg_query($dbcon, 'begin');
+ $result = pg_query($dbcon, 'begin');
if ($result) {
$userAdmin = IsAdmin() ? 1 : 0;
@@ -55,20 +55,20 @@
foreach ($fieldsForm['listaRamaisIncluidos'] as $ramal) {
$query = "delete from pbx_grupo_ura_ramal where id_ura = '%s' and id_ramal = '%s'";
$query = sprintf($query, $_SESSION['SSIdUraRamal'], $ramal);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
DeleteRamalDestino($dbcon, $_SESSION['SSIdUraRamal'], $ramal);
if (!$result)
break;
$cont++;
}
}
- $result = $result && @pg_query($dbcon, 'commit');
+ $result = $result && pg_query($dbcon, 'commit');
if (!$result) {
throw new Exception('A operação não pode ser realizada!');
}
$fieldsForm['erro'] = $cont > 1 ? fmtMsg('Ramais removidos com sucesso!') : fmtMsg('Ramal removido com sucesso!');
} catch (Exception $e) {
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
fmtErro($e->getMessage(), pg_last_error($dbcon));
}
}
diff --git a/admin/usuarios.php b/admin/usuarios.php
index c1617652..08ddc93c 100644
--- a/admin/usuarios.php
+++ b/admin/usuarios.php
@@ -38,7 +38,7 @@
throw new Exception('Não foi possível finalizar a transação!');
} catch (Exception $ex) {
if ($inTran)
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$msg = $ex->getMessage();
$jsStartup[] = "alert('$msg');";
}
diff --git a/agendaRamais/depto/dptoRamaisRelaciona.php b/agendaRamais/depto/dptoRamaisRelaciona.php
index ad0b1fd4..07207aa8 100644
--- a/agendaRamais/depto/dptoRamaisRelaciona.php
+++ b/agendaRamais/depto/dptoRamaisRelaciona.php
@@ -16,21 +16,21 @@ if (isset($fieldsForm['btIncGrupo'])) {
if (empty($fieldsForm['ramais'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um ramal!');
} else {
- @pg_query($dbcon, 'begin');
+ pg_query($dbcon, 'begin');
foreach ($fieldsForm['ramais'] as $ramal) {
$query = "insert into rma_depto_ramais (nome,dpto_id)values('%s', '%s')";
$query = sprintf($query, $ramal, $departamento);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result)
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
else
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = $result ? fmtMsg('Ramal incluido com sucesso!') : fmtErro('O Ramal não pode ser incluido!', pg_last_error($dbcon));
}
@@ -39,21 +39,21 @@ else if (isset($fieldsForm['btRmGrupo'])) {
if (empty($fieldsForm['ramaisInc'])) {
$fieldsForm['erro'] = fmtMsg('Selecione um ramal!');
} else {
- @pg_query($dbcon, 'begin');
+ pg_query($dbcon, 'begin');
foreach ($fieldsForm['ramaisInc'] as $ramalInc) {
$query = "DELETE FROM rma_depto_ramais WHERE nome='%s' AND dpto_id='%s'";
$query = sprintf($query, $ramalInc, $departamento);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result)
break;
}
if ($result)
- @pg_query($dbcon, 'commit');
+ pg_query($dbcon, 'commit');
else
- @pg_query($dbcon, 'rollback');
+ pg_query($dbcon, 'rollback');
$fieldsForm['erro'] = $result ? fmtMsg('Ramal removido com sucesso!') : fmtErro('O ramal não pode ser removido!', pg_last_error($dbcon));
}
diff --git a/agente/agenteAgenda.php b/agente/agenteAgenda.php
index 1aae0063..699d2350 100644
--- a/agente/agenteAgenda.php
+++ b/agente/agenteAgenda.php
@@ -22,7 +22,7 @@ $msg = "";
if (isset($_GET["formAction"])) {
$idDel = $_GET["id"];
$query = "delete from pbx_agendas where id = '$idDel'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
diff --git a/agente/agenteAnota.php b/agente/agenteAnota.php
index 793b1fc5..8430c930 100644
--- a/agente/agenteAnota.php
+++ b/agente/agenteAnota.php
@@ -21,7 +21,7 @@ $pesquisa = "";
if (isset($_GET["formAction"])) {
$idDel = $_GET["id"];
$query = "delete from pbx_anotacoes where id_text = '$idDel'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
if (!is_date($dataIni)) {
@@ -80,7 +80,7 @@ function PesquisaFone($db, $num) {
$query .= " and fone_cliente like '%" . $num . "%'";
$query .= " order by b.apelido, a.data desc";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
//if(IsAdmin()) echo $query;
while (($result) && ($row = pg_fetch_array($result))) {
$fone = GetAnotacoesKey() ? FormataFone($row["fone_cliente"]) : $row["fone_cliente"];
diff --git a/agente/agenteMesa.php b/agente/agenteMesa.php
index ea5bcaf8..7bc5bde7 100644
--- a/agente/agenteMesa.php
+++ b/agente/agenteMesa.php
@@ -569,7 +569,7 @@ function TransfPesquisa($db) {
* Pega o canal do agente
*/
$query = "select canal from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if ($result) {
$row = @pg_fetch_row($result);
}
@@ -589,7 +589,7 @@ function TransfPesquisa($db) {
where matricula = '$matricula'";
if ($result) {
- @pg_query($db, $query);
+ pg_query($db, $query);
}
echo $result ? "OK;Transferência realizada com sucesso!" : "ERRO;Não foi possível transferir para pesquisa!";
}
@@ -824,7 +824,7 @@ function IncluiDiscador($db) {
echo "OK@Operação realizada com sucesso!@$listaFones";
} catch (Exception $ex) {
if ($inTran)
- @pg_query($db, 'rollback');
+ pg_query($db, 'rollback');
RegistraLogAgente("IncluiDiscador", $ex->getMessage(), $ex);
echo sprintf("%s", $ex->getMessage());
}
@@ -1005,7 +1005,7 @@ function DadosAtualiza($dbcon) {
* Informacoes sobre o atendimento do agente
*/
$query = GetQueryAgenteRt(2);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if ($result && (pg_num_rows($result) > 0)) {
$dados = pg_fetch_array($result);
@@ -1052,7 +1052,7 @@ function EntraPausa($db, $codMotivo) {
/*
* Inicia a transação.
*/
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GetExcept("Erro ao iniciar o procedimento de pausa!");
}
@@ -1063,7 +1063,7 @@ function EntraPausa($db, $codMotivo) {
$query = "update pbx_supervisor_agentes
set status = 'PAUSA', motivo_pausa = '$motivoPausa', duracao = now(), origem_destino = ''
where matricula = '$matricula' and status <> 'PAUSA' ";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$result = $result && pg_affected_rows($result);
if (!$result) {
GetExcept("Falha ao atualizar registro de pausa na supervisão!");
@@ -1091,7 +1091,7 @@ function EntraPausa($db, $codMotivo) {
SetMsgAgente("O agente foi colocado em pausa!");
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("EntraPausa", $ex->getMessage(), $ex);
return false;
@@ -1124,7 +1124,7 @@ function SairPausa($db) {
@GetUrl(AST_REM_PAUSA);
}
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("Nao foi possivel iniciar o procedimento de retirada da pausa!");
}
@@ -1155,7 +1155,7 @@ function SairPausa($db) {
where matricula = '$matricula'
and id_dac = $dac
and entrada_pausa = (select max(entrada_pausa) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$result = $result && @pg_affected_rows($result);
if (!$result) {
@@ -1173,7 +1173,7 @@ function SairPausa($db) {
$_SESSION[SS_STATUS_AGENTE] = 'LIVRE';
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("SairPausa", $ex->getMessage(), $ex);
return false;
@@ -1374,7 +1374,7 @@ function ConnectaAgenteRt($db, $dac, $tpAtend) {
$_SESSION[SS_STATUS_AGENTE] = 'OFF';
$_SESSION[SS_EXIGE_CLASSIFICACAO] = NULL;
$_SESSION[SS_JUSTIFICATIVA_PAUSA] = NULL;
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
RegistraLogAgente("ConnectaAgenteRt", $ex->getMessage(), $ex);
return false;
}
@@ -1452,7 +1452,7 @@ function DesConectaAgenteRt($db) {
@GetUrl(AST_LOGOFF_AGENTE);
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("Não foi possível iniciar a desconexão do agente!");
}
@@ -1463,7 +1463,7 @@ function DesConectaAgenteRt($db) {
*/
$query = "delete from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if (!$result) {
GeraExcept("Não foi possível remover o agente da supervisão!");
@@ -1491,7 +1491,7 @@ function DesConectaAgenteRt($db) {
AgenteDesconectRt();
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("DesConectaAgenteRt", $ex->getMessage(), $ex);
return false;
@@ -1578,7 +1578,7 @@ function UpdateLogoffRt($db) {
where matricula = '$matricula'
and id_dac = $dac
and login = (select max(login) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- @pg_query($db, $query);
+ pg_query($db, $query);
}
function UpdatePausaRt($db) {
@@ -1590,7 +1590,7 @@ function UpdatePausaRt($db) {
where matricula = '$matricula'
and id_dac = $dac
and entrada_pausa = (select max(entrada_pausa) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- @pg_query($db, $query);
+ pg_query($db, $query);
}
function AgenteDesconectRt() {
@@ -1717,7 +1717,7 @@ function ClassificaChamada($db) {
function ExistePrefixo($db, $prefixo) {
$query = "select count(*) from pbx_municipio_prefixo where prx_prefixo = '$prefixo'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if ($result) {
$row = @pg_fetch_row($result);
return $row[0];
@@ -1731,7 +1731,7 @@ function GravaPrefixo($db, $munId, $prefixo, $upd = 0) {
} else {
$query = "insert into pbx_municipio_prefixo(mun_id, prx_prefixo)values('$munId', '$prefixo')";
}
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
return $result && @pg_affected_rows($result);
}
@@ -1754,7 +1754,7 @@ function AgtCallRt($db) {
/*
* Altera o status do numero na lista.
*/
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("1;ERRO;Não foi possível iniciar a operação!");
}
@@ -1770,14 +1770,14 @@ function AgtCallRt($db) {
/*
* A ligação já foi efetuada pela central.
*/
- @pg_query($db, "commit");
+ pg_query($db, "commit");
echo "0;OK;Discagem realizada com sucesso!";
} else if (isset($_GET["numeroDiscar"])) {
$matricula = GetMatricula();
$_SESSION[AGT_NUM_DISC] = $numeroDiscar;
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("1;ERRO;Não foi possível iniciar a transferência!");
}
@@ -1786,7 +1786,7 @@ function AgtCallRt($db) {
* obtem informações do canal.
*/
$query = "select canal from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if (!$result) {
GeraExcept("1;ERRO;Não foi possível obter informações sobre o canal para transferência!");
}
@@ -1832,7 +1832,7 @@ function AgtCallRt($db) {
}
} catch (Exception $ex) {
if ($inTran) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
}
RegistraLogAgente("AgtCallRt", $ex->getMessage(), $ex);
echo $ex->getMessage();
@@ -1906,7 +1906,7 @@ function IniciaTransferenciaConsultaRt() {
* Tenta alterar as informações no agente.
*/
$query = "update pbx_supervisor_agentes set canal_transfer = 'Agent/$matricula' where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
echo "2;OK;Transferencia Iniciada";
} else {
@@ -1928,7 +1928,7 @@ function IniciaTransferenciaConsultaRt() {
* Tenta alterar as informações no agente.
*/
$query = "update pbx_supervisor_agentes set canal_transfer = '' where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
} catch (Exception $ex) {
RegistraLogAgente("IniciaTransferenciaConsultaRt", $ex->getMessage(), $ex);
@@ -1995,7 +1995,7 @@ function DesligarChamadaRt() {
* Tenta limpar o canal de transferencia.
*/
$query = "update pbx_supervisor_agentes set canal_transfer = '' where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
return "OK;Chamada transferida com sucesso!";
} else {
@@ -2043,7 +2043,7 @@ function DesligarChamadaRt() {
//$result = GetUrl(AST_DESLIGAR_LIGACAO);
//if(!$result){ GeraExcept("ERRO;Não foi possível desligar a chamada na central!"); }
- $result = @pg_query($dbcon, 'commit');
+ $result = pg_query($dbcon, 'commit');
if (!$result) {
GeraExcept("ERRO;Não foi possível finalizar o registro de informaçoes!");
}
@@ -2065,7 +2065,7 @@ function IniciaPenduloRt() {
try {
$query = "select canal, ramal, nome, dac, canal_agente, uniqueid, sala_2 from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result) {
GeraExcept("2;WNG;Não foi possível acessar informações sobre a chamada!");
}
@@ -2151,26 +2151,26 @@ function DisponivelAtendimento($useTran = 1) {
* $dspSet true indica que uma transação já foi aberta.
*/
if ($useTran) {
- $result = @pg_query('begin');
+ $result = pg_query('begin');
if (!$result) {
GeraExcept("ERRO;Não foi possível iniciar o registro de informaçoes!");
}
$inTran = 1;
}
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result) {
GeraExcept("ERRO;Não foi possível registrar informaçoes sobre a indisponibilidade!");
}
$query = "update pbx_supervisor_agentes set disponivel_atendimento = '$newDispo' where matricula = '$matricula' ";
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result) {
GeraExcept("ERRO;Não foi possível alterar inforaçoes para supervisao!");
}
if ($useTran) {
- $result = @pg_query('commit');
+ $result = pg_query('commit');
if (!$result) {
GeraExcept("ERRO;Não foi possível finalizar o registro de informaçoes!");
}
@@ -2217,7 +2217,7 @@ function SetaClassificaChamado($db, $st, $setPausa = 0) {
set chamada_classificado = '$st'
where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if ($result && $setPausa) {
@@ -2232,7 +2232,7 @@ function SetaClassificaChamado($db, $st, $setPausa = 0) {
function GetChamadaClassificada() {
$matricula = GetMatricula();
$query = "select '' from pbx_supervisor_agentes where matricula = '$matricula' and (chamada_classificado <> 0 or coalesce(uniqueid2, '') = '')";
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result || !pg_num_rows($result)) {
return false;
@@ -2243,7 +2243,7 @@ function GetChamadaClassificada() {
function LiberaPausa($db, $matricula) {
$query = "select count(*) from pbx_supervisor_agentes where matricula = '$matricula' and upper(motivo_pausa) = 'ACW'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$dados = pg_fetch_row($result);
return !($_SESSION["SSPausaAtomatica"] && $dados[0]);
diff --git a/agente/agentert.php b/agente/agentert.php
index cc745300..3ba6c396 100644
--- a/agente/agentert.php
+++ b/agente/agentert.php
@@ -669,7 +669,7 @@ function TransfPesquisa($db) {
* Pega o canal do agente
*/
$query = "select canal, uniqueid, dac from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if (!$result || !pg_num_rows($result)) {
GeraExcept("Não foi possível obter informações da chamada!");
}
@@ -694,7 +694,7 @@ function TransfPesquisa($db) {
}
$sql = sprintf("INSERT INTO pbx_pesquisa_log (uniqueid, id_dac, fila, matricula, pl_id, plog_log) VALUES (%s, %s, %s, %s, %s, %s);", QuotedStr($uid), QuotedStr(GetDacCod($db, $dac)), QuotedStr($dac), QuotedStr($matricula), QuotedStr($plId), QuotedStr('MANUAL'));
- $rst = @pg_query($db, $sql);
+ $rst = pg_query($db, $sql);
if (!$rst) {
GeraExcept("Não foi possível registrar o envio para a pesquisa!");
@@ -713,7 +713,7 @@ function TransfPesquisa($db) {
canal_transfer = '',
uniqueid = ''
where matricula = '$matricula'";
- @pg_query($db, $query);
+ pg_query($db, $query);
/*
* Notifica o agente que a chamada foi encaminhada para a pesquisa com sucesso.
@@ -1019,7 +1019,7 @@ function IncluiDiscador($db) {
echo "OK@Operação realizada com sucesso!@$listaFones";
} catch (Exception $ex) {
if ($inTran)
- @pg_query($db, 'rollback');
+ pg_query($db, 'rollback');
RegistraLogAgente("IncluiDiscador", $ex->getMessage(), $ex);
echo sprintf("%s", $ex->getMessage());
}
@@ -1200,7 +1200,7 @@ function DadosAtualiza($dbcon) {
* Informacoes sobre o atendimento do agente
*/
$query = GetQueryAgenteRt(2);
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if ($result && (pg_num_rows($result) > 0)) {
$dados = pg_fetch_array($result, null, PGSQL_ASSOC);
@@ -1252,7 +1252,7 @@ function EntraPausa($db, $codMotivo) {
/*
* Inicia a transação.
*/
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GetExcept("Erro ao iniciar o procedimento de pausa!");
}
@@ -1263,7 +1263,7 @@ function EntraPausa($db, $codMotivo) {
$query = "update pbx_supervisor_agentes
set status = 'PAUSA', motivo_pausa = '$motivoPausa', duracao = now(), origem_destino = ''
where matricula = '$matricula' and status <> 'PAUSA' ";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$result = $result && pg_affected_rows($result);
if (!$result) {
GetExcept("Falha ao atualizar registro de pausa na supervisão!");
@@ -1291,7 +1291,7 @@ function EntraPausa($db, $codMotivo) {
SetMsgAgente("O agente foi colocado em pausa!");
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("EntraPausa", $ex->getMessage(), $ex);
return false;
@@ -1340,7 +1340,7 @@ function SairPausa($db) {
@GetUrl(AST_REM_PAUSA);
}
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("Nao foi possivel iniciar o procedimento de retirada da pausa!");
}
@@ -1374,7 +1374,7 @@ function SairPausa($db) {
where matricula = '$matricula'
and id_dac = $dac
and entrada_pausa = (select max(entrada_pausa) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$result = $result && @pg_affected_rows($result);
if (!$result) {
@@ -1392,7 +1392,7 @@ function SairPausa($db) {
$_SESSION[SS_STATUS_AGENTE] = 'LIVRE';
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("SairPausa", $ex->getMessage(), $ex);
return false;
@@ -1622,7 +1622,7 @@ function ConnectaAgenteRt($db, $dac, $tpAtend) {
$_SESSION[SS_STATUS_AGENTE] = 'OFF';
$_SESSION[SS_EXIGE_CLASSIFICACAO] = NULL;
$_SESSION[SS_JUSTIFICATIVA_PAUSA] = NULL;
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
RegistraLogAgente("ConnectaAgenteRt", $ex->getMessage(), $ex);
return false;
}
@@ -1675,7 +1675,7 @@ function DesConectaAgenteRt($db, $type = '') {
@GetUrl(AST_LOGOFF_AGENTE);
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("Não foi possível iniciar a desconexão do agente!");
}
@@ -1686,7 +1686,7 @@ function DesConectaAgenteRt($db, $type = '') {
*/
$query = "delete from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if (!$result) {
GeraExcept("Não foi possível remover o agente da supervisão!");
@@ -1714,7 +1714,7 @@ function DesConectaAgenteRt($db, $type = '') {
AgenteDesconectRt();
return true;
} catch (Exception $ex) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
SetMsgAgente($ex->getMessage());
RegistraLogAgente("DesConectaAgenteRt", $ex->getMessage(), $ex);
return false;
@@ -1801,7 +1801,7 @@ function UpdateLogoffRt($db) {
where matricula = '$matricula'
and id_dac = $dac
and login = (select max(login) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- @pg_query($db, $query);
+ pg_query($db, $query);
}
function UpdatePausaRt($db) {
@@ -1813,7 +1813,7 @@ function UpdatePausaRt($db) {
where matricula = '$matricula'
and id_dac = $dac
and entrada_pausa = (select max(entrada_pausa) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)";
- @pg_query($db, $query);
+ pg_query($db, $query);
}
function AgenteDesconectRt() {
@@ -1885,14 +1885,14 @@ function LimpaConexao($db) {
* Quando este parametro for 0 nao mais ha dados do agennte nesta tabela
*/
$query = "delete from pbx_supervisor_agentes where matricula = '$matricula'";
- @pg_query($db, $query);
+ pg_query($db, $query);
$query = "update pbx_eventos_agentes
set logoff = now(), flag = 2
where matricula = '$matricula'
and id_dac = '$dac'
and login = (select max(login) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = '$dac') ";
- @pg_query($db, $query);
+ pg_query($db, $query);
@LogAgente("LimpaConexao", "Logado: {$matricula}", false);
AgenteDesconectRt();
@@ -2024,7 +2024,7 @@ function ClassificaChamada($db) {
function ExistePrefixo($db, $prefixo) {
$query = "select count(*) from pbx_municipio_prefixo where prx_prefixo = '$prefixo'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if ($result) {
$row = @pg_fetch_row($result);
return $row[0];
@@ -2038,7 +2038,7 @@ function GravaPrefixo($db, $munId, $prefixo, $upd = 0) {
} else {
$query = "insert into pbx_municipio_prefixo(mun_id, prx_prefixo)values('$munId', '$prefixo')";
}
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
return $result && @pg_affected_rows($result);
}
@@ -2068,7 +2068,7 @@ function AgtCallRt($db) {
/*
* Altera o status do numero na lista.
*/
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("1;ERRO;Não foi possível iniciar a operação!");
}
@@ -2084,14 +2084,14 @@ function AgtCallRt($db) {
/*
* A ligação já foi efetuada pela central.
*/
- @pg_query($db, "commit");
+ pg_query($db, "commit");
echo "0;OK;Discagem realizada com sucesso!";
} else if (isset($_GET["numeroDiscar"])) {
$matricula = GetMatricula();
$_SESSION[AGT_NUM_DISC] = $numeroDiscar;
- $result = @pg_query($db, "begin");
+ $result = pg_query($db, "begin");
if (!$result) {
GeraExcept("1;ERRO;Não foi possível iniciar a transferência!");
}
@@ -2100,7 +2100,7 @@ function AgtCallRt($db) {
* obtem informações do canal.
*/
$query = "select canal, canal_agente from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if (!$result) {
GeraExcept("1;ERRO;Não foi possível obter informações sobre o canal para transferência!");
}
@@ -2153,7 +2153,7 @@ function AgtCallRt($db) {
}
} catch (Exception $ex) {
if ($inTran) {
- @pg_query($db, "rollback");
+ pg_query($db, "rollback");
}
RegistraLogAgente("AgtCallRt", $ex->getMessage(), $ex);
echo $ex->getMessage();
@@ -2230,7 +2230,7 @@ function IniciaTransferenciaConsultaRt() {
* Tenta alterar as informações no agente.
*/
$query = "update pbx_supervisor_agentes set canal_transfer = 'Agent/$matricula' where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
echo "2;OK;Transferencia Iniciada";
} else {
@@ -2252,7 +2252,7 @@ function IniciaTransferenciaConsultaRt() {
* Tenta alterar as informações no agente.
*/
$query = "update pbx_supervisor_agentes set canal_transfer = '' where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
}
} catch (Exception $ex) {
RegistraLogAgente("IniciaTransferenciaConsultaRt", $ex->getMessage(), $ex);
@@ -2340,7 +2340,7 @@ function DesligarChamadaRt() {
canal_transfer = '',
uniqueid = ''
where matricula = '$matricula'";
- @pg_query($dbcon, $query);
+ pg_query($dbcon, $query);
return "OK;Chamada transferida com sucesso!";
} else {
@@ -2388,7 +2388,7 @@ function DesligarChamadaRt() {
//$result = GetUrl(AST_DESLIGAR_LIGACAO);
//if(!$result){ GeraExcept("ERRO;Não foi possível desligar a chamada na central!"); }
- $result = @pg_query($dbcon, 'commit');
+ $result = pg_query($dbcon, 'commit');
if (!$result) {
GeraExcept("ERRO;Não foi possível finalizar o registro de informaçoes!");
}
@@ -2410,7 +2410,7 @@ function IniciaPenduloRt() {
try {
$query = "select canal, ramal, nome, dac, canal_agente, uniqueid, sala_2 from pbx_supervisor_agentes where matricula = '$matricula'";
- $result = @pg_query($dbcon, $query);
+ $result = pg_query($dbcon, $query);
if (!$result) {
GeraExcept("2;WNG;Não foi possível acessar informações sobre a chamada!");
}
@@ -2507,26 +2507,26 @@ function DisponivelAtendimento($useTran = 1) {
* $dspSet true indica que uma transação já foi aberta.
*/
if ($useTran) {
- $result = @pg_query('begin');
+ $result = pg_query('begin');
if (!$result) {
GeraExcept("ERRO;Não foi possível iniciar o registro de informaçoes!");
}
$inTran = 1;
}
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result) {
GeraExcept("ERRO;Não foi possível registrar informaçoes sobre a indisponibilidade!");
}
$query = "update pbx_supervisor_agentes set disponivel_atendimento = '$newDispo' where matricula = '$matricula' ";
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result) {
GeraExcept("ERRO;Não foi possível alterar inforaçoes para supervisao!");
}
if ($useTran) {
- $result = @pg_query('commit');
+ $result = pg_query('commit');
if (!$result) {
GeraExcept("ERRO;Não foi possível finalizar o registro de informaçoes!");
}
@@ -2587,7 +2587,7 @@ function SetaClassificaChamado($db, $st, $setPausa = 0) {
set chamada_classificado = '$st' $subQuery
where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
if ($result && $setPausa) {
if ($_SESSION["SS_CK_DISPO"] && LiberaPausa($db, $matricula)) {
@@ -2606,7 +2606,7 @@ function GetChamadaClassificada() {
*/
$matricula = GetMatricula();
$query = "select '' from pbx_supervisor_agentes where matricula = '$matricula' and ( (chamada_classificado <> 0) or (coalesce(uniqueid2, '') = '') or (upper(motivo_pausa) in('AUSENTE', 'RECUSADA')))";
- $result = @pg_query($query);
+ $result = pg_query($query);
if (!$result || !pg_num_rows($result)) {
return false;
@@ -2624,7 +2624,7 @@ function GetCanalAudioClassificacao() {
function LiberaPausa($db, $matricula) {
$query = "select count(*) from pbx_supervisor_agentes where matricula = '$matricula' and upper(motivo_pausa) = 'ACW'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$dados = pg_fetch_row($result);
return !($_SESSION["SSPausaAtomatica"] && $dados[0]);
@@ -2733,7 +2733,7 @@ function GetStatusChamadaClassificada($dac) {
if (!$resp['data_reg']) {
$sql = "UPDATE pbx_supervisor_agentes SET origem_destino = '{$resp['dst']}', uniqueid2 = '{$resp['uniqueid']}', protocolo = '{$resp['protocolo']}' ,chamada_classificado = 0 WHERE matricula = '$matricula'";
- @pg_query($sql);
+ pg_query($sql);
return $resp['userfield'];
}
diff --git a/agente/funcoesAgente.php b/agente/funcoesAgente.php
index b5736735..bfbb0687 100644
--- a/agente/funcoesAgente.php
+++ b/agente/funcoesAgente.php
@@ -64,7 +64,7 @@ function DispRel($smarty, $tpl) {
}
function GetStChamada($db, &$tme, &$tma, &$atd, &$fila) {
- $result = @pg_query($db, GetQryStatusChamadas());
+ $result = pg_query($db, GetQryStatusChamadas());
$st = @pg_num_rows($result) > 0;
$dados = @pg_fetch_array($result);
$tme = $st ? $dados["tme"] : "0";
@@ -75,17 +75,17 @@ function GetStChamada($db, &$tme, &$tma, &$atd, &$fila) {
function GetInfoChamada($db, &$stAgtAtende, &$lgd, &$dura, &$qtFila, &$fone, &$abd, &$unqId) {
- $result = @pg_query($db, GetQryInfoGeral());
+ $result = pg_query($db, GetQryInfoGeral());
$st = @pg_num_rows($result) > 0;
$dados = @pg_fetch_array($result);
$qtFila = $st ? $dados["espera"] : "0";
- $result = @pg_query($db, GetQryStatusChamadas(false));
+ $result = pg_query($db, GetQryStatusChamadas(false));
$st = @pg_num_rows($result) > 0;
$dados = @pg_fetch_array($result);
$abd = $st ? $dados["abandonadas"] : "0";
- $result = @pg_query($db, GetQryInfoChamadasCorrente());
+ $result = pg_query($db, GetQryInfoChamadasCorrente());
$st = @pg_num_rows($result) > 0;
$dados = @pg_fetch_array($result);
$unqId = $dados["uniqueid"];
@@ -103,19 +103,19 @@ function UpdateLogoff($db) {
$query = "update pbx_supervisor_agentes
set logado = now()
where matricula = '$matricula'";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$query = "update pbx_eventos_agentes
set logoff = now(),
flag = 1
where id = $idLogoff";
- @pg_query($db, $query);
+ pg_query($db, $query);
$query = "select count(*) from pbx_supervisor_agentes where matricula = '$matricula' ";
//echo $query;
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$row = @pg_fetch_row($result);
if ((!$row[0] && DesConectaAgente($db, 0)) || (GetPausa($db, GetMatricula()))) {
echo "999";
@@ -130,14 +130,14 @@ function UpdatePausa($db) {
set saida_pausa = now(),
flag = 1
where id = $idPausa ";
- @pg_query($db, $query);
+ pg_query($db, $query);
}
}
function AgentePausa() {
$matricula = GetMatricula();
$query = "select count(*) from pbx_supervisor_agentes where matricula = '$matricula' and upper(status) = 'PAUSA' ";
- $result = @pg_query($query);
+ $result = pg_query($query);
$row = @pg_fetch_row($result);
return $row[0];
}
@@ -145,7 +145,7 @@ function AgentePausa() {
function AgenteLivre() {
$matricula = GetMatricula();
$query = "select count(*) from pbx_supervisor_agentes where matricula = '$matricula' and upper(status) = 'LIVRE' ";
- $result = @pg_query($query);
+ $result = pg_query($query);
$row = @pg_fetch_row($result);
return $row[0];
}
@@ -222,7 +222,7 @@ function GetMotivoPausa() {
global $dbcon;
$matricula = GetMatricula();
$query = "SELECT motivo_pausa FROM pbx_supervisor_agentes WHERE matricula = '$matricula'";
- $resp = @pg_query($dbcon, $query);
+ $resp = pg_query($dbcon, $query);
$row = pg_fetch_assoc($resp);
return strtoupper($row['motivo_pausa']);
}
@@ -233,7 +233,7 @@ function GetPausaLogin() {
function CarregaMunicipios($db) {
$query = "select uf from pbx_uf order by 1";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$ufs = "";
$mun = "";
@@ -242,7 +242,7 @@ function CarregaMunicipios($db) {
$ufs .= empty($ufs) ? "['$uf'," : ",['$uf',";
$query = "select mun_id as uf, mun_nome from pbx_municipio_classifica where uf = '$uf' order by uf, mun_nome";
- $resultItem = @pg_query($db, $query);
+ $resultItem = pg_query($db, $query);
$mun = "";
while ($dadosItem = @pg_fetch_row($resultItem)) {
$munUf = $dadosItem[0];
@@ -300,7 +300,7 @@ function CarregaClassificacao($db, $dacSel) {
and c.clas_id = a.clas_id
and a.clas_status = 1
order by 3";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$clas = "";
$item = "";
@@ -311,7 +311,7 @@ function CarregaClassificacao($db, $dacSel) {
$clas .= empty($clas) ? "['$dac', '$id','$desc'," : ",['$dac', '$id','$desc',";
$query = " SELECT clas_id, clit_id, clit_descricao FROM pbx_classifica_item where clas_id = $id and clit_status = 1 order by 3";
- $resultItem = @pg_query($db, $query);
+ $resultItem = pg_query($db, $query);
$item = "";
while ($dadosItem = @pg_fetch_row($resultItem)) {
$idItem = $dadosItem[1];
@@ -371,7 +371,7 @@ function CarregaClassificacao($db, $dacSel) {
function ___GetItem($db, $idClas, $idItem) {
$query = " SELECT clit_id, clit_descricao FROM pbx_classifica_item where clas_id = $idClas and clit_status = 1 order by 2";
- $result = @pg_query($db, $query);
+ $result = pg_query($db, $query);
$clas = "