Commit 074c7ca1fe8a724a7eb6c3764278438de0d94a4f
1 parent
815bde4f
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
24 additions
and
21 deletions
Show diff stats
classesjs/classe_arvoredetemas.js
| @@ -1481,7 +1481,7 @@ i3GEO.arvoreDeTemas = { | @@ -1481,7 +1481,7 @@ i3GEO.arvoreDeTemas = { | ||
| 1481 | return " onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "; | 1481 | return " onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "; |
| 1482 | }; | 1482 | }; |
| 1483 | if(OPCOESADICIONAIS.refresh === true){ | 1483 | if(OPCOESADICIONAIS.refresh === true){ |
| 1484 | - ins += "<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>"; | 1484 | + ins += "<td><img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>"; |
| 1485 | t += 20; | 1485 | t += 20; |
| 1486 | } | 1486 | } |
| 1487 | if(OPCOESADICIONAIS.uploadarquivo === true){ | 1487 | if(OPCOESADICIONAIS.uploadarquivo === true){ |
classesphp/funcoes_gerais.php
| @@ -1355,21 +1355,26 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1355,21 +1355,26 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1355 | $versao = versao(); | 1355 | $versao = versao(); |
| 1356 | $versao = $versao["principal"]; | 1356 | $versao = $versao["principal"]; |
| 1357 | //para manipular dbf | 1357 | //para manipular dbf |
| 1358 | - if(file_exists($locaplic."/pacotes/phpxbase/api_conversion.php")) | ||
| 1359 | - include_once($locaplic."/pacotes/phpxbase/api_conversion.php"); | ||
| 1360 | - else | ||
| 1361 | - include_once "../pacotes/phpxbase/api_conversion.php"; | 1358 | + if(file_exists($locaplic."/pacotes/phpxbase/api_conversion.php")){ |
| 1359 | + include_once($locaplic."/pacotes/phpxbase/api_conversion.php"); | ||
| 1360 | + } | ||
| 1361 | + else{ | ||
| 1362 | + include_once "../pacotes/phpxbase/api_conversion.php"; | ||
| 1363 | + } | ||
| 1362 | $map = @ms_newMapObj($map_file); | 1364 | $map = @ms_newMapObj($map_file); |
| 1363 | $layer = $map->getlayerbyname($tema); | 1365 | $layer = $map->getlayerbyname($tema); |
| 1364 | $layer->set("template","none.htm"); | 1366 | $layer->set("template","none.htm"); |
| 1365 | $diretorio = dirname($dir_tmp); | 1367 | $diretorio = dirname($dir_tmp); |
| 1366 | $tipol = MS_SHP_POINT; | 1368 | $tipol = MS_SHP_POINT; |
| 1367 | - if ($layer->type == MS_LAYER_LINE){$tipol = MS_SHP_ARC;} | ||
| 1368 | - if ($layer->type == MS_LAYER_POLYGON){$tipol = MS_SHP_POLYGON;} | 1369 | + if ($layer->type == MS_LAYER_LINE) |
| 1370 | + {$tipol = MS_SHP_ARC;} | ||
| 1371 | + if ($layer->type == MS_LAYER_POLYGON) | ||
| 1372 | + {$tipol = MS_SHP_POLYGON;} | ||
| 1369 | if ($nomeRand == true) | 1373 | if ($nomeRand == true) |
| 1370 | {$novonomelayer = $tema."_".nomeRandomico(5);} | 1374 | {$novonomelayer = $tema."_".nomeRandomico(5);} |
| 1371 | else | 1375 | else |
| 1372 | {$novonomelayer = $tema;} | 1376 | {$novonomelayer = $tema;} |
| 1377 | + $novonomelayer = str_replace(".","-",$novonomelayer); | ||
| 1373 | $nomeshp = $dir_tmp."/".$novonomelayer; | 1378 | $nomeshp = $dir_tmp."/".$novonomelayer; |
| 1374 | if(file_exists($nomeshp.".shp")) | 1379 | if(file_exists($nomeshp.".shp")) |
| 1375 | {return $nomeshp;} | 1380 | {return $nomeshp;} |
| @@ -1377,8 +1382,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1377,8 +1382,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1377 | //se for do tipo features | 1382 | //se for do tipo features |
| 1378 | $data = $layer->data; | 1383 | $data = $layer->data; |
| 1379 | $resultadoFinal = true; | 1384 | $resultadoFinal = true; |
| 1380 | - if ($data == "") | ||
| 1381 | - { | 1385 | + if($data == ""){ |
| 1382 | $def[] = array("ID","C","50"); | 1386 | $def[] = array("ID","C","50"); |
| 1383 | $reg[] = 0; | 1387 | $reg[] = 0; |
| 1384 | if(!function_exists("dbase_create")){ | 1388 | if(!function_exists("dbase_create")){ |
| @@ -1403,14 +1407,12 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1403,14 +1407,12 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1403 | $novoshpf->addShape($shape); | 1407 | $novoshpf->addShape($shape); |
| 1404 | $resultadoFinal = true; | 1408 | $resultadoFinal = true; |
| 1405 | } | 1409 | } |
| 1406 | - else | ||
| 1407 | - { | 1410 | + else{ |
| 1408 | $items = pegaItens($layer); | 1411 | $items = pegaItens($layer); |
| 1409 | // cria o dbf | 1412 | // cria o dbf |
| 1410 | $def = array(); | 1413 | $def = array(); |
| 1411 | $cni = 0; | 1414 | $cni = 0; |
| 1412 | - foreach ($items as $ni) | ||
| 1413 | - { | 1415 | + foreach ($items as $ni){ |
| 1414 | $temp = strtoupper($ni); | 1416 | $temp = strtoupper($ni); |
| 1415 | $temp = substr($temp,0,8).$cni; | 1417 | $temp = substr($temp,0,8).$cni; |
| 1416 | // | 1418 | // |
| @@ -1419,6 +1421,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1419,6 +1421,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1419 | $def[] = array($temp,"C","254"); | 1421 | $def[] = array($temp,"C","254"); |
| 1420 | $cni = $cni + 1; | 1422 | $cni = $cni + 1; |
| 1421 | } | 1423 | } |
| 1424 | + | ||
| 1422 | if(!function_exists("dbase_create")) | 1425 | if(!function_exists("dbase_create")) |
| 1423 | {$db = xbase_create($nomeshp.".dbf", $def);} | 1426 | {$db = xbase_create($nomeshp.".dbf", $def);} |
| 1424 | else | 1427 | else |
| @@ -1432,8 +1435,8 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1432,8 +1435,8 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1432 | {@$layer->queryByrect($map->extent);} | 1435 | {@$layer->queryByrect($map->extent);} |
| 1433 | //pega cada registro | 1436 | //pega cada registro |
| 1434 | $res_count = $layer->getNumresults(); | 1437 | $res_count = $layer->getNumresults(); |
| 1435 | - if ($res_count > 0) | ||
| 1436 | - { | 1438 | + //echo $res_count;exit; |
| 1439 | + if ($res_count > 0){ | ||
| 1437 | $sopen = $layer->open(); | 1440 | $sopen = $layer->open(); |
| 1438 | if($sopen == MS_FAILURE){return "erro";} | 1441 | if($sopen == MS_FAILURE){return "erro";} |
| 1439 | for ($i = 0; $i < $res_count; ++$i) | 1442 | for ($i = 0; $i < $res_count; ++$i) |
ferramentas/upload/index.js
| @@ -105,9 +105,9 @@ i3GEOF.upload = { | @@ -105,9 +105,9 @@ i3GEOF.upload = { | ||
| 105 | */ | 105 | */ |
| 106 | html:function(){ | 106 | html:function(){ |
| 107 | var ins = '<form id=i3GEOuploadf target="i3GEOuploadiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/upload/upload.php" method="post" ENCTYPE="multipart/form-data">' + | 107 | var ins = '<form id=i3GEOuploadf target="i3GEOuploadiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/upload/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
| 108 | - '<p class="paragrafo" >shp: <br><input class=digitar type="file" size=42 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | ||
| 109 | - '<p class="paragrafo" >shx: <br><input class=digitar type="file" size=42 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | ||
| 110 | - '<p class="paragrafo" >dbf: <br><input class=digitar type="file" size=42 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>'; | 108 | + '<p class="paragrafo" >shp: <br><input class=digitar type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 109 | + '<p class="paragrafo" >shx: <br><input class=digitar type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | ||
| 110 | + '<p class="paragrafo" >dbf: <br><input class=digitar type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>'; | ||
| 111 | if(i3GEO.parametros.editor === "sim") | 111 | if(i3GEO.parametros.editor === "sim") |
| 112 | {ins += '<p class="paragrafo" >pasta no servidor onde os dados<br>serão armazenados (opcional):<br><input class=digitar type="text" size=45 name="dirDestino" style="top:0px;left:0px;cursor:pointer;"></p>';} | 112 | {ins += '<p class="paragrafo" >pasta no servidor onde os dados<br>serão armazenados (opcional):<br><input class=digitar type="text" size=45 name="dirDestino" style="top:0px;left:0px;cursor:pointer;"></p>';} |
| 113 | ins += '<p class="paragrafo" >Tipo de geometria: ' + | 113 | ins += '<p class="paragrafo" >Tipo de geometria: ' + |
ferramentas/uploaddbf/index.js
| @@ -115,7 +115,7 @@ i3GEOF.uploaddbf = { | @@ -115,7 +115,7 @@ i3GEOF.uploaddbf = { | ||
| 115 | '<p class="paragrafo" >nome da coluna x: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomex" style="top:0px;left:0px"></p>' + | 115 | '<p class="paragrafo" >nome da coluna x: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomex" style="top:0px;left:0px"></p>' + |
| 116 | '<p class="paragrafo" >nome da coluna y: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomey" style="top:0px;left:0px"></p>' + | 116 | '<p class="paragrafo" >nome da coluna y: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomey" style="top:0px;left:0px"></p>' + |
| 117 | 117 | ||
| 118 | - '<p class="paragrafo" >arquivo: <br><input class=digitar type="file" size=32 name="i3GEOuploaddbffile" style="top:0px;left:0px;cursor:pointer;"></p>' + | 118 | + '<p class="paragrafo" >arquivo: <br><input class=digitar type="file" size=22 name="i3GEOuploaddbffile" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 119 | '<p class=paragrafo >Projeção:</p>' + | 119 | '<p class=paragrafo >Projeção:</p>' + |
| 120 | '<div id=i3GEOuploaddbfListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + | 120 | '<div id=i3GEOuploaddbfListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + |
| 121 | '<br><p class="paragrafo" ><input id=i3GEOuploaddbfbotao1 type="button" value="Criar camada" size=12 name="submit">' + | 121 | '<br><p class="paragrafo" ><input id=i3GEOuploaddbfbotao1 type="button" value="Criar camada" size=12 name="submit">' + |
ferramentas/uploadgpx/index.js
| @@ -111,7 +111,7 @@ i3GEOF.uploadgpx = { | @@ -111,7 +111,7 @@ i3GEOF.uploadgpx = { | ||
| 111 | */ | 111 | */ |
| 112 | html:function(){ | 112 | html:function(){ |
| 113 | var ins = '<form id=i3GEOuploadgpxf target="i3GEOuploadgpxiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadgpx/upload.php" method="post" ENCTYPE="multipart/form-data">' + | 113 | var ins = '<form id=i3GEOuploadgpxf target="i3GEOuploadgpxiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadgpx/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
| 114 | - '<p class="paragrafo" >Arquivo gpx: <br><input class=digitar type="file" size=32 name="i3GEOuploadgpx" style="top:0px;left:0px;cursor:pointer;"></p>' + | 114 | + '<p class="paragrafo" >Arquivo gpx: <br><input class=digitar type="file" size=22 name="i3GEOuploadgpx" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 115 | '<p class=paragrafo >Projeção:</p>' + | 115 | '<p class=paragrafo >Projeção:</p>' + |
| 116 | '<div id=i3GEOuploadgpxListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + | 116 | '<div id=i3GEOuploadgpxListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + |
| 117 | '<br><p class="paragrafo" ><input id=i3GEOuploadgpxbotao1 type="button" value="Criar camada" size=12 name="submit">' + | 117 | '<br><p class="paragrafo" ><input id=i3GEOuploadgpxbotao1 type="button" value="Criar camada" size=12 name="submit">' + |
ferramentas/uploadkml/index.js
| @@ -112,7 +112,7 @@ i3GEOF.uploadkml = { | @@ -112,7 +112,7 @@ i3GEOF.uploadkml = { | ||
| 112 | html:function(){ | 112 | html:function(){ |
| 113 | var ins = '<form id=i3GEOuploadkmlf target="i3GEOuploadkmliframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadkml/upload.php" method="post" ENCTYPE="multipart/form-data">' + | 113 | var ins = '<form id=i3GEOuploadkmlf target="i3GEOuploadkmliframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadkml/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
| 114 | '<p class="paragrafo" style=color:red >Não use arquivos ou nome de layer com espaços em branco ou acentuação</p>' + | 114 | '<p class="paragrafo" style=color:red >Não use arquivos ou nome de layer com espaços em branco ou acentuação</p>' + |
| 115 | - '<p class="paragrafo" >Arquivo kml: <br><input class=digitar type="file" size=32 name="i3GEOuploadkml" style="top:0px;left:0px;cursor:pointer;"></p>' + | 115 | + '<p class="paragrafo" >Arquivo kml: <br><input class=digitar type="file" size=22 name="i3GEOuploadkml" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 116 | '<p class=paragrafo >Nome do layer KML: <br><input type=text size=42 name=layerkml value=""/></p>' + | 116 | '<p class=paragrafo >Nome do layer KML: <br><input type=text size=42 name=layerkml value=""/></p>' + |
| 117 | '<p class=paragrafo >Projeção:</p>' + | 117 | '<p class=paragrafo >Projeção:</p>' + |
| 118 | '<div id=i3GEOuploadkmlListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + | 118 | '<div id=i3GEOuploadkmlListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + |