Commit c63ce0d73eb1c14e004a3b1701148d8b17c23479
1 parent
30819805
Exists in
master
and in
7 other branches
--no commit message
Showing
7 changed files
with
22 additions
and
10 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/html/ogcws.html
| @@ -29,6 +29,8 @@ | @@ -29,6 +29,8 @@ | ||
| 29 | <div class="ft"></div> | 29 | <div class="ft"></div> |
| 30 | </div> | 30 | </div> |
| 31 | </div> | 31 | </div> |
| 32 | +<p>Parâmetros obtidos do mapfile:</p> | ||
| 33 | +<b><div id=mapfile style=color:navy ></div></b><br> | ||
| 32 | <br> | 34 | <br> |
| 33 | <div id="tabela" style="left:-5px;"></div> | 35 | <div id="tabela" style="left:-5px;"></div> |
| 34 | <script> | 36 | <script> |
admin/index.html
| @@ -202,7 +202,7 @@ essa cria&ccedil;&atilde;o podem ser obtidos no item "Outras op&ccedil;ões".</p> | @@ -202,7 +202,7 @@ essa cria&ccedil;&atilde;o podem ser obtidos no item "Outras op&ccedil;ões".</p> | ||
| 202 | <table class=lista1 > | 202 | <table class=lista1 > |
| 203 | <tr onclick="abre('html/incluimap.html')"><td><div class=aplicar ></div></td><td>Ajusta mapfiles</td></tr> | 203 | <tr onclick="abre('html/incluimap.html')"><td><div class=aplicar ></div></td><td>Ajusta mapfiles</td></tr> |
| 204 | <tr onclick="abre('php/estatisticas.php')"><td><div class=aplicar ></div></td><td>Estatísticas</td></tr> | 204 | <tr onclick="abre('php/estatisticas.php')"><td><div class=aplicar ></div></td><td>Estatísticas</td></tr> |
| 205 | -<tr onclick="abre('php/upgradebanco44_45.php')"><td><div class=aplicar ></div></td><td>Adiciona as tabelas necessárias à versão 4.5 do i3Geo e que não existiam nas vesões anteriores</td></tr> | 205 | +<tr onclick="abre('php/upgradebanco44_45.php')"><td><div class=aplicar ></div></td><td>Adiciona as tabelas e colunas necessárias à versão atual do i3Geo e que não existiam nas versões anteriores</td></tr> |
| 206 | 206 | ||
| 207 | <tr onclick="abre('php/sqlite.php')"><td><div class=aplicar ></div></td><td>Descrição do banco padrão (SQLITE)</td></tr> | 207 | <tr onclick="abre('php/sqlite.php')"><td><div class=aplicar ></div></td><td>Descrição do banco padrão (SQLITE)</td></tr> |
| 208 | <tr onclick="abre('php/criabanco.php')"><td><div class=aplicar ></div></td><td>Criar banco de dados</td></tr> | 208 | <tr onclick="abre('php/criabanco.php')"><td><div class=aplicar ></div></td><td>Criar banco de dados</td></tr> |
admin/js/ogcws.js
| @@ -124,6 +124,7 @@ function initMenu() | @@ -124,6 +124,7 @@ function initMenu() | ||
| 124 | } | 124 | } |
| 125 | function pegaParametros(retorno) | 125 | function pegaParametros(retorno) |
| 126 | { | 126 | { |
| 127 | + $i("mapfile").innerHTML = retorno.mapfile; | ||
| 127 | var ins = "" | 128 | var ins = "" |
| 128 | for (i=0;i<$parametros.simples.length;i++) | 129 | for (i=0;i<$parametros.simples.length;i++) |
| 129 | { | 130 | { |
admin/php/incluiMAP.php
| @@ -56,6 +56,7 @@ if (is_dir($locaplic."/temas")) | @@ -56,6 +56,7 @@ if (is_dir($locaplic."/temas")) | ||
| 56 | echo "Arquivos convertidos: <br>"; | 56 | echo "Arquivos convertidos: <br>"; |
| 57 | foreach($arquivos as $arquivo) | 57 | foreach($arquivos as $arquivo) |
| 58 | { | 58 | { |
| 59 | + $mapExiste = false; | ||
| 59 | $arq = $locaplic."/temas/".$arquivo; | 60 | $arq = $locaplic."/temas/".$arquivo; |
| 60 | $abre = fopen($arq, "r"); | 61 | $abre = fopen($arq, "r"); |
| 61 | $maparray = array(); | 62 | $maparray = array(); |
| @@ -69,19 +70,26 @@ foreach($arquivos as $arquivo) | @@ -69,19 +70,26 @@ foreach($arquivos as $arquivo) | ||
| 69 | { | 70 | { |
| 70 | $maparray[] = $buffer; | 71 | $maparray[] = $buffer; |
| 71 | } | 72 | } |
| 73 | + else | ||
| 74 | + {$mapExiste = true;} | ||
| 72 | } | 75 | } |
| 73 | fclose($abre); | 76 | fclose($abre); |
| 74 | //echo "<pre>"; | 77 | //echo "<pre>"; |
| 75 | //var_dump($maparray); | 78 | //var_dump($maparray); |
| 76 | //exit; | 79 | //exit; |
| 77 | - $abre = fopen($arq, "wt"); | ||
| 78 | - foreach($maparray as $linha) | ||
| 79 | - { | ||
| 80 | - fwrite ($abre,$linha); | ||
| 81 | - fwrite ($abre,"\n"); | 80 | + if($mapExiste == true){ |
| 81 | + echo "MAP já existe em ".$arquivo."<br>"; | ||
| 82 | + } | ||
| 83 | + else{ | ||
| 84 | + $abre = fopen($arq, "wt"); | ||
| 85 | + foreach($maparray as $linha) | ||
| 86 | + { | ||
| 87 | + fwrite ($abre,$linha); | ||
| 88 | + fwrite ($abre,"\n"); | ||
| 89 | + } | ||
| 90 | + $fecha = fclose ($abre); | ||
| 91 | + echo $arquivo."<br>"; | ||
| 82 | } | 92 | } |
| 83 | - $fecha = fclose ($abre); | ||
| 84 | - echo $arquivo."<br>"; | ||
| 85 | } | 93 | } |
| 86 | 94 | ||
| 87 | ?> | 95 | ?> |
| 88 | \ No newline at end of file | 96 | \ No newline at end of file |
admin/php/ogcws.php
| @@ -86,6 +86,7 @@ switch (strtoupper($funcao)) | @@ -86,6 +86,7 @@ switch (strtoupper($funcao)) | ||
| 86 | { | 86 | { |
| 87 | $par[$v] = utf8_encode($web->metadata->get($v)); | 87 | $par[$v] = utf8_encode($web->metadata->get($v)); |
| 88 | } | 88 | } |
| 89 | + $par["mapfile"] = $map_file; | ||
| 89 | retornaJSON($par); | 90 | retornaJSON($par); |
| 90 | exit; | 91 | exit; |
| 91 | break; | 92 | break; |
ferramentas/planosmanejoflorestal/pesquisa.htm
| @@ -95,7 +95,7 @@ Planos de manejo florestal cadastrados no IBAMA. <a href="http://www.mma.gov.br/ | @@ -95,7 +95,7 @@ Planos de manejo florestal cadastrados no IBAMA. <a href="http://www.mma.gov.br/ | ||
| 95 | </form> | 95 | </form> |
| 96 | <DIV id=ResultadoPesquisa></DIV> | 96 | <DIV id=ResultadoPesquisa></DIV> |
| 97 | <script type="text/javascript" > | 97 | <script type="text/javascript" > |
| 98 | -g_sid = window.parent.g_sid | 98 | +g_sid = window.parent.i3GEO.configura.sid |
| 99 | function executa() | 99 | function executa() |
| 100 | { | 100 | { |
| 101 | parametros = "&uf="+document.frmPlanoDeManejo.cboEstado[document.frmPlanoDeManejo.cboEstado.selectedIndex].value; | 101 | parametros = "&uf="+document.frmPlanoDeManejo.cboEstado[document.frmPlanoDeManejo.cboEstado.selectedIndex].value; |
| @@ -117,7 +117,7 @@ function listaretornof(retorno) | @@ -117,7 +117,7 @@ function listaretornof(retorno) | ||
| 117 | if (retorno.data != "erro") | 117 | if (retorno.data != "erro") |
| 118 | { | 118 | { |
| 119 | document.getElementById("ResultadoPesquisa").innerHTML = "<b>Mapa criado!" | 119 | document.getElementById("ResultadoPesquisa").innerHTML = "<b>Mapa criado!" |
| 120 | - window.parent.remapaf() | 120 | + window.parent.i3GEO.atualiza(); |
| 121 | } | 121 | } |
| 122 | else | 122 | else |
| 123 | {document.getElementById("ResultadoPesquisa").innerHTML = "<b>Erro. O mapa não pode ser criado!"} | 123 | {document.getElementById("ResultadoPesquisa").innerHTML = "<b>Erro. O mapa não pode ser criado!"} |