Commit af322416f3a0eac2cda17fbee6976b703ec81ed6
1 parent
9963f681
Exists in
master
and in
7 other branches
Correção ao salvar e editar região geográfica
Showing
7 changed files
with
10 additions
and
10 deletions
Show diff stats
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 | 37 | $funcao = strtoupper ( $funcao ); |
| 38 | 38 | switch ($funcao) { |
| 39 | 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 | 41 | $dbhw = null; |
| 42 | 42 | $dbh = null; |
| 43 | 43 | if ($novo === false) { |
| ... | ... | @@ -45,7 +45,7 @@ switch ($funcao) { |
| 45 | 45 | } |
| 46 | 46 | break; |
| 47 | 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 | 49 | $dbhw = null; |
| 50 | 50 | $dbh = null; |
| 51 | 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 | 35 | "apelidos"=>'' |
| 36 | 36 | ); |
| 37 | 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 | 40 | return $retorna; |
| 41 | 41 | } catch ( PDOException $e ) { | ... | ... |
admin1/php/bdexplorer.php
| ... | ... | @@ -15,7 +15,7 @@ include ("funcoesAdmin.php"); |
| 15 | 15 | // |
| 16 | 16 | include ($_SESSION ["locaplic"] . "/classesphp/carrega_ext.php"); |
| 17 | 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 | 48 | if (empty ( $_POST ["codigo_estat_conexao"] )) { |
| 49 | 49 | $parametros = $dbh; |
| 50 | 50 | } else { |
| 51 | - $mt = new \i3geo\classesphp\metaestat\Metaestat (); | |
| 51 | + $mt = new MetaestatInfo (); | |
| 52 | 52 | $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false ); |
| 53 | 53 | } |
| 54 | 54 | $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros ); |
| ... | ... | @@ -74,7 +74,7 @@ switch ($funcao) { |
| 74 | 74 | break; |
| 75 | 75 | case "LISTARCOLUNAS" : |
| 76 | 76 | // pega os parametros de conexao |
| 77 | - $mt = new \i3geo\classesphp\metaestat\Metaestat (); | |
| 77 | + $mt = new MetaestatInfo (); | |
| 78 | 78 | $parametros = $mt->listaConexao ( ( int ) $_POST ["codigo_estat_conexao"], true, false ); |
| 79 | 79 | $bd = new \i3geo\classesphp\bdexplorer\Bdexplorer ( $_SESSION ["locaplic"], $parametros ); |
| 80 | 80 | $dados = $bd->listaDeColunas ( $_POST ["esquema"], $_POST ["tabela"] ); |
| ... | ... | @@ -86,7 +86,7 @@ switch ($funcao) { |
| 86 | 86 | break; |
| 87 | 87 | case "LISTARCODIGOSCONEXAO" : |
| 88 | 88 | // pega os parametros de conexao |
| 89 | - $mt = new \i3geo\classesphp\metaestat\Metaestat (); | |
| 89 | + $mt = new MetaestatInfo (); | |
| 90 | 90 | $dados = $mt->listaConexao ( "", false, false ); |
| 91 | 91 | if ($dados === false) { |
| 92 | 92 | header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | ... | ... |
ms_configura.php
| ... | ... | @@ -132,7 +132,7 @@ $logTransacoes = false; |
| 132 | 132 | Tipo: |
| 133 | 133 | {array} |
| 134 | 134 | */ |
| 135 | -$i3geoEsquemasWL = array(); | |
| 135 | +$i3geoEsquemasWL = array("public","i3geo_metaestat"); | |
| 136 | 136 | /* |
| 137 | 137 | Variale: $i3geoUploadDataWL |
| 138 | 138 | |
| ... | ... | @@ -152,7 +152,7 @@ $i3geoEsquemasWL = array(); |
| 152 | 152 | "Pasta 1"=>"/tmp/ms_tmp" |
| 153 | 153 | ), |
| 154 | 154 | "postgis" => array( |
| 155 | - "esquemas"=>array("esquema1","esquema2","publicy"), | |
| 155 | + "esquemas"=>array("esquema1","i3geo_metaestat","public"), | |
| 156 | 156 | "conexao"=>array("user"=> "postgres", "password"=>"postgres", "dbname"=>"i3geosaude", "host"=>"localhost", "port"=>"5432") |
| 157 | 157 | ) |
| 158 | 158 | ); |
| ... | ... | @@ -160,7 +160,7 @@ $i3geoEsquemasWL = array(); |
| 160 | 160 | Tipo: |
| 161 | 161 | {array} |
| 162 | 162 | */ |
| 163 | -$i3geoUploadDataWL = array(); | |
| 163 | +$i3geoUploadDataWL = array("public","i3geo_metaestat"); | |
| 164 | 164 | |
| 165 | 165 | //TODO documentar moodle |
| 166 | 166 | /* | ... | ... |