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 = "%s'; $lista = sprintf($lista, $nomeLista, ($multiple ? '[]' : ''), $nomeLista, $size, $tamPx, ($multiple ? 'multiple="multiple"' : ''), "\n"); diff --git a/cadastros/prevenda/listacampanhacliente.php b/cadastros/prevenda/listacampanhacliente.php index 78c68384..67a4337a 100644 --- a/cadastros/prevenda/listacampanhacliente.php +++ b/cadastros/prevenda/listacampanhacliente.php @@ -354,7 +354,7 @@ $query = "INSERT INTO pbx_campanha(cmp_descricao, cmp_ramal, id_dac, cmp_aguarda_agente, cmp_numero_ligacoes_agente, ident_proc, cmp_status, cmp_tipo_campanha, cmp_seletiva) VALUES(%s,'-1',%s,'1','1',%s,'2','9','1') RETURNING cmp_id;"; $query = sprintf($query, QuotedStr(trim($descricao)), QuotedStr($dac), QuotedStr('Inserido: listacampanhacliente Data: ' . date('Y-m-d H:i:s'))); - $result = @pg_query($query); + $result = pg_query($query); if (!$result) { __transaction('ROLLBACK;'); @@ -375,7 +375,7 @@ $queryRefinc .= "INSERT INTO pbx_status_contato_campanha(ctst_id,cmp_id) VALUES({$ref['ctst_id']},{$data['cmp_id']}); "; } - if (!@pg_query($queryRefinc)) { + if (!pg_query($queryRefinc)) { __transaction('ROLLBACK;'); throw new Exception("[ERROR CAMPANHA 007] - Não foi possível criar os status da campanha informado!"); } @@ -389,7 +389,7 @@ $queryPerm .= " INSERT INTO pbx_campanha_usuarios (cmp_id, matricula) VALUES('{$data['cmp_id']}','{$value['matricula']}'); "; } - if (!@pg_query($queryPerm)) { + if (!pg_query($queryPerm)) { __transaction('ROLLBACK;'); throw new Exception("[ERROR LIST 005] - Não foi possível inserir a permissao para os agentes! "); } diff --git a/cadastros/tarifacao/cadContratoPreco.php b/cadastros/tarifacao/cadContratoPreco.php index 50d6e127..73b49115 100644 --- a/cadastros/tarifacao/cadContratoPreco.php +++ b/cadastros/tarifacao/cadContratoPreco.php @@ -109,12 +109,12 @@ if ($_GET['acao'] == 'alterar') { $result = AtualizaFranquia($dbcon, $dadosForm); if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); foreach ($fields as $key) { $smarty->assign($key, $_POST[$key]); } } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); foreach ($fields as $key) { if (!array_key_exists($key, $fieldsKey)) $smarty->assign($key, ''); @@ -240,7 +240,7 @@ function AtualizaFranquia($dbcon, $dadosForm) { $result = pg_query($dbcon, 'commit'); } else { $result = false; - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); } } } @@ -403,7 +403,7 @@ function AtualizaFranquiaOld($dbcon, $dadosForm) { if ($result) $result = pg_query($dbcon, 'commit'); else - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); } if ($result) diff --git a/cadastros/tarifacao/cadPrePagoConta.php b/cadastros/tarifacao/cadPrePagoConta.php index 1b7b4e3b..96f4c451 100644 --- a/cadastros/tarifacao/cadPrePagoConta.php +++ b/cadastros/tarifacao/cadPrePagoConta.php @@ -86,11 +86,11 @@ if (IsPostBack() || $estorno) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $msg = $msg ? $msg : 'Não foi possível realizar a operação!'; $jsStartup[] = "alert('$msg');"; } @@ -120,11 +120,11 @@ if (IsPostBack() || $estorno) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Não foi possível realizar a operação!');"; } } diff --git a/cadastros/tarifacao/cadPrePagoRamal.php b/cadastros/tarifacao/cadPrePagoRamal.php index e2dbdfa8..0fd0b497 100644 --- a/cadastros/tarifacao/cadPrePagoRamal.php +++ b/cadastros/tarifacao/cadPrePagoRamal.php @@ -97,11 +97,11 @@ if (IsPostBack() || $estorno) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $msg = $msg ? $msg : 'Não foi possível realizar a operação!'; $jsStartup[] = "alert('$msg');"; } @@ -128,11 +128,11 @@ if (IsPostBack() || $estorno) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Não foi possível realizar a operação!');"; } } diff --git a/cadastros/tarifacao/prePagoConta.php b/cadastros/tarifacao/prePagoConta.php index eeb533dc..f16f14e9 100644 --- a/cadastros/tarifacao/prePagoConta.php +++ b/cadastros/tarifacao/prePagoConta.php @@ -88,11 +88,11 @@ if (IsPostBack()) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $msg = $msg ? $msg : 'Não foi possível realizar a operação!'; $jsStartup[] = "alert('$msg');"; } diff --git a/cadastros/tarifacao/prePagoRamal.php b/cadastros/tarifacao/prePagoRamal.php index 83a176ef..a67f46e7 100644 --- a/cadastros/tarifacao/prePagoRamal.php +++ b/cadastros/tarifacao/prePagoRamal.php @@ -99,11 +99,11 @@ if (IsPostBack()) { if ($result) { $queryRamal = 'commit'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $jsStartup[] = "alert('Operação realizada com sucesso!');"; } else { $queryRamal = 'rollback'; - @pg_query($dbcon, $queryRamal); + pg_query($dbcon, $queryRamal); $msg = $msg ? $msg : 'Não foi possível realizar a operação!'; $jsStartup[] = "alert('$msg');"; } diff --git a/cadastros/tarifacao/tarifacaoContrato.php b/cadastros/tarifacao/tarifacaoContrato.php index 23572cd0..5f890128 100644 --- a/cadastros/tarifacao/tarifacaoContrato.php +++ b/cadastros/tarifacao/tarifacaoContrato.php @@ -77,7 +77,7 @@ if (IsDelete()) { Alert("Registro excluido com sucesso!"); } catch (Exception $ex) { - @pg_query('rollback'); + pg_query('rollback'); Alert($ex->getMessage()); } } diff --git a/cadastros/tarifacao/tarifacaoOperadorasRel.php b/cadastros/tarifacao/tarifacaoOperadorasRel.php index 7322a32e..c6d6fb92 100644 --- a/cadastros/tarifacao/tarifacaoOperadorasRel.php +++ b/cadastros/tarifacao/tarifacaoOperadorasRel.php @@ -7,7 +7,7 @@ $oper_nome = $_REQUEST["oper_nome"]; if (isset($_POST["btIncOperadora"])) { $operadoras = $_POST["operadoras"]; - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($operadoras as $oper_spid_rel) { $query = "insert into pbx_operadora_rel(oper_spid, oper_spid_rel ) select '$oper_spid', '$oper_spid_rel' @@ -18,16 +18,16 @@ if (isset($_POST["btIncOperadora"])) { } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } } else if (isset($_POST["btRmOper"])) { $operadoras = $_POST["operadorasRel"]; - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($operadoras as $oper_spid_rel) { $query = "delete from pbx_operadora_rel where oper_spid = '$oper_spid' and oper_spid_rel = '$oper_spid_rel' "; $result = pg_query($dbcon, $query); @@ -36,10 +36,10 @@ if (isset($_POST["btIncOperadora"])) { } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } diff --git a/cadastros/tpl/baseDelete.php b/cadastros/tpl/baseDelete.php index 94cd5db7..f6e02e9c 100644 --- a/cadastros/tpl/baseDelete.php +++ b/cadastros/tpl/baseDelete.php @@ -13,7 +13,7 @@ $numReg = 0; * Verifica se exite registro para delecao */ $query = "select * from pbx_..._ where ... = $id"; -$result = @pg_query($dbcon, $query); +$result = pg_query($dbcon, $query); if ($result) { @@ -23,24 +23,24 @@ if ($result) { if ($numReg == 0) { $query = "begin"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $query = "delete from pbx_... where ... = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $query = "delete from pbx_... where gp_... = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } } if ($result) { $query = "commit"; - @pg_query($dbcon, $query); + pg_query($dbcon, $query); echo "OK; Registro excluido com sucesso!"; } else { $query = "rollback"; - @pg_query($dbcon, $query); + pg_query($dbcon, $query); echo "ERRO; Não é possível excluir este registro! Erro: " . pg_last_error(); } } else { diff --git a/cadastros/tpl/baseInsert.php b/cadastros/tpl/baseInsert.php index 3a07177a..70dd35de 100644 --- a/cadastros/tpl/baseInsert.php +++ b/cadastros/tpl/baseInsert.php @@ -30,17 +30,17 @@ if ($formAction == FORM_NEW) { GetGpValues(); // Inicia uma transação no banco de dados - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); if ($result) { //Prepara a query para inserir o registro no banco $query = sprintf($query, QuotedStr($gp_nome), QuotedStr($gp_status)); //Executa a query no banco - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) - $result = @pg_query($dbcon, "commit"); + $result = pg_query($dbcon, "commit"); } if ($result) { $acaoUser = 'Incluir'; @@ -48,7 +48,7 @@ if ($formAction == FORM_NEW) { LimpaGpVar(); } else { $erroBd = @pg_last_error($dbcon); - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); $acaoUser = 'Incluir'; $msgUser = "alert('A operação não pode ser realizada!Erro: $erroBd');"; $msgErro = "A operação não pode ser realizada!Erro: $erroBd"; diff --git a/cadastros/tpl/baseSelect.php b/cadastros/tpl/baseSelect.php index 8240f286..5f94a454 100644 --- a/cadastros/tpl/baseSelect.php +++ b/cadastros/tpl/baseSelect.php @@ -25,7 +25,7 @@ if ($isPostBack) { $query = "select from pbx_... \n"; $query .= "where upper(...) like upper('%$param%') order by ..."; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $linha = ""; while (($result) && ($dados = @pg_fetch_array($result))) { diff --git a/cadastros/tpl/baseUpdate.php b/cadastros/tpl/baseUpdate.php index 4fe4925a..6bede6cd 100644 --- a/cadastros/tpl/baseUpdate.php +++ b/cadastros/tpl/baseUpdate.php @@ -34,7 +34,7 @@ if ($formAction == FORM_UPDATE) { //Executa a query no banco - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { diff --git a/cadastros/workflow/workflow.php b/cadastros/workflow/workflow.php index ff8340c8..0e928f3d 100644 --- a/cadastros/workflow/workflow.php +++ b/cadastros/workflow/workflow.php @@ -20,19 +20,19 @@ WkfDefault($dbcon); if (isset($_GET["wkf_email_id"])) { $wkf_email_id = $_GET["wkf_email_id"]; - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); $query = "delete from pbx_workflow_emails_dacs where wkf_email_id = '$wkf_email_id'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $query = "delete from pbx_workflow_emails where wkf_email_id = '$wkf_email_id'"; if ($result) - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $jsStartup[] = "alert('Email removido com sucesso!);"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $msg = "O email não pode ser removido, tente novamente mais tarde!"; $msgErro = $msg; $jsStartup[] = "alert('$msg');"; diff --git a/cadastros/workflow/workflowEmailsDacs.php b/cadastros/workflow/workflowEmailsDacs.php index c6fc0281..4cca366c 100644 --- a/cadastros/workflow/workflowEmailsDacs.php +++ b/cadastros/workflow/workflowEmailsDacs.php @@ -20,7 +20,7 @@ if (isset($fieldsForm['btIncDac'])) { $fieldsForm['erro'] = fmtMsg('Selecione um Dac!'); } else { /* Inicio da transacao */ - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); /* * Insere dacs relacionado ao email conforme selecionado @@ -28,16 +28,16 @@ if (isset($fieldsForm['btIncDac'])) { foreach ($fieldsForm['listaDacs'] as $idDac) { $query = "insert into pbx_workflow_emails_dacs(wkf_email_id, nome_dac) values(%s, '%s')"; $query = sprintf($query, $wkf_email_id, $idDac); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if (!$result) break; } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $jsStartup[] = "window.opener.ResetForm();"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); } $fieldsForm['erro'] = $result ? fmtMsg('Dac incluido com sucesso!') : fmtErro('O Dac não pode ser incluido!', pg_last_error($dbcon)); @@ -46,22 +46,22 @@ if (isset($fieldsForm['btIncDac'])) { if (empty($fieldsForm['listaDacsInc'])) { $fieldsForm['erro'] = fmtMsg('Selecione um Dac!'); } else { - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($fieldsForm['listaDacsInc'] as $idDac) { $query = "delete from pbx_workflow_emails_dacs where nome_dac = '%s' and wkf_email_id = '%s' "; $query = sprintf($query, $idDac, $wkf_email_id); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if (!$result) break; } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $jsStartup[] = "window.opener.ResetForm();"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); } $fieldsForm['erro'] = $result ? fmtMsg('Dac removido com sucesso!') : fmtErro('O Dac não pode ser removido!', pg_last_error($dbcon)); diff --git a/composer.lock b/composer.lock index 0cffcc1b..7895a2ec 100644 --- a/composer.lock +++ b/composer.lock @@ -12,25 +12,27 @@ "source": { "type": "git", "url": "https://github.com/ratchetphp/Ratchet.git", - "reference": "b85c2a1f189e43f7f0861daf7ff81d016c5d6403" + "reference": "5012dc954541b40c5599d286fd40653f5716a38f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ratchetphp/Ratchet/zipball/b85c2a1f189e43f7f0861daf7ff81d016c5d6403", - "reference": "b85c2a1f189e43f7f0861daf7ff81d016c5d6403", + "url": "https://api.github.com/repos/ratchetphp/Ratchet/zipball/5012dc954541b40c5599d286fd40653f5716a38f", + "reference": "5012dc954541b40c5599d286fd40653f5716a38f", "shasum": "" }, "require": { - "guzzlehttp/psr7": "^1.0", + "guzzlehttp/psr7": "^1.7|^2.0", "php": ">=5.4.2", - "ratchet/rfc6455": "^0.2", + "ratchet/rfc6455": "^0.3.1", + "react/event-loop": ">=0.4", "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5", - "symfony/http-foundation": "^2.6|^3.0|^4.0", - "symfony/routing": "^2.6|^3.0|^4.0" + "symfony/http-foundation": "^2.6|^3.0|^4.0|^5.0|^6.0", + "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0" }, "require-dev": { "phpunit/phpunit": "~4.8" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -46,6 +48,10 @@ "name": "Chris Boden", "email": "cboden@gmail.com", "role": "Developer" + }, + { + "name": "Matt Bonneau", + "role": "Developer" } ], "description": "PHP WebSocket library", @@ -57,34 +63,34 @@ "sockets", "websocket" ], - "time": "2019-03-10T17:14:50+00:00" + "support": { + "chat": "https://gitter.im/reactphp/reactphp", + "issues": "https://github.com/ratchetphp/Ratchet/issues", + "source": "https://github.com/ratchetphp/Ratchet/tree/v0.4.4" + }, + "time": "2021-12-14T00:20:41+00:00" }, { "name": "evenement/evenement", - "version": "v2.1.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "6ba9a777870ab49f417e703229d53931ed40fd7a" + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/6ba9a777870ab49f417e703229d53931ed40fd7a", - "reference": "6ba9a777870ab49f417e703229d53931ed40fd7a", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^6.0||^5.7||^4.8.35" + "phpunit/phpunit": "^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { "psr-0": { "Evenement": "src" @@ -105,7 +111,11 @@ "event-dispatcher", "event-emitter" ], - "time": "2017-07-17T17:39:19+00:00" + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/master" + }, + "time": "2017-07-23T21:35:13+00:00" }, { "name": "ezyang/htmlpurifier", @@ -170,39 +180,44 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.5.2", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -212,14 +227,40 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -233,37 +274,58 @@ "uri", "url" ], - "time": "2018-12-04T20:46:45+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-04-17T16:11:26+00:00" }, { "name": "maennchen/zipstream-php", - "version": "v2.4.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3" + "reference": "b46726e666b5d2ad32959ae9492ee1034e798162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", - "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b46726e666b5d2ad32959ae9492ee1034e798162", + "reference": "b46726e666b5d2ad32959ae9492ee1034e798162", "shasum": "" }, "require": { "ext-mbstring": "*", - "myclabs/php-enum": "^1.5", - "php": "^8.0", - "psr/http-message": "^1.0" + "ext-zlib": "*", + "php-64bit": "^8.1" }, "require-dev": { "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.9", - "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4", - "phpunit/phpunit": "^8.5.8 || ^9.4.2", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", "vimeo/psalm": "^5.0" }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, "type": "library", "autoload": { "psr-4": { @@ -299,7 +361,7 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.0.2" }, "funding": [ { @@ -311,7 +373,7 @@ "type": "open_collective" } ], - "time": "2022-12-08T12:29:14+00:00" + "time": "2023-04-19T19:51:03+00:00" }, { "name": "markbaker/complex", @@ -420,130 +482,18 @@ }, "time": "2022-12-02T22:17:43+00:00" }, - { - "name": "myclabs/php-enum", - "version": "1.8.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/php-enum.git", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.6.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "MyCLabs\\Enum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP Enum contributors", - "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" - } - ], - "description": "PHP Enum implementation", - "homepage": "http://github.com/myclabs/php-enum", - "keywords": [ - "enum" - ], - "support": { - "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.4" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", - "type": "tidelift" - } - ], - "time": "2022-08-04T09:53:51+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.18", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2019-01-03T20:59:08+00:00" - }, { "name": "phpoffice/phpspreadsheet", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a" + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", "shasum": "" }, "require": { @@ -561,7 +511,7 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", "php": "^7.4 || ^8.0", @@ -573,12 +523,12 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.2.4", + "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -633,27 +583,27 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" }, - "time": "2023-02-25T12:24:49+00:00" + "time": "2023-06-14T22:48:31+00:00" }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -673,7 +623,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -685,27 +635,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -725,7 +675,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -740,31 +690,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -779,7 +729,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -792,7 +742,10 @@ "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/simple-cache", @@ -847,24 +800,24 @@ }, { "name": "ralouphie/getallheaders", - "version": "2.0.5", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "php": ">=5.3" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, "type": "library", "autoload": { @@ -883,30 +836,33 @@ } ], "description": "A polyfill for getallheaders.", - "time": "2016-02-11T07:05:27+00:00" + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" }, { "name": "ratchet/rfc6455", - "version": "v0.2.5", + "version": "v0.3.1", "source": { "type": "git", "url": "https://github.com/ratchetphp/RFC6455.git", - "reference": "c62f7cd95ffbb6e94fd657be694fc7372ecd6e62" + "reference": "7c964514e93456a52a99a20fcfa0de242a43ccdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ratchetphp/RFC6455/zipball/c62f7cd95ffbb6e94fd657be694fc7372ecd6e62", - "reference": "c62f7cd95ffbb6e94fd657be694fc7372ecd6e62", + "url": "https://api.github.com/repos/ratchetphp/RFC6455/zipball/7c964514e93456a52a99a20fcfa0de242a43ccdb", + "reference": "7c964514e93456a52a99a20fcfa0de242a43ccdb", "shasum": "" }, "require": { - "guzzlehttp/psr7": "^1.0", + "guzzlehttp/psr7": "^2 || ^1.7", "php": ">=5.4.2" }, "require-dev": { - "phpunit/phpunit": "4.8.*", - "react/http": "^0.4.1", - "react/socket-client": "^0.4.3" + "phpunit/phpunit": "^5.7", + "react/socket": "^1.3" }, "type": "library", "autoload": { @@ -923,6 +879,10 @@ "name": "Chris Boden", "email": "cboden@gmail.com", "role": "Developer" + }, + { + "name": "Matt Bonneau", + "role": "Developer" } ], "description": "RFC6455 WebSocket protocol handler", @@ -932,28 +892,33 @@ "rfc6455", "websocket" ], - "time": "2019-03-10T17:10:42+00:00" + "support": { + "chat": "https://gitter.im/reactphp/reactphp", + "issues": "https://github.com/ratchetphp/RFC6455/issues", + "source": "https://github.com/ratchetphp/RFC6455/tree/v0.3.1" + }, + "time": "2021-12-09T23:20:49+00:00" }, { "name": "react/cache", - "version": "v0.5.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/cache.git", - "reference": "7d7da7fb7574d471904ba357b39bbf110ccdbf66" + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/7d7da7fb7574d471904ba357b39bbf110ccdbf66", - "reference": "7d7da7fb7574d471904ba357b39bbf110ccdbf66", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", "shasum": "" }, "require": { "php": ">=5.3.0", - "react/promise": "~2.0|~1.1" + "react/promise": "^3.0 || ^2.0 || ^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { @@ -965,6 +930,28 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "Async, Promise-based cache interface for ReactPHP", "keywords": [ "cache", @@ -972,44 +959,75 @@ "promise", "reactphp" ], - "time": "2018-06-25T12:52:40+00:00" + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" }, { "name": "react/dns", - "version": "v0.4.17", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "0f30c6ceb71504d359d51132a97e1703051f1589" + "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/0f30c6ceb71504d359d51132a97e1703051f1589", - "reference": "0f30c6ceb71504d359d51132a97e1703051f1589", + "url": "https://api.github.com/repos/reactphp/dns/zipball/3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", + "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", "shasum": "" }, "require": { "php": ">=5.3.0", - "react/cache": "^1.0 || ^0.6 || ^0.5 || ^0.4 || ^0.3", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", - "react/promise": "^2.1 || ^1.2.1", - "react/promise-timer": "^1.2", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.5" + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7 || ^1.2.1" }, "require-dev": { - "clue/block-react": "^1.2", - "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-timer": "^1.9" }, "type": "library", "autoload": { "psr-4": { - "React\\Dns\\": "src" + "React\\Dns\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "Async DNS resolver for ReactPHP", "keywords": [ "async", @@ -1017,69 +1035,109 @@ "dns-resolver", "reactphp" ], - "time": "2019-04-01T07:31:55+00:00" + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.11.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-06-02T12:45:26+00:00" }, { "name": "react/event-loop", - "version": "v1.1.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d" + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { "psr-4": { - "React\\EventLoop\\": "src" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ "asynchronous", "event-loop" ], - "time": "2019-02-07T16:19:49+00:00" + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-05-05T10:11:24+00:00" }, { "name": "react/promise", - "version": "v2.7.1", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d" + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/31ffa96f8d2ed0341a57848cbb84d88b89dd664d", - "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -1097,7 +1155,23 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", @@ -1105,87 +1179,45 @@ "promise", "promises" ], - "time": "2019-01-07T21:25:54+00:00" - }, - { - "name": "react/promise-timer", - "version": "v1.5.1", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-timer.git", - "reference": "35fb910604fd86b00023fc5cda477c8074ad0abc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/35fb910604fd86b00023fc5cda477c8074ad0abc", - "reference": "35fb910604fd86b00023fc5cda477c8074ad0abc", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", - "react/promise": "^2.7.0 || ^1.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Timer\\": "src/" - } + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.10.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Christian Lück", - "email": "christian@lueck.tv" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", - "homepage": "https://github.com/reactphp/promise-timer", - "keywords": [ - "async", - "event-loop", - "promise", - "reactphp", - "timeout", - "timer" - ], - "time": "2019-03-27T18:10:32+00:00" + "time": "2023-05-02T15:15:43+00:00" }, { "name": "react/socket", - "version": "v1.2.0", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "23b7372bb25cea934f6124f5bdac34e30161959e" + "reference": "cff482bbad5848ecbe8b57da57e4e213b03619aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/23b7372bb25cea934f6124f5bdac34e30161959e", - "reference": "23b7372bb25cea934f6124f5bdac34e30161959e", + "url": "https://api.github.com/repos/reactphp/socket/zipball/cff482bbad5848ecbe8b57da57e4e213b03619aa", + "reference": "cff482bbad5848ecbe8b57da57e4e213b03619aa", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^0.4.13", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", - "react/promise": "^2.6.0 || ^1.2.1", - "react/promise-timer": "^1.4.0", - "react/stream": "^1.1" + "react/dns": "^1.11", + "react/event-loop": "^1.2", + "react/promise": "^3 || ^2.6 || ^1.2.1", + "react/stream": "^1.2" }, "require-dev": { - "clue/block-react": "^1.2", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.9" }, "type": "library", "autoload": { @@ -1197,6 +1229,28 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", "keywords": [ "Connection", @@ -1205,30 +1259,40 @@ "reactphp", "stream" ], - "time": "2019-01-07T14:10:13+00:00" + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.13.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-06-07T10:28:34+00:00" }, { "name": "react/stream", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6" + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/50426855f7a77ddf43b9266c22320df5bf6c6ce6", - "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6", + "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.8", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5" + "react/event-loop": "^1.2" }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { @@ -1240,6 +1304,28 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ "event-driven", @@ -1251,36 +1337,123 @@ "stream", "writable" ], - "time": "2019-01-01T16:15:09+00:00" + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2021-07-11T12:37:55+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.24", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "61094ca72e8934c6502af5259ef6296eb09aa424" + "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/61094ca72e8934c6502af5259ef6296eb09aa424", - "reference": "61094ca72e8934c6502af5259ef6296eb09aa424", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/718a97ed430d34e5c568ea2c44eab708c6efbefb", + "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php70": "~1.6" + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.2" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0|~4.0" + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^5.4|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" @@ -1303,26 +1476,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", - "time": "2019-03-25T07:48:46+00:00" + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-19T12:46:45+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.11.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { "ext-mbstring": "For best performance" @@ -1330,7 +1523,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1364,30 +1561,50 @@ "portable", "shim" ], - "time": "2019-02-06T07:57:58+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.11.0", + "name": "symfony/polyfill-php80", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "bc4858fb611bda58719124ca079baff854149c89" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89", - "reference": "bc4858fb611bda58719124ca079baff854149c89", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1395,7 +1612,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -1406,6 +1623,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -1415,7 +1636,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -1423,52 +1644,135 @@ "portable", "shim" ], - "time": "2019-02-06T07:57:58+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/routing", - "version": "v3.4.24", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ff11aac46d6cb8a65f2855687bb9a1ac9d860eec" + "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ff11aac46d6cb8a65f2855687bb9a1ac9d860eec", - "reference": "ff11aac46d6cb8a65f2855687bb9a1ac9d860eec", + "url": "https://api.github.com/repos/symfony/routing/zipball/827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", + "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=8.1" }, "conflict": { - "symfony/config": "<3.3.1", - "symfony/dependency-injection": "<3.3", - "symfony/yaml": "<3.4" + "doctrine/annotations": "<1.12", + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" }, "require-dev": { - "doctrine/annotations": "~1.0", - "psr/log": "~1.0", - "symfony/config": "^3.3.1|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~2.8|~3.0|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" + "doctrine/annotations": "^1.12|^2", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.2", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Routing\\": "" @@ -1491,7 +1795,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Routing Component", + "description": "Maps an HTTP request to a set of configuration variables", "homepage": "https://symfony.com", "keywords": [ "router", @@ -1499,7 +1803,24 @@ "uri", "url" ], - "time": "2019-03-29T21:58:42+00:00" + "support": { + "source": "https://github.com/symfony/routing/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-28T15:57:00+00:00" } ], "packages-dev": [], diff --git a/configGeral.php b/configGeral.php index 95f18742..c321dada 100644 --- a/configGeral.php +++ b/configGeral.php @@ -232,7 +232,7 @@ if ($idSubProg == CONFIG_BASE_DADOS) { prm_max_ramal,prm_normaliza_agenda, prm_max_dias_relatorio, prm_ocultar_telefone, prm_ocultar_email, prm_ocultar_documento,prm_max_licenca_fixo, prm_relatorio_servico from pbx_parametros where id = 1"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); foreach ($fields as $value) { if ($value == 'prm_bloqueio_data') { @@ -277,7 +277,7 @@ if ($idSubProg == CONFIG_BASE_DADOS) { prm_ativa_integracao, prm_select_integracao, prm_aviso_desconnect, prm_link_audio from pbx_parametros where id = 1"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); foreach ($fields as $value) { $values[$value] = $dados[$value]; @@ -308,7 +308,7 @@ if ($idSubProg == CONFIG_BASE_DADOS) { $values[$value] = $_POST[$value]; } //echo $query; - $result = @pg_query($query); + $result = pg_query($query); if ($result) { AtualizaLinkAgente(); @@ -345,7 +345,7 @@ if ($idSubProg == CONFIG_BASE_DADOS) { $query = "select id, coalesce(prm_super_atualiza, 5) as prm_super_atualiza, prm_super_alerta_atende, prm_super_alerta_pausa, prm_super_alerta_livre, prm_max_agente_pausa, prm_aviso_lgpd_monitoria from pbx_parametros where id = 1"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); foreach ($fields as $value) $values[$value] = $dados[$value]; @@ -377,7 +377,7 @@ if ($idSubProg == CONFIG_BASE_DADOS) { } - $result = @pg_query($query); + $result = pg_query($query); if ($result) { $jsStartup[] = "alert('operação realizada com sucesso!');"; @@ -620,7 +620,7 @@ function VerificaMunPadrao() { $uf = strtoupper(RemoveAcentos($_POST['prm_uf_padrao'])); $ddd = $_POST['prm_ddd_padrao']; $sql = "select count(*) from pbx_municipios where upper(to_ascii(nome_municipio)) = '$cidade' and upper(to_ascii(uf)) = '$uf' and codigo_ddd = $ddd"; - $result1 = @pg_query($sql); + $result1 = pg_query($sql); $dados = pg_fetch_row($result1); return $dados[0]; } @@ -633,7 +633,7 @@ function VerificaRamaisCriados($prmMaxRamal) { return true; } $sql = "select count(*) from pbx_ramais"; - $result1 = @pg_query($sql); + $result1 = pg_query($sql); $dados = pg_fetch_row($result1); return $prmMaxRamal >= $dados[0]; } diff --git a/contacteFunc.php b/contacteFunc.php index 76c0088f..56834297 100644 --- a/contacteFunc.php +++ b/contacteFunc.php @@ -260,7 +260,7 @@ function GetPausa($dbcon, $mat, $verPausa = false) { * rente entao $verPausa é definido como false. */ $query = "select count(*) from pbx_supervisor_agentes where matricula = '$mat' and upper(status) = 'PAUSA'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $ret = $row[0]; @@ -306,7 +306,7 @@ function GetDacPadraoAgente($dbcon, $getId = true) { else $query = "select dac_padrao as id_dac, b.nome from pbx_usuarios a, pbx_dacs b where b.id = a.dac_padrao and a.id = $idUser "; //echo $query; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $ret = $getId ? $row[0] : $row[1]; return $ret; @@ -392,7 +392,7 @@ function SetPbx($db, $idUser) { and a.user_id = $idUser"; - $result = @pg_query($db, $query); + $result = pg_query($db, $query); if (!$result) $_SESSION["SSacessoPbx"] = 0; @@ -636,7 +636,7 @@ function GetRamalSip($dbcon, $ramalAgente) { function GetIdUserFromMatricula($dbcon, $matricula) { $query = "select id from pbx_usuarios where matricula = '$matricula'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $ret = $row[0]; return $ret; @@ -827,7 +827,7 @@ 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); + $result = pg_query($db, $query); if(!$result){ @@ -860,7 +860,7 @@ function GetClassificacao($db, $idClas, $dac, $useSelect = 1) { function GetItem($db, $idClas, $idItem, $useSelect = 1) { $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 = $useSelect ? "'; diff --git a/relatorios/callcenter/geral/pausasDetalhado.php b/relatorios/callcenter/geral/pausasDetalhado.php index c6f0fe9d..51ce66bf 100644 --- a/relatorios/callcenter/geral/pausasDetalhado.php +++ b/relatorios/callcenter/geral/pausasDetalhado.php @@ -582,7 +582,7 @@ AND CAST(login as date) <= '%s') ", $this->___dac, FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if(!$result) { return ''; diff --git a/relatorios/callcenter/geral/relClassificacaoDetalhes.php b/relatorios/callcenter/geral/relClassificacaoDetalhes.php index 8af313f7..2bbd26ce 100644 --- a/relatorios/callcenter/geral/relClassificacaoDetalhes.php +++ b/relatorios/callcenter/geral/relClassificacaoDetalhes.php @@ -571,12 +571,13 @@ class RelClassificacaoDetalhes extends Relatorios { AND CAST(login as date) <= '%s') ", $this->___dac, FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if(!$result) { return ''; } + while ($dados = pg_fetch_row($result)) { if ($codSel == $dados[0]) { $sel = "selected"; diff --git a/relatorios/callcenter/geral/relContribuinte.php b/relatorios/callcenter/geral/relContribuinte.php index 6c45e02c..f7c1fcbb 100644 --- a/relatorios/callcenter/geral/relContribuinte.php +++ b/relatorios/callcenter/geral/relContribuinte.php @@ -367,7 +367,7 @@ $linhas = ""; $setQuery = GetQuery(); - $result = @pg_query($dbcon, $setQuery); + $result = pg_query($dbcon, $setQuery); //print $setQuery; diff --git a/relatorios/callcenter/geral/relTransfer.php b/relatorios/callcenter/geral/relTransfer.php index c90606e9..84f11e9f 100644 --- a/relatorios/callcenter/geral/relTransfer.php +++ b/relatorios/callcenter/geral/relTransfer.php @@ -626,7 +626,7 @@ if ($isPostBack) { $setQuery = ""; $setQuery = utf8_encode(GetQuery($trocaDac)); - $result = @pg_query($dbcon, $setQuery); + $result = pg_query($dbcon, $setQuery); $resumo = array(); diff --git a/relatorios/callcenter/metas/metricasDiariaAneel.php b/relatorios/callcenter/metas/metricasDiariaAneel.php index 78b560b3..15d584d5 100644 --- a/relatorios/callcenter/metas/metricasDiariaAneel.php +++ b/relatorios/callcenter/metas/metricasDiariaAneel.php @@ -802,7 +802,7 @@ //print GetDesvio('2009-09-17', $dbcon) . "
"; $linhas = ""; $linhaTmp = ""; - $result = @pg_query($dbcon, GetQuery($dac, $codMes)); + $result = pg_query($dbcon, GetQuery($dac, $codMes)); $i = 0; $dados = array(); diff --git a/relatorios/callcenter/metas/metricasMensal.php b/relatorios/callcenter/metas/metricasMensal.php index 2ca9e983..d5ff660a 100644 --- a/relatorios/callcenter/metas/metricasMensal.php +++ b/relatorios/callcenter/metas/metricasMensal.php @@ -1164,7 +1164,7 @@ $relMetricasMensal->ExecutaRelatorio(); $msg = "Selecione um Dispositivo!"; } else { $query = GetQuerySum($_SESSION[SSdacDesc], $codMes, $_SESSION["listaAno"]); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $i = 0; $imp = 0; @@ -1190,7 +1190,7 @@ $relMetricasMensal->ExecutaRelatorio(); //dados do relatorio - $result = @pg_query($dbcon, GetQuery($_SESSION[SSdacDesc], $codMes, $_SESSION["listaAno"])); + $result = pg_query($dbcon, GetQuery($_SESSION[SSdacDesc], $codMes, $_SESSION["listaAno"])); $i = 0; while ($dados[$i] = @pg_fetch_row($result)) diff --git a/relatorios/pbx/chamadasEntrantes/entrantesConta.php b/relatorios/pbx/chamadasEntrantes/entrantesConta.php index 8d7542ca..1ec2432f 100644 --- a/relatorios/pbx/chamadasEntrantes/entrantesConta.php +++ b/relatorios/pbx/chamadasEntrantes/entrantesConta.php @@ -65,7 +65,7 @@ $somaValor = 0; $linhas = array(); //executa consulta somente com post if ($inRel && $isValid) { - $result = @pg_query($dbHost, GetQuery()); + $result = pg_query($dbHost, GetQuery()); while ($row = @pg_fetch_array($result)) { $matricula = $row["matricula"]; $apelido = $row["apelido"]; diff --git a/relatorios/tarifador/tarifaConta.php b/relatorios/tarifador/tarifaConta.php index 805f6567..4995cb65 100644 --- a/relatorios/tarifador/tarifaConta.php +++ b/relatorios/tarifador/tarifaConta.php @@ -691,7 +691,7 @@ and c.tfq_id = a.contr_tipo_franquia and a.contr_id = '$contr_id' "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); $fecha = GetFechamentoContrato($ano, $mes, $dados['contr_dia_fechamento']); $dados['contr_dia_fechamento'] = $fecha ? $fecha : date('d'); @@ -699,7 +699,7 @@ } private function ___GetAnosFatura($dbcon, $ano, $contrato) { - $result = @pg_query($dbcon, "select coalesce(date_part('year', min(trr_data) ), date_part('year', now() )), coalesce(date_part('year', max(trr_data) ),date_part('year', now() )) from pbx_tarif_registra where contr_id = '$contrato'"); + $result = pg_query($dbcon, "select coalesce(date_part('year', min(trr_data) ), date_part('year', now() )), coalesce(date_part('year', max(trr_data) ),date_part('year', now() )) from pbx_tarif_registra where contr_id = '$contrato'"); if (!pg_num_rows($result)) return ""; diff --git a/relatorios/tarifador/tarifaFatura.php b/relatorios/tarifador/tarifaFatura.php index 7117b13c..95d04244 100644 --- a/relatorios/tarifador/tarifaFatura.php +++ b/relatorios/tarifador/tarifaFatura.php @@ -864,7 +864,7 @@ and c.tfq_id = a.contr_tipo_franquia and a.contr_id = '$contr_id' "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); $fecha = GetFechamentoContrato($ano, $mes, $dados['contr_dia_fechamento']); $dados['contr_dia_fechamento'] = $fecha ? $fecha : date('d'); @@ -874,7 +874,7 @@ private function ___GetAnosFatura($dbcon, $ano, $contrato) { $query = "SELECT COALESCE(date_part('year', MIN(trr_data)), date_part('year', NOW())), COALESCE(date_part('year', NOW()),date_part('year', MAX(trr_data))) FROM pbx_tarif_registra"; $query .= $contrato > 0 ? " WHERE contr_id = $contrato" : ''; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if (!pg_num_rows($result)) return ""; diff --git a/relatorios/tarifador/tarifaRamal.php b/relatorios/tarifador/tarifaRamal.php index 422fe9fa..f06ff309 100644 --- a/relatorios/tarifador/tarifaRamal.php +++ b/relatorios/tarifador/tarifaRamal.php @@ -688,7 +688,7 @@ and c.tfq_id = a.contr_tipo_franquia and a.contr_id = '$contr_id' "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $dados = @pg_fetch_array($result); $fecha = GetFechamentoContrato($ano, $mes, $dados['contr_dia_fechamento']); $dados['contr_dia_fechamento'] = $fecha ? $fecha : date('d'); @@ -696,7 +696,7 @@ } private function ___GetAnosFatura($dbcon, $ano, $contrato) { - $result = @pg_query($dbcon, "select coalesce(date_part('year', min(trr_data) ), date_part('year', now() )), coalesce(date_part('year', max(trr_data) ),date_part('year', now() )) from pbx_tarif_registra where contr_id = '$contrato'"); + $result = pg_query($dbcon, "select coalesce(date_part('year', min(trr_data) ), date_part('year', now() )), coalesce(date_part('year', max(trr_data) ),date_part('year', now() )) from pbx_tarif_registra where contr_id = '$contrato'"); if (!pg_num_rows($result)) return ""; diff --git a/seguranca/grupos/grupoDelete.php b/seguranca/grupos/grupoDelete.php index 15ca5f74..6afaeed2 100644 --- a/seguranca/grupos/grupoDelete.php +++ b/seguranca/grupos/grupoDelete.php @@ -16,12 +16,12 @@ $numReg = 0; $idUser = GetIdUser(); $query = "select count(*) as dono from pbx_grupo where gp_id = '$id' and gp_user = '$idUser'"; -$result = @pg_query($dbcon, $query); +$result = pg_query($dbcon, $query); $row = pg_fetch_row($result); $donoGrupo = $row[0]; $query = "select count(*) from pbx_grupo_usuario where gp_id = $id"; -$result = @pg_query($dbcon, $query); +$result = pg_query($dbcon, $query); if ($result) { @@ -31,34 +31,34 @@ if ($result) { if (($numReg == 0) || ( ($numReg == 1) && ($donoGrupo || IsUserAdmin() || IsAdmin()))) { $query = "begin"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { if ($donoGrupo && ($numReg == 1)) { $query = "delete from pbx_grupo_usuario where user_id = '$idUser' and gp_id = '$id'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } if ($result) { $query = "delete from pbx_grupo_funcoes where gp_id = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $query = "delete from pbx_grupo where gp_id = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { /* * Contem restarição para acesso aos áudios dos ramais inseridos nesta tabela. */ $query = "delete from pbx_grupo_audio_ramal where gp_id = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { /* * Contem a liberação para acessar os audios das filas relacionadas aos grupos. */ $query = "delete from pbx_fila_audios where gp_id = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } } } @@ -67,11 +67,11 @@ if ($result) { if ($result) { $query = "commit"; - @pg_query($dbcon, $query); + pg_query($dbcon, $query); echo "OK; Grupo excluido com sucesso!"; } else { $query = "rollback"; - @pg_query($dbcon, $query); + pg_query($dbcon, $query); echo "ERRO; Não é possível excluir este grupo! Erro: " . pg_last_error(); } } else { diff --git a/seguranca/grupos/grupoInsert.php b/seguranca/grupos/grupoInsert.php index f53db404..419e8d8d 100644 --- a/seguranca/grupos/grupoInsert.php +++ b/seguranca/grupos/grupoInsert.php @@ -30,19 +30,19 @@ if ($formAction == FORM_NEW) { GetGpValues(); // Inicia uma transação no banco de dados - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); if ($result) { //Prepara a query para inserir o registro no banco $query = sprintf($query, QuotedStr($gp_nome), QuotedStr($gp_status), QuotedStr(GetIdUser())); //Executa a query no banco - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if (!IsAdmin() && $result) { //Insere o grupo para o criador e seus antecessores na ordem inversa de criação $query = "select max(gp_id) from pbx_grupo"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $idGrupo = $row[0]; @@ -54,19 +54,19 @@ if ($formAction == FORM_NEW) { if ($result && !IsUserAdmin()) { $query = " insert into pbx_grupo_usuario(user_id, gp_id)values(%s, %s)"; $query = sprintf($query, $idUser, $idGrupo); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } if ($result) { $query = " insert into pbx_grupo_usuario(user_id, gp_id)values(%s, %s)"; $idUser = GetIdSysAdmin($dbcon); $query = sprintf($query, $idUser, $idGrupo); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } } if ($result) { - $result = @pg_query($dbcon, "commit"); + $result = pg_query($dbcon, "commit"); } } if ($result) { @@ -76,7 +76,7 @@ if ($formAction == FORM_NEW) { LimpaGpVar(); } else { $erroBd = @pg_last_error($dbcon); - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); $acaoUser = 'Incluir'; $msgUser = "alert('A operação não pode ser realizada!Erro: $erroBd');"; $msgErro = "A operação não pode ser realizada!Erro: $erroBd"; diff --git a/seguranca/grupos/grupoRevendas.php b/seguranca/grupos/grupoRevendas.php index 44f94e4b..b02c1023 100644 --- a/seguranca/grupos/grupoRevendas.php +++ b/seguranca/grupos/grupoRevendas.php @@ -22,21 +22,21 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = fmtMsg('Selecione um ramal!'); } else { try { - $result = @pg_query($dbcon, 'begin'); + $result = pg_query($dbcon, 'begin'); if ($result) { $cont = 0; foreach ($fieldsForm['listaRevendasDisponiveis'] as $empId) { $query = "insert into pbx_grupo_revendas(emp_id, gp_id)values('%s', '%s')"; $query = sprintf($query, $empId, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -44,7 +44,7 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = $cont > 1 ? fmtMsg('Revendas incluidas com sucesso!') : fmtMsg('Revenda incluida com sucesso!'); } catch (Exception $e) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); fmtErro($e->getMessage(), pg_last_error($dbcon)); } } @@ -54,7 +54,7 @@ if (isset($fieldsForm['btInclui'])) { } else { try { - $result = @pg_query($dbcon, 'begin'); + $result = pg_query($dbcon, 'begin'); if ($result) { $userAdmin = IsAdmin() ? 1 : 0; @@ -62,14 +62,14 @@ if (isset($fieldsForm['btInclui'])) { foreach ($fieldsForm['listaRevendasIncluidos'] as $empId) { $query = "delete from pbx_grupo_revendas where emp_id = '%s' and gp_id = '%s'"; $query = sprintf($query, $empId, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -77,7 +77,7 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = $cont > 1 ? fmtMsg('Revendas removidas com sucesso!') : fmtMsg('Revenda removida com sucesso!'); } catch (Exception $e) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); fmtErro($e->getMessage(), pg_last_error($dbcon)); } } @@ -107,7 +107,7 @@ function GetRevendasDisponiveis($dbcon, $codGp, $codSel, $size = 1, $tamPx = "20 from vds_empresas a where not exists(select '' from pbx_grupo_revendas where emp_id = a.emp_id and gp_id = '$codGp') order by 2"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; @@ -137,7 +137,7 @@ function GetRevendasIncluidos($dbcon, $codGp, $codSel, $size = 1, $tamPx = "200" from vds_empresas a where exists(select '' from pbx_grupo_revendas where emp_id = a.emp_id and gp_id = '$codGp') order by 2"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; diff --git a/seguranca/grupos/grupoUpdate.php b/seguranca/grupos/grupoUpdate.php index a309b10c..82d5efb8 100644 --- a/seguranca/grupos/grupoUpdate.php +++ b/seguranca/grupos/grupoUpdate.php @@ -34,7 +34,7 @@ if ($formAction == FORM_UPDATE) { //Executa a query no banco - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { diff --git a/seguranca/grupos/gruposAudiosRamais.php b/seguranca/grupos/gruposAudiosRamais.php index dce9226b..e7a12d6b 100644 --- a/seguranca/grupos/gruposAudiosRamais.php +++ b/seguranca/grupos/gruposAudiosRamais.php @@ -22,21 +22,21 @@ if (isset($fieldsForm['btInclui'])) { $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_audio_ramal(nome, gp_id)values('%s', '%s')"; $query = sprintf($query, $ramal, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -44,7 +44,7 @@ if (isset($fieldsForm['btInclui'])) { $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)); } } @@ -54,7 +54,7 @@ if (isset($fieldsForm['btInclui'])) { } else { try { - $result = @pg_query($dbcon, 'begin'); + $result = pg_query($dbcon, 'begin'); if ($result) { $userAdmin = IsAdmin() ? 1 : 0; @@ -62,14 +62,14 @@ if (isset($fieldsForm['btInclui'])) { foreach ($fieldsForm['listaRamaisIncluidos'] as $ramal) { $query = "delete from pbx_grupo_audio_ramal where nome = '%s' and gp_id = '%s'"; $query = sprintf($query, $ramal, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -77,7 +77,7 @@ if (isset($fieldsForm['btInclui'])) { $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)); } } @@ -108,7 +108,7 @@ function GetRamaisDisponiveis($dbcon, $codGp, $codSel, $size = 1, $tamPx = "200" where tipo = 0 and not exists(select '' from pbx_grupo_audio_ramal where nome = a.nome and gp_id = '$codGp')"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; @@ -139,7 +139,7 @@ function GetRamaisIncluidos($dbcon, $codGp, $codSel, $size = 1, $tamPx = "200", where tipo = 0 and exists(select '' from pbx_grupo_audio_ramal where nome = a.nome and gp_id = '$codGp')"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; diff --git a/seguranca/grupos/gruposCampanhaPrevendas.php b/seguranca/grupos/gruposCampanhaPrevendas.php index 5843690d..195d8997 100644 --- a/seguranca/grupos/gruposCampanhaPrevendas.php +++ b/seguranca/grupos/gruposCampanhaPrevendas.php @@ -24,21 +24,21 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = fmtMsg('Selecione um Status!'); } else { try { - $result = @pg_query($dbcon, 'begin'); + $result = pg_query($dbcon, 'begin'); if ($result) { $cont = 0; foreach ($fieldsForm['ctst_id'] as $idUser) { $query = "insert into pbx_grupo_campanha_contato_status(ctst_id, gp_id)values(%s,%s)"; $query = sprintf($query, $idUser, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -46,7 +46,7 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = $cont > 1 ? fmtMsg('Status incluidos com sucesso!') : fmtMsg('Status incluido com sucesso!'); } catch (Exception $e) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); fmtErro($e->getMessage(), pg_last_error($dbcon)); } } @@ -56,7 +56,7 @@ if (isset($fieldsForm['btInclui'])) { } else { try { - $result = @pg_query($dbcon, 'begin'); + $result = pg_query($dbcon, 'begin'); if ($result) { $userAdmin = IsAdmin() ? 1 : 0; @@ -65,14 +65,14 @@ if (isset($fieldsForm['btInclui'])) { $query = "delete from pbx_grupo_campanha_contato_status where ctst_id = '%s' and gp_id = '%s'"; $query = sprintf($query, $id, $fieldsForm['gp_id']); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); 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!'); @@ -80,7 +80,7 @@ if (isset($fieldsForm['btInclui'])) { $fieldsForm['erro'] = $cont > 1 ? fmtMsg('Status removidos com sucesso!') : fmtMsg('Status removido com sucesso!'); } catch (Exception $e) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); fmtErro($e->getMessage(), pg_last_error($dbcon)); } } @@ -107,7 +107,7 @@ function GetGrupoUser($dbcon, $codGp, $codSel, $size = 1, $nomeLista = "ctst_id" INNER JOIN pbx_campanha_contato_status b ON b.ctst_id = a.ctst_id WHERE gp_id = {$codGp} ORDER BY 1"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; @@ -135,7 +135,7 @@ function GetUser($dbcon, $codGrupo, $codSel, $size = 1, $nomeLista = "ctst_id", } $query = "SELECT * FROM pbx_campanha_contato_status WHERE ctst_id NOT IN(SELECT ctst_id FROM pbx_grupo_campanha_contato_status WHERE gp_id = {$codGrupo} AND ctst_status = 1) ORDER BY 1"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $lista = '%s'; $lista = sprintf($lista, $nomeLista, ($multiple ? '[]' : ''), $nomeLista, $size, $tamPx, ($multiple ? 'multiple="multiple"' : ''), "\n"); @@ -183,7 +183,7 @@ function JaInseridoLgps($userId) { and b.gp_nome ilike 'LGPD_%_%_%' and a.user_id = '{$userId}';"; - $result = @pg_query($query); + $result = pg_query($query); if (!pg_num_rows($result)) { return false; diff --git a/seguranca/licencaUsuarioFixo.php b/seguranca/licencaUsuarioFixo.php index d289c33b..ddb04248 100644 --- a/seguranca/licencaUsuarioFixo.php +++ b/seguranca/licencaUsuarioFixo.php @@ -57,15 +57,15 @@ throw new Exception('Selecione um usuário'); } - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($field as $id) { $query = "update pbx_usuarios set pa_fixo = {$status} where id = {$id};"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $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!'); @@ -73,7 +73,7 @@ $field['erro'] = $cont > 1 ? fmtMsg('Status removidos com sucesso!') : fmtMsg('Status removido com sucesso!'); } catch (Exception $e) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); fmtErro($e->getMessage(), pg_last_error($dbcon)); } } @@ -82,7 +82,7 @@ $sel = ""; $infos['name'] = $infos['name'] . "rm"; $query = "SELECT * FROM pbx_usuarios WHERE pa_fixo = 1 ORDER BY apelido;"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $lista = '%s'; $lista = sprintf($lista, $infos['name'], ($infos['multiple'] ? "[]" : ""), $infos['name'], $infos['size'], $infos['width'], ($infos['multiple'] ? 'multiple="multiple"' : ''), "\n"); diff --git a/seguranca/perfil/perfilGrupo.php b/seguranca/perfil/perfilGrupo.php index cab69ed0..1415e33b 100644 --- a/seguranca/perfil/perfilGrupo.php +++ b/seguranca/perfil/perfilGrupo.php @@ -57,7 +57,7 @@ function GetGrupo($dbcon, $codGp, $size = 1) { $query = "select gp_id, case when(gp_system = 1)then (gp_nome || '#') else case when(user_id = 0)then gp_nome else (gp_nome || '**') end end gp_nome, case when(user_id = 0)then 0 else 1 end as ord from pbx_grupo g where $flagSystem and gp_status = 1 {REST} order by 3,2"; //restricao se o usuario nao for admin $query = strtoupper(GetLogin()) == "ADMIN" ? str_replace("{REST}", "", $query) : str_replace("{REST}", " and exists(select '' from pbx_grupo_usuario where gp_id = g.gp_id and user_id = $idUser)", $query); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $sel = ""; $cont = 0; $lista = "\n"; @@ -164,7 +164,7 @@ function GetGrupo($dbcon, &$codGp, $size = 1) { $query = "select gp_id, gp_nome from pbx_grupo g where gp_status = 1 {REST} and gp_user = 0 order by 2"; //restricao se o usuario nao for admin $query = strtoupper(GetLogin()) == "ADMIN" ? str_replace("{REST}", "", $query) : str_replace("{REST}", " and exists(select '' from pbx_grupo_usuario where gp_id = g.gp_id and user_id = $idUser)", $query); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; $lista = "\n"; @@ -205,7 +205,7 @@ function GetFunc($dbcon, $size = 1) { $idUser = GetIdUser(); $query = "select fun_id, fun_nome, fun_menu_text from pbx_funcoes f where fun_id_pai is not null and fun_public = 0 and fun_status = 1 {REST} order by 3"; $query = $query = strtoupper(GetLogin()) == "ADMIN" ? str_replace("{REST}", "", $query) : str_replace("{REST}", " and exists(select '' from pbx_grupo_funcoes gf, pbx_grupo_usuario gu where gf.gp_id = gu.gp_id and gf.fun_id = f.fun_id and gu.user_id = $idUser)", $query); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $cont = 0; $sel = ""; $lista = "\n"; diff --git a/seguranca/usuario.php b/seguranca/usuario.php index 6b6734cc..f963d5e1 100644 --- a/seguranca/usuario.php +++ b/seguranca/usuario.php @@ -101,7 +101,7 @@ if (IsPostBack() || (isset($_GET["idDelete"])) || (isset($_GET["idReset"]))) { $msg = "alert('Operação realizada com sucesso!');"; } catch (Exception $ex) { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $msg = sprintf("alert('%s');", $ex->getMessage()); } $jsStartup[] = $msg; @@ -111,7 +111,7 @@ if (IsPostBack() || (isset($_GET["idDelete"])) || (isset($_GET["idReset"]))) { $query = "update pbx_usuarios set senha = md5('1234'), def_senha = 1 where id = $id; "; $query .= "UPDATE pbx_controle_acesso SET acs_erro = 2 WHERE acs_user_id = $id AND acs_erro = 1; "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) @pg_affected_rows($result); diff --git a/seguranca/usuarioCad.php b/seguranca/usuarioCad.php index b53d7bad..6727915b 100644 --- a/seguranca/usuarioCad.php +++ b/seguranca/usuarioCad.php @@ -31,7 +31,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { $query = "select id, nome, apelido, matricula, flag, coalesce(\"admin\", false)::int as adm , senha, coalesce(supervisor, false)::int as supervisor, coalesce(agente,false)::int as agente, email, coalesce(status,true)::int as status, penalidade, senha_dias_expira from pbx_usuarios \n"; $query .= "where id = $idUser"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $dados = pg_fetch_array($result); @@ -84,7 +84,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { if (empty($msg) && ($_POST["btGravar"] == 'Incluir')) { - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); if ($result) { $userMatricula = GetMatriculaAgente($dbcon); @@ -92,7 +92,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { $query = "insert into pbx_usuarios(nome, apelido, matricula, flag, \"admin\", senha, supervisor, agente, email, status, penalidade, dac_padrao, check_vl, senha_dias_expira) values(%s, lower(%s), %s, %s, %s, md5(%s), %s, %s, %s, %s, %s, %s, md5(lower(%s)), %s)"; $query = sprintf($query, QuotedStr($userNome), QuotedStr($userLogin), QuotedStr($userMatricula), 1, $userAdm == "checked" ? 'true' : 'false', QuotedStr($userPassword), $userSuper == "checked" ? 'true' : 'false', $userAgente == "checked" ? 'true' : 'false', QuotedStr($userEmail), $userStatus == "checked" ? 'true' : 'false', $penalidade, QuotedStr($dacPadraoSel), QuotedStr($userLogin), $userExpiraSenha); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $ret = IncluiAgenteFile($dbcon); @@ -142,7 +142,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { $jsStartup[] = 'window.close()'; } else { $erroBd = @pg_last_error($dbcon); - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); $acaoUser = 'Incluir'; $msg = sprintf("alert('%s');", "A operação não pode ser realizada!"); } @@ -154,7 +154,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { $userMatricula = $_POST["userMatriculaH"]; $userExpiraSenha = $_POST["userExpiraSenha"]; $updSenha = DEFAULT_MASC_PASSWORD !== $userPassword; - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); $query = "update pbx_usuarios set nome = %s, @@ -169,13 +169,13 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { if ($updSenha) { $updSenha = sprintf(" senha = md5(%s), ", QuotedStr($userPassword)); $queryAlt = sprintf("UPDATE pbx_controle_acesso SET acs_erro = 2 WHERE acs_login = '%s' AND acs_erro = 1;", $userLogin); - @pg_query($dbcon, $queryAlt); + pg_query($dbcon, $queryAlt); } else { $updSenha = ''; } $query = sprintf($query, QuotedStr($userNome), $updSenha, QuotedStr($userEmail), $userStatus == "checked" ? 'true' : 'false', $penalidade, $dacPadraoSel, $userExpiraSenha, $idUser); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); /* * Se o dac for selecionado no cadastro do usuario, o mesmo sera atribuido para o proprio usuario. @@ -191,7 +191,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { } if ($result) { - $result = @pg_query($dbcon, "commit"); + $result = pg_query($dbcon, "commit"); } if ($result) { @@ -204,7 +204,7 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) { $erroBd = @pg_last_error($dbcon); // $msDisp = empty($msgAgt) ? ("A operação não pode ser realizada!" . ($erroBd ? " Erro: " . $erroBd : "")) : $msgAgt; $msg = sprintf("alert('%s');", (empty($msgAgt) ? "A operação não pode ser realizada!" : $msgAgt)); - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); $acaoUser = 'Alterar'; } } @@ -238,7 +238,7 @@ GetTemplate($smarty, 'seguranca/usuario.tpl'); function GetMatriculaAgente($db) { $query = "select max(matricula) from pbx_usuarios"; - $result = @pg_query($db, $query); + $result = pg_query($db, $query); if ($result) $dados = @pg_fetch_array($result); return ($dados[0] + 1); diff --git a/sincContaSenha.php b/sincContaSenha.php index 0e038328..4c82a994 100644 --- a/sincContaSenha.php +++ b/sincContaSenha.php @@ -5,7 +5,7 @@ $tpLayout = 1; if (isset($_POST["btInc"])) { $servers = $_POST["listaServers"]; - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($servers as $id) { $query = "insert into pbx_servers_sinc(server_id)values('$id')"; $result = pg_query($dbcon, $query); @@ -14,16 +14,16 @@ if (isset($_POST["btInc"])) { } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } } else if (isset($_POST["btRm"])) { $servers = $_POST["listaServersInc"]; - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($servers as $id) { $query = "delete from pbx_servers_sinc where server_id = '$id'"; $result = pg_query($dbcon, $query); @@ -32,10 +32,10 @@ if (isset($_POST["btInc"])) { } if ($result) { - @pg_query($dbcon, 'commit'); + pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - @pg_query($dbcon, 'rollback'); + pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } diff --git a/sites/siteInsert.php b/sites/siteInsert.php index c2faa1a4..018570a6 100644 --- a/sites/siteInsert.php +++ b/sites/siteInsert.php @@ -14,7 +14,7 @@ $erro = IsPostBack() ? ValidaSite($fields, $fieldsName) : ""; if (IsPostBack() && empty($erro)) { $query = "insert into pbx_sites(host, usuario, senha, basedados, porta, descricao, status) values(%s, %s, %s, %s, %s, %s, %s)"; $query = sprintf($query, QuotedStr($host), QuotedStr($usuario), QuotedStr($senha), QuotedStr($basedados), QuotedStr($porta), QuotedStr($descricao), $status); - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $erro = "Registro inserido com sucesso!"; $jsStartup[] = "window.opener.ResetForm();"; diff --git a/sites/siteSelect.php b/sites/siteSelect.php index 9cb8f43f..da6eed3b 100644 --- a/sites/siteSelect.php +++ b/sites/siteSelect.php @@ -81,7 +81,7 @@ GetTemplate($smarty, $tpl); function DeletaSite($db, $id) { $query = "delete from pbx_sites where id = $id"; - $result = @pg_query($db, $query); + $result = pg_query($db, $query); if ($result) return "Registro deletado com sucesso!"; else diff --git a/sites/sites.php b/sites/sites.php index 38dcd956..5c3becf2 100644 --- a/sites/sites.php +++ b/sites/sites.php @@ -32,7 +32,7 @@ if ((GetFormAcao() == FORM_SELECT) || (GetFormAcao() == FORM_DELETE)) { $query = "select id, host, usuario, senha, basedados, porta, descricao, status from pbx_sites where id = $id"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = pg_fetch_array($result); foreach ($row as $key => $value) { $GLOBALS[$key] = $value; diff --git a/start.php b/start.php index dc4f0ce6..96a6f187 100644 --- a/start.php +++ b/start.php @@ -1,5 +1,6 @@ "; $query = "select cmp_id, cmp_descricao from pbx_campanha where cmp_status in (1,2) and id_dac = (select id from pbx_dacs where nome = '$dac') order by 1"; - $result = @pg_query($this->GetDbCon(), $query); + $result = pg_query($this->GetDbCon(), $query); while ($dados = @pg_fetch_row($result)) { $sel = ($codSel == $dados[0]) ? 'selected="selected"' : ""; $listCamp .= ""; diff --git a/supervisao/naoClassificado.php b/supervisao/naoClassificado.php index 6cd56b9b..4d893f6f 100644 --- a/supervisao/naoClassificado.php +++ b/supervisao/naoClassificado.php @@ -83,9 +83,9 @@ if (!IsAjax()) { if (!$msg) { $msg = "Registros classificados com sucesso!"; - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); } else { - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); } $jsStartup[] = "alert('$msg');"; diff --git a/supervisor.php b/supervisor.php index 4d2f8ef0..f942117c 100644 --- a/supervisor.php +++ b/supervisor.php @@ -83,20 +83,20 @@ if (IsAjax() && isset($_GET["logoff"])) { } @GetUrl(AST_LOGOFF_AGENTE, $dacLogoff, $matrLogoff); - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); //atualiza dados do supervisor $query = "delete from pbx_supervisor_agentes where matricula = '$matrLogoff'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $result = @pg_affected_rows($result); //registra o login do usuario if ($result) { $query = "select coalesce(max(id),0) as id from pbx_eventos_agentes where matricula = '$matrLogoff' and cast(login as date) = cast(now() as date) and flag <> 2"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $idLogoff = $row[0]; if ($idLogoff) { @@ -104,16 +104,16 @@ if (IsAjax() && isset($_GET["logoff"])) { set logoff = now(), flag = 2 where id = $idLogoff"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $result = @pg_affected_rows($result); } } if ($result) { - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); echo "O logoff do usuário executado com sucesso!"; } else { - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); echo "O logoff do usuário não pode ser executado!" + pg_last_error($dbcon); } } @@ -471,7 +471,7 @@ function GetDacsAcesso($idUser, $array = false) { inner join pbx_grupo_usuario d on d.gp_id = c.gp_id and d.user_id = %s and b.status = 'A' "; $query = sprintf($query, IsAdmin() ? 'd.user_id' : QuotedStr($idUser)); - $result = @pg_query($query); + $result = pg_query($query); $linha = $array ? array() : ''; if ($result) { @@ -1005,7 +1005,7 @@ function GetCurrentCall($conn, $cmpId) { $query = "select conf_fone, conf_status, round(extract(epoch from age(now(),conf_data))) * interval '1 second' as tempo from pbx_campanha_contato_fone where conf_status_lista = '1' and upper(conf_status) = upper('discando') and round(extract(epoch from age(now(),conf_data))) <= '30' and cmp_id = (select cmp_id from pbx_campanha where cmp_descricao = '$cmpId')"; - $result = @pg_query($conn, $query); + $result = pg_query($conn, $query); //$erro = ($result ? '' : "Não foipossível realizar a opera�ao! Erro: " . pg_last_error($dbcon)); $linha = ''; @@ -1040,11 +1040,11 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { $result = GetUrl(AST_ADD_PAUSA, $dac, $matricula); if ($result) { - @pg_query($dbcon, "begin"); + pg_query($dbcon, "begin"); //Descricao do Motivo de pausa $query = "select motivo from pbx_motivos_pausas where id = '$codMotivo'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $rowMotivo = @pg_fetch_row($result); $descMotivo = $rowMotivo[0]; @@ -1056,7 +1056,7 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { motivo_pausa = '$descMotivo', origem_destino = '' where matricula = '$matricula'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); } if ($result) @@ -1068,7 +1068,7 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { $relEvt = GetRelacionaEventos($dbcon, $matricula); $query = "insert into pbx_eventos_agentes(matricula, ramal, id_dac, id_motivo_pausa, entrada_pausa, flag, relaciona_eventos, pausa_produtiva, reg_proc) values('$matricula', '$ramal', $idDac, $codMotivo, now(), 0, $relEvt, (select produtiva from pbx_motivos_pausas where id = '$codMotivo'), $regProc)"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $result = @pg_affected_rows($result); @@ -1084,13 +1084,13 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { } } if ($result) { - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); $_SESSION[$idSessao] = 1; $_SESSION[AGT_ULT_EVENTO] = "PAUSA"; return "OK;O agente \"Matricula: $matricula \" foi colocado em pausa!"; } else { - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); return "ERRO;A operação não pode ser realizada! Erro: " + pg_last_error($dbcon); } } @@ -1099,11 +1099,11 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { if ($result) { $regProc = QuotedStr(sprintf(",RemPausa: Login: %s Scrp: %s Func: %s", GetLogin(), 'supervisor.php', 'PausaAgente')); - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); //atualiza dados do supervisor $query = "select origem_destino from pbx_supervisor_agentes where matricula = '$matricula' "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = pg_fetch_row($result); $statusAtual = empty($row[0]) ? 'LIVRE' : 'OCUPADO'; @@ -1113,7 +1113,7 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { duracao = now() where matricula = '$matricula'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $result = pg_affected_rows($result); @@ -1127,20 +1127,20 @@ function PausaAgente($dbcon, $ramal, $dac, $matricula) { and id_dac = (select id from pbx_dacs where nome = '$dac') and entrada_pausa = (select max(entrada_pausa) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = (select id from pbx_dacs where nome = '$dac'))"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $result = @pg_affected_rows($result); } } if ($result) { - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); $_SESSION[$idSessao] = 0; $_SESSION[AGT_DESCONECTA_SUPER] = 1; return "OK;O agente \"Matricula: $matricula \" foi retirado de pausa!"; } else { - @pg_query($db, "rollback"); + pg_query($db, "rollback"); return "ERRO;A operação não pode ser realizada! Erro: " + pg_last_error($dbcon); } } diff --git a/supervisorAntigo.php b/supervisorAntigo.php index 40420db1..dfd7e93b 100644 --- a/supervisorAntigo.php +++ b/supervisorAntigo.php @@ -32,20 +32,20 @@ if (IsAjax() && isset($_GET["logoff"])) { $result = GetUrl(AST_LOGOFF_AGENTE, $dacLogoff, $matrLogoff); if ($result) { - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); //atualiza dados do supervisor $query = "delete from pbx_supervisor_agentes where matricula = '$matrLogoff'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $result = @pg_affected_rows($result); //registra o login do usuario if ($result) { $query = "select coalesce(max(id),0) as id from pbx_eventos_agentes where matricula = '$matrLogoff' and cast(login as date) = cast(now() as date) and flag <> 2"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $row = @pg_fetch_row($result); $idLogoff = $row[0]; if ($idLogoff) { @@ -53,17 +53,17 @@ if (IsAjax() && isset($_GET["logoff"])) { set logoff = now(), flag = 2 where id = $idLogoff"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); $result = @pg_affected_rows($result); } } } if ($result) { - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); echo "O logoff do usuário executado com sucesso!"; } else { - @pg_query($dbcon, "rollback"); + pg_query($dbcon, "rollback"); echo "O logoff do usuário não pode ser executado!" + pg_last_error($dbcon); } } else if (IsAjax() && isset($_GET["pausaAgente"])) { @@ -78,14 +78,14 @@ if (IsAjax() && isset($_GET["logoff"])) { $result = GetUrl(AST_ADD_PAUSA, $dac, $matricula); if ($result) { - $result = @pg_query($db, "begin"); + $result = pg_query($db, "begin"); //atualiza dados do supervisor $query = "update pbx_supervisor_agentes set status = 'PAUSA', duracao = now() where matricula = '$matricula'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $result = @pg_affected_rows($result); @@ -94,7 +94,7 @@ if (IsAjax() && isset($_GET["logoff"])) { $relEvt = GetRelacionaEventos($dbcon, $matricula); $query = "insert into pbx_eventos_agentes(matricula, ramal, id_dac, id_motivo_pausa, entrada_pausa, flag, relaciona_eventos) values('$matricula', '$ramal', $dac, $codMotivo, now(), 0, $relEvt)"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) { $result = @pg_affected_rows($result); @@ -110,11 +110,11 @@ if (IsAjax() && isset($_GET["logoff"])) { } } if ($result) { - @pg_query($db, "commit"); + pg_query($db, "commit"); $_SESSION[$idSessao] = 1; echo "O agente \"Matricula: $matricula \" foi colocado em pausa!"; } else { - @pg_query($db, "rollback"); + pg_query($db, "rollback"); echo "A operação não pode ser realizada! Erro: " + pg_last_error($dbcon); } } @@ -122,7 +122,7 @@ if (IsAjax() && isset($_GET["logoff"])) { $result = GetUrl(AST_REM_PAUSA, $dac, $ramal); if ($result) { - $result = @pg_query($dbcon, "begin"); + $result = pg_query($dbcon, "begin"); //atualiza dados do supervisor $query = "update pbx_supervisor_agentes @@ -130,7 +130,7 @@ if (IsAjax() && isset($_GET["logoff"])) { duracao = now() where matricula = '$matricula'"; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $result = pg_affected_rows($result); @@ -141,18 +141,18 @@ if (IsAjax() && isset($_GET["logoff"])) { set saida_pausa = now(), flag = 2 where id = $idPausa "; - $result = @pg_query($dbcon, $query); + $result = pg_query($dbcon, $query); if ($result) $result = @pg_affected_rows($result); } } if ($result) { - @pg_query($dbcon, "commit"); + pg_query($dbcon, "commit"); $_SESSION[$idSessao] = 0; echo "O agente \"Matricula: $matricula \" foi retirado de pausa!"; } else { - @pg_query($db, "rollback"); + pg_query($db, "rollback"); echo "A operação não pode ser realizada! Erro: " + pg_last_error($dbcon); } } @@ -341,7 +341,7 @@ function GetTbDac($dbcon, $dac, $head) { $tb .= GetLinhas($head, 1); //executa query - $result = @pg_query($dbcon, GetQuery(1, $dac)); + $result = pg_query($dbcon, GetQuery(1, $dac)); //linhas de resultado da consulta while ($agente = @pg_fetch_row($result)) { @@ -361,7 +361,7 @@ function GetTbAgente($dbcon, $dac, $head) { $tb .= GetLinhas($head, 1); //executa query - $result = @pg_query($dbcon, GetQuery(2, $dac)); + $result = pg_query($dbcon, GetQuery(2, $dac)); //linhas de resultado da consulta while ($agente = @pg_fetch_row($result)) diff --git a/vendas/grupoVendasEmpresas.php b/vendas/grupoVendasEmpresas.php index 5535df02..baab337a 100644 --- a/vendas/grupoVendasEmpresas.php +++ b/vendas/grupoVendasEmpresas.php @@ -19,21 +19,21 @@ if (isset($fieldsForm['btIncRegistro'])) { $fieldsForm['erro'] = fmtMsg('Selecione um registro!'); } else { - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($fieldsForm['listaDisponiveis'] as $regDisp) { $query = "insert into vds_grupos_empresas (emp_id,grp_id)values('%s', '%s')"; $query = sprintf($query, $regDisp, $regId); - $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('Registro incluido com sucesso!') : fmtErro('O registro não pode ser incluido!', pg_last_error($dbcon)); } @@ -42,21 +42,21 @@ else if (isset($fieldsForm['btRmRegistro'])) { if (empty($fieldsForm['listaInclusos'])) { $fieldsForm['erro'] = fmtMsg('Selecione um registro!'); } else { - @pg_query($dbcon, 'begin'); + pg_query($dbcon, 'begin'); foreach ($fieldsForm['listaInclusos'] as $regInc) { $query = "DELETE FROM vds_grupos_empresas WHERE emp_id = '%s' AND grp_id ='%s'"; $query = sprintf($query, $regInc, $regId); - $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('Registro removido com sucesso!') : fmtErro('O registro não pode ser removido!', pg_last_error($dbcon)); }