Commit af322416f3a0eac2cda17fbee6976b703ec81ed6

Authored by Edmar Moretti
1 parent 9963f681

Correção ao salvar e editar região geográfica

admin/admin.db
No preview for this file type
admin1/metaestat/regioes/exec.php
@@ -37,7 +37,7 @@ $codigo_tipo_regiao = $_POST["codigo_tipo_regiao"]; @@ -37,7 +37,7 @@ $codigo_tipo_regiao = $_POST["codigo_tipo_regiao"];
37 $funcao = strtoupper ( $funcao ); 37 $funcao = strtoupper ( $funcao );
38 switch ($funcao) { 38 switch ($funcao) {
39 case "ADICIONAR" : 39 case "ADICIONAR" :
40 - $novo = \admin\metaestat\regioes\adicionar ( $_POST["codigo_tipo_regiao"], $_POST["nome_tipo_regiao"],$_POST["descricao_tipo_regiao"],$_POST["codigo_estat_conexao"],$_POST["esquemadb"],$_POST["tabela"],$_POST["colunageo"],$_POST["data"],$_POST["identificador"],$_POST["colunanomeregiao"],$_POST["srid"],$_POST["colunacentroide"],$_POST["colunasvisiveis"],$_POST["apelidos"], $dbhw ); 40 + $novo = \admin\metaestat\regioes\adicionar ( $_POST["nome_tipo_regiao"],$_POST["descricao_tipo_regiao"],$_POST["codigo_estat_conexao"],$_POST["esquemadb"],$_POST["tabela"],$_POST["colunageo"],$_POST["data"],$_POST["identificador"],$_POST["colunanomeregiao"],$_POST["srid"],$_POST["colunacentroide"],$_POST["colunasvisiveis"],$_POST["apelidos"], $dbhw );
41 $dbhw = null; 41 $dbhw = null;
42 $dbh = null; 42 $dbh = null;
43 if ($novo === false) { 43 if ($novo === false) {
@@ -45,7 +45,7 @@ switch ($funcao) { @@ -45,7 +45,7 @@ switch ($funcao) {
45 } 45 }
46 break; 46 break;
47 case "ALTERAR" : 47 case "ALTERAR" :
48 - $novo = \admin\metaestat\regioes\alterar ( $codigo_tipo_regiao,$_POST["codigo_tipo_regiao"], $_POST["nome_tipo_regiao"],$_POST["descricao_tipo_regiao"],$_POST["codigo_estat_conexao"],$_POST["esquemadb"],$_POST["tabela"],$_POST["colunageo"],$_POST["data"],$_POST["identificador"],$_POST["colunanomeregiao"],$_POST["srid"],$_POST["colunacentroide"],$_POST["colunasvisiveis"],$_POST["apelidos"], $dbhw ); 48 + $novo = \admin\metaestat\regioes\alterar ( $codigo_tipo_regiao, $_POST["nome_tipo_regiao"],$_POST["descricao_tipo_regiao"],$_POST["codigo_estat_conexao"],$_POST["esquemadb"],$_POST["tabela"],$_POST["colunageo"],$_POST["data"],$_POST["identificador"],$_POST["colunanomeregiao"],$_POST["srid"],$_POST["colunacentroide"],$_POST["colunasvisiveis"],$_POST["apelidos"], $dbhw );
49 $dbhw = null; 49 $dbhw = null;
50 $dbh = null; 50 $dbh = null;
51 if ($novo === false) { 51 if ($novo === false) {
admin1/metaestat/regioes/funcoes.php
@@ -35,7 +35,7 @@ function adicionar($nome_tipo_regiao,$descricao_tipo_regiao,$codigo_estat_conexa @@ -35,7 +35,7 @@ function adicionar($nome_tipo_regiao,$descricao_tipo_regiao,$codigo_estat_conexa
35 "apelidos"=>'' 35 "apelidos"=>''
36 ); 36 );
37 $codigo_tipo_regiao = \admin\php\funcoesAdmin\i3GeoAdminInsertUnico ( $dbhw, "i3geoestat_tipo_regiao", $dataCol, "nome_tipo_regiao", "codigo_tipo_regiao" ); 37 $codigo_tipo_regiao = \admin\php\funcoesAdmin\i3GeoAdminInsertUnico ( $dbhw, "i3geoestat_tipo_regiao", $dataCol, "nome_tipo_regiao", "codigo_tipo_regiao" );
38 - $retorna = \admin\metaestat\regioes\alterar ( $codigo_tipo_regiao, $nome, $descricao, $dbhw ); 38 + $retorna = \admin\metaestat\regioes\alterar ( $codigo_tipo_regiao, $nome_tipo_regiao,$descricao_tipo_regiao,$codigo_estat_conexao,$esquemadb,$tabela,$colunageo,$data,$identificador,$colunanomeregiao,$srid,$colunacentroide,$colunasvisiveis,$apelidos,$dbhw );
39 39
40 return $retorna; 40 return $retorna;
41 } catch ( PDOException $e ) { 41 } catch ( PDOException $e ) {
admin1/php/bdexplorer.php
@@ -15,7 +15,7 @@ include ("funcoesAdmin.php"); @@ -15,7 +15,7 @@ include ("funcoesAdmin.php");
15 // 15 //
16 include ($_SESSION ["locaplic"] . "/classesphp/carrega_ext.php"); 16 include ($_SESSION ["locaplic"] . "/classesphp/carrega_ext.php");
17 include ($_SESSION ["locaplic"] . "/classesphp/classe_bdexplorer.php"); 17 include ($_SESSION ["locaplic"] . "/classesphp/classe_bdexplorer.php");
18 -include ($_SESSION ["locaplic"] . "/classesphp/classe_metaestat.php"); 18 +include ($_SESSION ["locaplic"] . "/classesphp/classe_metaestatinfo.php");
19 /** 19 /**
20 * ************************************************************ 20 * ************************************************************
21 */ 21 */
@@ -48,7 +48,7 @@ switch ($funcao) { @@ -48,7 +48,7 @@ switch ($funcao) {
48 if (empty ( $_POST ["codigo_estat_conexao"] )) { 48 if (empty ( $_POST ["codigo_estat_conexao"] )) {
49 $parametros = $dbh; 49 $parametros = $dbh;
50 } else { 50 } else {
51 - $mt = new \i3geo\classesphp\metaestat\Metaestat (); 51 + $mt = new MetaestatInfo ();
52 $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false ); 52 $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false );
53 } 53 }
54 $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros ); 54 $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros );
@@ -74,7 +74,7 @@ switch ($funcao) { @@ -74,7 +74,7 @@ switch ($funcao) {
74 break; 74 break;
75 case "LISTARCOLUNAS" : 75 case "LISTARCOLUNAS" :
76 // pega os parametros de conexao 76 // pega os parametros de conexao
77 - $mt = new \i3geo\classesphp\metaestat\Metaestat (); 77 + $mt = new MetaestatInfo ();
78 $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false ); 78 $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false );
79 $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros ); 79 $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros );
80 $dados = $bd->listaDeColunas ( $_POST ["esquema"], $_POST ["tabela"] ); 80 $dados = $bd->listaDeColunas ( $_POST ["esquema"], $_POST ["tabela"] );
@@ -86,7 +86,7 @@ switch ($funcao) { @@ -86,7 +86,7 @@ switch ($funcao) {
86 break; 86 break;
87 case "LISTARCODIGOSCONEXAO" : 87 case "LISTARCODIGOSCONEXAO" :
88 // pega os parametros de conexao 88 // pega os parametros de conexao
89 - $mt = new \i3geo\classesphp\metaestat\Metaestat (); 89 + $mt = new MetaestatInfo ();
90 $dados = $mt->listaConexao ( "", false, false ); 90 $dados = $mt->listaConexao ( "", false, false );
91 if ($dados === false) { 91 if ($dados === false) {
92 header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); 92 header ( "HTTP/1.1 500 erro ao consultar banco de dados" );
css/i3geo7.css.php 100644 → 100755
js/i3geo_tudo_compacto7.js.php 100644 → 100755
ms_configura.php
@@ -132,7 +132,7 @@ $logTransacoes = false; @@ -132,7 +132,7 @@ $logTransacoes = false;
132 Tipo: 132 Tipo:
133 {array} 133 {array}
134 */ 134 */
135 -$i3geoEsquemasWL = array(); 135 +$i3geoEsquemasWL = array("public","i3geo_metaestat");
136 /* 136 /*
137 Variale: $i3geoUploadDataWL 137 Variale: $i3geoUploadDataWL
138 138
@@ -152,7 +152,7 @@ $i3geoEsquemasWL = array(); @@ -152,7 +152,7 @@ $i3geoEsquemasWL = array();
152 "Pasta 1"=>"/tmp/ms_tmp" 152 "Pasta 1"=>"/tmp/ms_tmp"
153 ), 153 ),
154 "postgis" => array( 154 "postgis" => array(
155 - "esquemas"=>array("esquema1","esquema2","publicy"), 155 + "esquemas"=>array("esquema1","i3geo_metaestat","public"),
156 "conexao"=>array("user"=> "postgres", "password"=>"postgres", "dbname"=>"i3geosaude", "host"=>"localhost", "port"=>"5432") 156 "conexao"=>array("user"=> "postgres", "password"=>"postgres", "dbname"=>"i3geosaude", "host"=>"localhost", "port"=>"5432")
157 ) 157 )
158 ); 158 );
@@ -160,7 +160,7 @@ $i3geoEsquemasWL = array(); @@ -160,7 +160,7 @@ $i3geoEsquemasWL = array();
160 Tipo: 160 Tipo:
161 {array} 161 {array}
162 */ 162 */
163 -$i3geoUploadDataWL = array(); 163 +$i3geoUploadDataWL = array("public","i3geo_metaestat");
164 164
165 //TODO documentar moodle 165 //TODO documentar moodle
166 /* 166 /*