From 8ba6a80a8ba1e831a223c1a59684c8d9ad1c8e51 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sat, 2 Jul 2016 12:05:42 -0300 Subject: [PATCH] Atualização admin1 --- admin/admin.db | Bin 335872 -> 0 bytes admin/php/admin.php | 59 +++++++++++++++++++++++++++-------------------------------- admin/php/arvore.php | 8 ++++---- admin/php/atlas.php | 12 ++++++------ admin/php/classe_metaestat.php | 48 ++++++++++++++++++++++++------------------------ admin/php/conexao.php | 2 +- admin/php/conexaopostgresql.php | 2 +- admin/php/gruposusuarios.php | 8 ++++---- admin/php/identifica.php | 4 ++-- admin/php/login.php | 24 +++++++++++++++--------- admin/php/mapas.php | 6 +++--- admin/php/menutemas.php | 18 +++++++++--------- admin/php/metaestat_uploadcsv_submit.php | 6 +++--- admin/php/metaestat_uploadshp_submit.php | 6 +++--- admin/php/operacoes.php | 6 +++--- admin/php/sistemas.php | 8 ++++---- admin/php/usuarios.php | 8 ++++---- admin/php/webservices.php | 6 +++--- admin1/dicionario/core.js | 5 +++++ admin1/ferramentas/banco/index.php | 10 +++++----- admin1/ferramentas/estatisticas/index.php | 8 ++++---- admin1/head.php | 3 +++ admin1/js/core.js | 16 ++++++++++++++++ admin1/js/operacoes.js | 329 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- admin1/usuarios/operacoes/exec.php | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------- admin1/usuarios/operacoes/index.js | 63 ++++++++++++++++++++++++++++++++------------------------------- admin1/usuarios/operacoes/index.php | 19 +++++++++---------- ferramentas/loginusuario/template_mst_bt.html | 5 +++-- 28 files changed, 280 insertions(+), 540 deletions(-) delete mode 100755 admin1/js/operacoes.js diff --git a/admin/admin.db b/admin/admin.db index 3980a1c..9b755e5 100755 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/php/admin.php b/admin/php/admin.php index 64dcb98..d44b774 100755 --- a/admin/php/admin.php +++ b/admin/php/admin.php @@ -151,7 +151,7 @@ function exclui($tabela,$coluna,$id){ return "ok"; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -163,41 +163,35 @@ Parametros: sql {string} - sql que serao executado -locaplic {string} - endereco do i3Geo no sistema de arquivos - Retorno: Array originada de fetchAll */ -function pegaDados($sql,$locaplic="") +function pegaDados($sql,$dbh="",$close=true) { $resultado = array(); - /* - if($locaplic == "") - include("conexao.php"); - else - include("$locaplic/admin/php/conexao.php"); - */ - include(dirname(__FILE__)."/conexao.php"); + //is_string para efeitos de compatibilidade + if($dbh == "" || is_string($dbh)){ + include(dirname(__FILE__)."/conexao.php"); + } error_reporting(0); //$dbh deve ser definido com somente leitura, mas por prevencao: $sql = str_ireplace(array("update","delete","insert","--","drop",";"),"",$sql); $q = $dbh->query($sql,PDO::FETCH_ASSOC); - if($q) - { + if($q){ $resultado = $q->fetchAll(); - $dbh = null; - $dbhw = null; + if($close == true){ + $dbh = null; + $dbhw = null; + } return $resultado; } - else - { - $e = $dbh->errorInfo(); - //$e1 = $dbhw->errorInfo(); - $dbh = null; - $dbhw = null; - //echo " erro: ".$e[2]; - throw new Exception(" erro admin.php funcao pegaDados:
".$e[2]."
"); + else{ + if($close == true){ + $dbh = null; + $dbhw = null; + } + throw new Exception(" erro admin.php funcao pegaDados"); } } /** @@ -221,14 +215,14 @@ function i3GeoAdminUpdate($pdo,$tabela,$data,$filtro=""){ try { $prep = $pdo->prepare($sql); } catch (PDOException $e) { - return $e->getMessage(); + return "Error!: "; } try { $exec = $prep->execute(array_values($data)); i3GeoAdminInsertLog($pdo,$sql,array_values($data)); return true; } catch (PDOException $e) { - return $e->getMessage(); + return "Error!: "; } } /** @@ -250,7 +244,7 @@ function i3GeoAdminInsert($pdo,$tabela,$data){ try { $prep = $pdo->prepare($sql); } catch (PDOException $e) { - return "prepare ".$e->getMessage(); + return "prepare "; } try { $exec = $prep->execute(array_values($data)); @@ -258,7 +252,7 @@ function i3GeoAdminInsert($pdo,$tabela,$data){ i3GeoAdminInsertLog($pdo,$sql,array_values($data)); return true; } catch (PDOException $e) { - return "execute ".$e->getMessage(); + return "execute "; } } /** @@ -276,18 +270,19 @@ function i3GeoAdminInsertUnico($pdo,$tabela,$data,$colTemp,$colId){ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $idtemp = (rand (9000,10000)) * -1; $data[$colTemp] = $idtemp; + $q = i3GeoAdminInsert( $pdo, $tabela, $data ); if($q !== true){ - echo "Error! insert: " . $q; exit; + echo "Error! insert "; exit; } try { $id = $pdo->query("SELECT $colId FROM ".$esquemaadmin."$tabela WHERE $colTemp = '$idtemp'"); } catch (PDOException $e) { - return "SELECT ID ".$e->getMessage(); + return "SELECT ID "; } try { $id = $id->fetchAll(); @@ -297,7 +292,7 @@ function i3GeoAdminInsertUnico($pdo,$tabela,$data,$colTemp,$colId){ i3GeoAdminInsertLog($pdo,$sql); return $id; } catch (PDOException $e) { - return "UPDATE ID ".$e->getMessage(); + return "UPDATE ID "; } } //$logTransacoes vem do ms_configura.php @@ -332,7 +327,7 @@ function i3GeoAdminInsertLog($pdo,$sql,$data=array()){ ); return true; } catch (PDOException $e) { - echo $e->getMessage();exit; + echo " ";exit; } } /* @@ -505,7 +500,7 @@ function verificaFilhos() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* diff --git a/admin/php/arvore.php b/admin/php/arvore.php index cb96bc2..08e2bee 100755 --- a/admin/php/arvore.php +++ b/admin/php/arvore.php @@ -569,7 +569,7 @@ function alteraN3(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -605,7 +605,7 @@ function alteraN2(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -641,7 +641,7 @@ function alteraN1(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -679,7 +679,7 @@ function alterarRaiz() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function movimentaNo(){ diff --git a/admin/php/atlas.php b/admin/php/atlas.php index ec0d823..d7bc1e1 100755 --- a/admin/php/atlas.php +++ b/admin/php/atlas.php @@ -487,7 +487,7 @@ function alterarAtlas() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function alterarPrancha() @@ -536,7 +536,7 @@ function alterarPrancha() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function alterarTema(){ @@ -569,7 +569,7 @@ function alterarTema(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirPrancha() @@ -587,7 +587,7 @@ function excluirPrancha() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirTema() @@ -605,7 +605,7 @@ function excluirTema() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirAtlas() @@ -623,7 +623,7 @@ function excluirAtlas() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> \ No newline at end of file diff --git a/admin/php/classe_metaestat.php b/admin/php/classe_metaestat.php index 325c057..6c858e0 100755 --- a/admin/php/classe_metaestat.php +++ b/admin/php/classe_metaestat.php @@ -193,7 +193,7 @@ class Metaestat{ $q = $this->dbh->query($sql,PDO::FETCH_ASSOC); } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } if($q){ $r = $q->fetchAll(); @@ -277,7 +277,7 @@ class Metaestat{ return "ok"; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -294,7 +294,7 @@ class Metaestat{ return "ok"; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1187,7 +1187,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1222,7 +1222,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1257,7 +1257,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1288,7 +1288,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1333,7 +1333,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1368,7 +1368,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1398,7 +1398,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1441,7 +1441,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1471,7 +1471,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1500,7 +1500,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1545,7 +1545,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1575,7 +1575,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1615,7 +1615,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -1652,7 +1652,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -1703,7 +1703,7 @@ class Metaestat{ return $retorna; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /** @@ -2744,7 +2744,7 @@ class Metaestat{ } catch (Exception $e) { $dbh->rollBack(); - return "Falhou: " . $e->getMessage(); + return "Falhou: " . " "; } return "Processo concluido para ".count($linhas)." linhas"; } @@ -2852,7 +2852,7 @@ class Metaestat{ } catch (Exception $e) { $dbh->rollBack(); - return array("Falhou: " . $e->getMessage()); + return array("Falhou: " . " "); } return array("ok"); } @@ -2972,7 +2972,7 @@ class Metaestat{ $dbh->commit(); } catch (Exception $e) { $dbh->rollBack(); - return array("Falhou: " . $e->getMessage()); + return array("Falhou: " . " "); } return array("ok"); } @@ -3003,7 +3003,7 @@ class Metaestat{ $dbh->commit(); } catch (Exception $e) { $dbh->rollBack(); - return array("Falhou: " . $e->getMessage()); + return array("Falhou: " . " "); } } } @@ -3043,7 +3043,7 @@ class Metaestat{ $dbh->commit(); } catch (Exception $e) { $dbh->rollBack(); - return array("Falhou: " . $e->getMessage()); + return array("Falhou: " . " "); } return array("ok"); } @@ -3171,7 +3171,7 @@ class Metaestat{ ); return true; } catch (PDOException $e) { - echo $e->getMessage();exit; + echo " ";exit; } } } diff --git a/admin/php/conexao.php b/admin/php/conexao.php index 8ff3909..90ad784 100755 --- a/admin/php/conexao.php +++ b/admin/php/conexao.php @@ -89,7 +89,7 @@ if($conexaoadmin == ""){ $dbh = new PDO($conAdmin); } catch (PDOException $e) { - print "Erro ao criar o objeto PDO!: " . $e->getMessage() . "
Talvez exista alguma incompatibilidade entre o PHP e o banco admin.db. Vc pode apagar o arquivo menutemas/admin.db e recria-lo com admin/php/criasqlite.php"; + print "Erro ao criar o objeto PDO!:
Talvez exista alguma incompatibilidade entre o PHP e o banco admin.db. Vc pode apagar o arquivo menutemas/admin.db e recria-lo com admin/php/criasqlite.php"; die(); } } diff --git a/admin/php/conexaopostgresql.php b/admin/php/conexaopostgresql.php index a20fe57..49dd42c 100755 --- a/admin/php/conexaopostgresql.php +++ b/admin/php/conexaopostgresql.php @@ -8,7 +8,7 @@ try } catch (PDOException $e) { - print "Erro : " . $e->getMessage() . "
Se vc estiver usando SQLITE, talvez exista alguma incompatibilidade entre o PHP e o banco admin.db. Vc pode apagar o arquivo menutemas/admin.db e recria-lo com admin/php/criasqlite.php"; + print "Erro : " . " " . "
Se vc estiver usando SQLITE, talvez exista alguma incompatibilidade entre o PHP e o banco admin.db. Vc pode apagar o arquivo menutemas/admin.db e recria-lo com admin/php/criasqlite.php"; die(); } $convUTF = true; diff --git a/admin/php/gruposusuarios.php b/admin/php/gruposusuarios.php index 2347e95..8142d88 100755 --- a/admin/php/gruposusuarios.php +++ b/admin/php/gruposusuarios.php @@ -160,7 +160,7 @@ function alterarGrupos() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function adicionaUsuarioGrupo(){ @@ -177,7 +177,7 @@ function adicionaUsuarioGrupo(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirGrupo() @@ -189,7 +189,7 @@ function excluirGrupo() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirUsuarioGrupo() @@ -207,7 +207,7 @@ function excluirUsuarioGrupo() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> \ No newline at end of file diff --git a/admin/php/identifica.php b/admin/php/identifica.php index f399377..9c40b03 100755 --- a/admin/php/identifica.php +++ b/admin/php/identifica.php @@ -158,7 +158,7 @@ function alterarFuncoes(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirFuncoes(){ @@ -168,7 +168,7 @@ function excluirFuncoes(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> \ No newline at end of file diff --git a/admin/php/login.php b/admin/php/login.php index 26a616a..fbde3db 100755 --- a/admin/php/login.php +++ b/admin/php/login.php @@ -277,10 +277,10 @@ function autenticaUsuario($usuario,$senha){ //echo "select * from ".$esquemaadmin."i3geousr_usuarios where login = '$usuario' and (senha = '$senhamd5' or senha = '$senha') and ativo = 1";exit; //exit; if(verificaMaster($usuario,$senha) == true){ - - $pa = pegaDados("select * from ".$esquemaadmin."i3geousr_papelusuario ",$locaplic); - $op = pegadados("SELECT O.codigo FROM ".$esquemaadmin."i3geousr_operacoes AS O"); - $gr = pegadados("SELECT * from ".$esquemaadmin."i3geousr_grupos "); + + $pa = pegaDados("select * from ".$esquemaadmin."i3geousr_papelusuario ",$dbh,false); + $op = pegadados("SELECT O.codigo FROM ".$esquemaadmin."i3geousr_operacoes AS O",$dbh,false); + $gr = pegadados("SELECT * from ".$esquemaadmin."i3geousr_grupos ",$dbh,false); //var_dump($gr);exit; $operacoes = array(); foreach($op as $o){ @@ -298,20 +298,22 @@ function autenticaUsuario($usuario,$senha){ $master["id_usuario"] = "master"; $master["nome_usuario"] = "master"; $r = array("usuario"=>$master,"papeis"=>$papeis,"operacoes"=>$operacoes,"gruposusr"=>$gruposusr); + $dbh = null; + $dbhw = null; return $r; } else{ //verifica se a senha e uma string ou pode ser um md5 if(strlen($senha) == 32){ - $dados = pegaDados("select * from ".$esquemaadmin."i3geousr_usuarios where login = '$usuario' and senha = '$senhamd5' and ativo = 1",$locaplic); + $dados = pegaDados("select * from ".$esquemaadmin."i3geousr_usuarios where login = '$usuario' and senha = '$senhamd5' and ativo = 1",$dbh,false); } else{ - $dados = pegaDados("select * from ".$esquemaadmin."i3geousr_usuarios where login = '$usuario' and (senha = '$senhamd5' or senha = '$senha') and ativo = 1",$locaplic); + $dados = pegaDados("select * from ".$esquemaadmin."i3geousr_usuarios where login = '$usuario' and (senha = '$senhamd5' or senha = '$senha') and ativo = 1",$dbh,false); } if(count($dados) > 0){ - $pa = pegaDados("select * from ".$esquemaadmin."i3geousr_papelusuario where id_usuario = ".$dados[0]["id_usuario"],$locaplic); - $op = pegadados("SELECT O.codigo, PU.id_usuario FROM ".$esquemaadmin."i3geousr_operacoes AS O JOIN ".$esquemaadmin."i3geousr_operacoespapeis AS OP ON O.id_operacao = OP.id_operacao JOIN ".$esquemaadmin."i3geousr_papelusuario AS PU ON OP.id_papel = PU.id_papel WHERE id_usuario = ".$dados[0]["id_usuario"],$locaplic); - $gr = pegadados("SELECT * from ".$esquemaadmin."i3geousr_grupousuario where id_usuario = ".$dados[0]["id_usuario"]); + $pa = pegaDados("select * from ".$esquemaadmin."i3geousr_papelusuario where id_usuario = ".$dados[0]["id_usuario"],$dbh,false); + $op = pegadados("SELECT O.codigo, PU.id_usuario FROM ".$esquemaadmin."i3geousr_operacoes AS O JOIN ".$esquemaadmin."i3geousr_operacoespapeis AS OP ON O.id_operacao = OP.id_operacao JOIN ".$esquemaadmin."i3geousr_papelusuario AS PU ON OP.id_papel = PU.id_papel WHERE id_usuario = ".$dados[0]["id_usuario"],$dbh,false); + $gr = pegadados("SELECT * from ".$esquemaadmin."i3geousr_grupousuario where id_usuario = ".$dados[0]["id_usuario"],$dbh,false); $operacoes = array(); foreach($op as $o){ $operacoes[$o["codigo"]] = true; @@ -325,9 +327,13 @@ function autenticaUsuario($usuario,$senha){ $gruposusr[] = $p["id_grupo"]; } $r = array("usuario"=>$dados[0],"papeis"=>$papeis,"operacoes"=>$operacoes,"gruposusr"=>$gruposusr); + $dbh = null; + $dbhw = null; return $r; } else{ + $dbh = null; + $dbhw = null; return false; } } diff --git a/admin/php/mapas.php b/admin/php/mapas.php index 7a7ef2a..6604f12 100755 --- a/admin/php/mapas.php +++ b/admin/php/mapas.php @@ -245,7 +245,7 @@ function salvaMapfile(){ return array("id"=>$id,"status"=>"ok"); } catch (PDOException $e){ - return array("id"=>"","status"=>"Error!: " . $e->getMessage()); + return array("id"=>"","status"=>"Error!: " . " "); } } /* @@ -302,7 +302,7 @@ function alterarMapa(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirMapa(){ @@ -312,7 +312,7 @@ function excluirMapa(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> \ No newline at end of file diff --git a/admin/php/menutemas.php b/admin/php/menutemas.php index 0b0d80c..f2a0b30 100755 --- a/admin/php/menutemas.php +++ b/admin/php/menutemas.php @@ -803,7 +803,7 @@ function pegaTemas() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function pegaTemas2() @@ -845,7 +845,7 @@ function pegaTemas2() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -897,7 +897,7 @@ function alteraMenus() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function alteraPerfis(){ @@ -1034,7 +1034,7 @@ function alteraPerfis(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function alteraTags(){ @@ -1073,7 +1073,7 @@ function alteraTags(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -1116,7 +1116,7 @@ function alteraGrupos() return $id_grupo; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -1161,7 +1161,7 @@ function alteraSubGrupos() } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -1196,7 +1196,7 @@ function registraTema() return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* @@ -1309,7 +1309,7 @@ function alteraTemas() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } /* diff --git a/admin/php/metaestat_uploadcsv_submit.php b/admin/php/metaestat_uploadcsv_submit.php index 72d314f..1779819 100755 --- a/admin/php/metaestat_uploadcsv_submit.php +++ b/admin/php/metaestat_uploadcsv_submit.php @@ -122,7 +122,7 @@ if (ob_get_level() == 0) ob_start(); try { $dbh = new PDO('pgsql:dbname='.$conexao["bancodedados"].';user='.$conexao["usuario"].';password='.$conexao["senha"].';host='.$conexao["host"].';port='.$conexao["porta"]); } catch (PDOException $e) { - echo 'Connection failed: ' . $e->getMessage(); + echo 'Connection failed: ' . " "; } //encoding do banco de dados $sql = "SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = '".$conexao["bancodedados"]."'"; @@ -261,7 +261,7 @@ if (ob_get_level() == 0) ob_start(); try { $dbh->query($linha); } catch (PDOException $e) { - echo 'Erro: ' . $e->getMessage(); + echo 'Erro: ' . " "; } } $bdcon = pg_connect('dbname='.$conexao["bancodedados"].' user='.$conexao["usuario"].' password='.$conexao["senha"].' host='.$conexao["host"].' port='.$conexao["porta"]."options='-c client_encoding=LATIN1'"); @@ -286,7 +286,7 @@ if (ob_get_level() == 0) ob_start(); } } } catch (PDOException $e) { - echo 'Erro: ' . $e->getMessage(); + echo 'Erro: ' . " "; } } $sql = "select * from ".$_POST["i3GEOuploadcsvesquema"].".".$_POST["tabelaDestinocsv"]; diff --git a/admin/php/metaestat_uploadshp_submit.php b/admin/php/metaestat_uploadshp_submit.php index 95fdf08..5606337 100755 --- a/admin/php/metaestat_uploadshp_submit.php +++ b/admin/php/metaestat_uploadshp_submit.php @@ -134,7 +134,7 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ try { $dbh = new PDO('pgsql:dbname='.$conexao["bancodedados"].';user='.$conexao["usuario"].';password='.$conexao["senha"].';host='.$conexao["host"].';port='.$conexao["porta"]); } catch (PDOException $e) { - echo 'Connection failed: ' . $e->getMessage(); + echo 'Connection failed: ' . " "; exit; } @@ -289,7 +289,7 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ try { $dbh->query($linha); } catch (PDOException $e) { - echo 'Erro: ' . $e->getMessage(); + echo 'Erro: ' . " "; } } $bdcon = pg_connect('dbname='.$conexao["bancodedados"].' user='.$conexao["usuario"].' password='.$conexao["senha"].' host='.$conexao["host"].' port='.$conexao["porta"]."options='-c client_encoding=LATIN1'"); @@ -313,7 +313,7 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ } } } catch (PDOException $e) { - echo 'Erro: ' . $e->getMessage(); + echo 'Erro: ' . " "; } } $sql = "select * from ".$_POST["i3GEOuploadesquema"].".".$_POST["tabelaDestino"]; diff --git a/admin/php/operacoes.php b/admin/php/operacoes.php index 7b679bc..35abba2 100755 --- a/admin/php/operacoes.php +++ b/admin/php/operacoes.php @@ -138,7 +138,7 @@ function alterarOperacoes(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function adicionaPapelOperacoes(){ @@ -155,7 +155,7 @@ function adicionaPapelOperacoes(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirPapelOperacao(){ @@ -170,7 +170,7 @@ function excluirPapelOperacao(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> diff --git a/admin/php/sistemas.php b/admin/php/sistemas.php index 0bcc5c1..be4dee8 100755 --- a/admin/php/sistemas.php +++ b/admin/php/sistemas.php @@ -257,7 +257,7 @@ function alterarSistemas(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function alterarFuncoes(){ @@ -301,7 +301,7 @@ function alterarFuncoes(){ } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirFuncoes() @@ -317,7 +317,7 @@ function excluirFuncoes() return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirSistemas() @@ -333,7 +333,7 @@ function excluirSistemas() return $id; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } diff --git a/admin/php/usuarios.php b/admin/php/usuarios.php index 2a4a74f..571d374 100755 --- a/admin/php/usuarios.php +++ b/admin/php/usuarios.php @@ -194,7 +194,7 @@ function alterarUsuarios() return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function adicionaPapelUsuario(){ @@ -211,7 +211,7 @@ function adicionaPapelUsuario(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirUsuario(){ @@ -226,7 +226,7 @@ function excluirUsuario(){ return "ok"; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirPapelUsuario(){ @@ -241,7 +241,7 @@ function excluirPapelUsuario(){ return "ok"; } catch (PDOException $e) { - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> diff --git a/admin/php/webservices.php b/admin/php/webservices.php index b2b9a94..87ef6ad 100755 --- a/admin/php/webservices.php +++ b/admin/php/webservices.php @@ -188,7 +188,7 @@ function alterarWS(){ return $retorna; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function excluirWS(){ @@ -203,7 +203,7 @@ function excluirWS(){ return "ok"; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } function adicionaAcesso($id_ws,$sucesso){ @@ -239,7 +239,7 @@ function adicionaAcesso($id_ws,$sucesso){ $dbh = null; } catch (PDOException $e){ - return "Error!: " . $e->getMessage(); + return "Error!: "; } } ?> \ No newline at end of file diff --git a/admin1/dicionario/core.js b/admin1/dicionario/core.js index 2be3c96..c200a2d 100755 --- a/admin1/dicionario/core.js +++ b/admin1/dicionario/core.js @@ -216,6 +216,11 @@ i3GEOadmin.core.dicionario = { en : "", es : "" } ], + 'cancelar' : [ { + pt : "Cancelar", + en : "", + es : "" + } ], 'salvaTxt' : [ { pt : "salvando texto...", en : "", diff --git a/admin1/ferramentas/banco/index.php b/admin1/ferramentas/banco/index.php index bd28b6b..5a7de72 100755 --- a/admin1/ferramentas/banco/index.php +++ b/admin1/ferramentas/banco/index.php @@ -26,7 +26,7 @@ include "../../head.php"; exit; } $dbh = new PDO('sqlite:../../../admin/admin.db'); - echo "

Lista de tabelas

"; + echo "

Lista de tabelas

"; $q = $dbh->query("SELECT name FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type='table' ORDER BY name",PDO::FETCH_ASSOC); $resultado = $q->fetchAll(); foreach ($resultado as $r){ @@ -34,7 +34,7 @@ include "../../head.php"; } $q = $dbh->query("select * from sqlite_master",PDO::FETCH_ASSOC); $resultado = $q->fetchAll(); - echo "

SQL no padrão SQLITE

"; + echo "

SQL no padrão SQLITE

"; foreach($resultado as $r){ if(mb_detect_encoding($temasacessos2[$i],'UTF-8, ISO-8859-1') == "UTF-8"){ echo "

".utf8_decode($r["sql"])."

"; @@ -43,7 +43,7 @@ include "../../head.php"; echo "

".$r["sql"]."

"; } } - echo "

SQL no padrão POSTGRES

"; + echo "

SQL no padrão POSTGRES

"; echo "

Após criar as tabelas no Postgres, vc deve definir as permissões para os usuários.

"; echo "

Para usar outro banco de dados que não seja o default (SQLITE), você terá de alterar o programa i3geo/admin/php/conexao.php

"; foreach($resultado as $r){ @@ -52,7 +52,7 @@ include "../../head.php"; } echo str_ireplace("INTEGER PRIMARY KEY","SERIAL PRIMARY KEY NOT NULL",$r["sql"])."
"; } - echo "

Listagem completa

"; + echo "

Listagem completa

"; echo "
";
 				$resultado = var_dump($resultado);
 				if(mb_detect_encoding($resultado,'UTF-8, ISO-8859-1') == "UTF-8"){
@@ -62,7 +62,7 @@ include "../../head.php";
 				$dbh = null;
 				$dbhw = null;
 			?>
-
+				
diff --git a/admin1/ferramentas/estatisticas/index.php b/admin1/ferramentas/estatisticas/index.php index 5568a14..c574e9f 100755 --- a/admin1/ferramentas/estatisticas/index.php +++ b/admin1/ferramentas/estatisticas/index.php @@ -92,8 +92,8 @@ include "../../head.php"; echo "
  • "; echo "
  • "; echo "
  • "; - echo ""; - echo "

    Dos temas válidos

    "; + echo ""; + echo "

    Dos temas válidos

    "; echo "
      "; echo "
    "; - echo ""; - echo "

    Acesos por tema

      "; + echo "
    "; + echo "

    Acesos por tema

      "; arsort($temasacessos); $temasacessos2 = array_keys($temasacessos); for($i=0;$i<=count($temasacessos2);$i++){ diff --git a/admin1/head.php b/admin1/head.php index b37fce6..f8c25c5 100755 --- a/admin1/head.php +++ b/admin1/head.php @@ -176,6 +176,9 @@ body { } +