Commit 01ce4a696ac704b5bd78b31b8787109c29d5affd
1 parent
5e6e4860
Exists in
master
Atualização das ferramentas
Showing
7 changed files
with
48 additions
and
53 deletions
Show diff stats
ferramentas/agrupaelementos/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -20,16 +20,13 @@ Salva o mapa acrescentando um novo layer com o resultado. |
20 | 20 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
21 | 21 | copiaSeguranca($map_file); |
22 | 22 | $m = new Analise($map_file,$tema); |
23 | - $retorno = $m->agrupaElementos($item,$locaplic); | |
23 | + $retorno = $m->agrupaElementos($_GET["item"],$locaplic); | |
24 | 24 | $m->salva(); |
25 | 25 | $_SESSION["contadorsalva"]++; |
26 | 26 | break; |
27 | 27 | } |
28 | -if (!connection_aborted()){ | |
29 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
28 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
30 | 29 | restauraCon($map_file,$postgis_mapa); |
31 | - cpjson($retorno); | |
32 | 30 | } |
33 | -else | |
34 | -{exit();} | |
31 | +cpjson($retorno); | |
35 | 32 | ?> |
36 | 33 | \ No newline at end of file | ... | ... |
ferramentas/buffer/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -19,23 +19,25 @@ Salva o mapa acrescentando um novo layer com o buffer. |
19 | 19 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
20 | 20 | copiaSeguranca($map_file); |
21 | 21 | $m = new Analise($map_file,$tema,$locaplic,$ext); |
22 | - if(empty($multiplicar)){ | |
23 | - $multiplicar = 1; | |
22 | + if(empty($_GET["multiplicar"])){ | |
23 | + $_GET["multiplicar"] = 1; | |
24 | 24 | } |
25 | - $retorno = $m->criaBuffer($distancia,$locaplic,$unir,$wkt,$multiplicar,$itemdistancia); | |
25 | + $retorno = $m->criaBuffer($_GET["distancia"],$locaplic,$_GET["unir"],$_GET["wkt"],$_GET["multiplicar"],$_GET["itemdistancia"]); | |
26 | 26 | $m->salva(); |
27 | 27 | //$_SESSION["contadorsalva"]++; |
28 | 28 | //limpa selecao |
29 | 29 | $qyfile = str_replace(".map",".qy",$map_file); |
30 | - if (file_exists($qyfile)) | |
31 | - {unlink ($qyfile);} | |
30 | + if (file_exists($qyfile)){ | |
31 | + unlink ($qyfile); | |
32 | + } | |
33 | + $qyfile = str_replace(".map","_qy.map",$map_file); | |
34 | + if (file_exists($qyfile)){ | |
35 | + unlink ($qyfile); | |
36 | + } | |
32 | 37 | break; |
33 | 38 | } |
34 | -if (!connection_aborted()){ | |
35 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
39 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
36 | 40 | restauraCon($map_file,$postgis_mapa); |
37 | - cpjson($retorno); | |
38 | 41 | } |
39 | -else | |
40 | -{exit();} | |
42 | +cpjson($retorno); | |
41 | 43 | ?> |
42 | 44 | \ No newline at end of file | ... | ... |
ferramentas/carregakml/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | $retorno = ""; //string que será retornada ao browser via JSON |
4 | +$url = $_GET["url"]; | |
4 | 5 | switch (strtoupper($funcao)) |
5 | 6 | { |
6 | 7 | case "CRIALAYER": |
... | ... | @@ -15,11 +16,12 @@ switch (strtoupper($funcao)) |
15 | 16 | $classe->set("name",""); |
16 | 17 | $novolayer->set("status",MS_DEFAULT); |
17 | 18 | $novolayer->set("template","none.htm"); |
18 | - $salvo = $mapa->save($map_file); | |
19 | + $salvo = $mapa->save(str_replace(".map","",$map_file).".map"); | |
19 | 20 | $retorno = "ok"; |
20 | 21 | break; |
21 | 22 | } |
22 | -if (!connection_aborted()){ | |
23 | - cpjson($retorno); | |
23 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
24 | + restauraCon($map_file,$postgis_mapa); | |
24 | 25 | } |
26 | +cpjson($retorno); | |
25 | 27 | ?> |
26 | 28 | \ No newline at end of file | ... | ... |
ferramentas/centroide/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -24,11 +24,8 @@ Salva o mapa acrescentando um novo layer com os pontos. |
24 | 24 | $_SESSION["contadorsalva"]++; |
25 | 25 | break; |
26 | 26 | } |
27 | -if (!connection_aborted()){ | |
28 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
27 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
29 | 28 | restauraCon($map_file,$postgis_mapa); |
30 | - cpjson($retorno); | |
31 | 29 | } |
32 | -else | |
33 | -{exit();} | |
30 | +cpjson($retorno); | |
34 | 31 | ?> |
35 | 32 | \ No newline at end of file | ... | ... |
ferramentas/comentarios/index.php
ferramentas/conectargeojson/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -17,20 +17,19 @@ Adiciona um tema baseado em uma URL GeoJson. |
17 | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); |
18 | 18 | copiaSeguranca($map_file); |
19 | 19 | $m = new Mapa($map_file); |
20 | - $retorno = $m->adicionaTemaGeoJson($servico,$dir_tmp,$locaplic); | |
21 | - if ($retorno != "erro") | |
22 | - {$m->salva();$_SESSION["contadorsalva"]++;redesenhaMapa();} | |
23 | - else | |
24 | - { | |
20 | + $retorno = $m->adicionaTemaGeoJson($_GET["servico"],$dir_tmp,$locaplic); | |
21 | + if ($retorno != "erro") { | |
22 | + $m->salva(); | |
23 | + $_SESSION["contadorsalva"]++; | |
24 | + redesenhaMapa(); | |
25 | + } | |
26 | + else{ | |
25 | 27 | $retorno = "erro."; |
26 | 28 | } |
27 | 29 | break; |
28 | 30 | } |
29 | -if (!connection_aborted()){ | |
30 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
31 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
31 | 32 | restauraCon($map_file,$postgis_mapa); |
32 | - cpjson($retorno); | |
33 | 33 | } |
34 | -else | |
35 | -{exit();} | |
34 | +cpjson($retorno); | |
36 | 35 | ?> |
37 | 36 | \ No newline at end of file | ... | ... |
ferramentas/graficointerativo1/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include_once(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -15,24 +15,21 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção |
15 | 15 | */ |
16 | 16 | case "GRAFICOSELECAO": |
17 | 17 | include(dirname(__FILE__)."/../../classesphp/graficos.php"); |
18 | - if(!isset($exclui)) | |
19 | - {$exclui = "";} | |
20 | - if(!isset($tipo)) | |
21 | - {$tipo = "nenhum";} | |
22 | - if(!isset($ordenax)) | |
23 | - {$ordenax = "nao";} | |
24 | - $itemvalores = explode(",",$itemvalores); | |
18 | + if(!isset($_GET["exclui"])) | |
19 | + {$_GET["exclui"] = "";} | |
20 | + if(!isset($_GET["tipo"])) | |
21 | + {$_GET["tipo"] = "nenhum";} | |
22 | + if(!isset($_GET["ordenax"])) | |
23 | + {$_GET["ordenax"] = "nao";} | |
24 | + $itemvalores = explode(",",$_GET["itemvalores"]); | |
25 | 25 | if(count($itemvalores) == 1){ |
26 | 26 | $itemvalores = $itemvalores[0]; |
27 | 27 | } |
28 | - $retorno = iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,false,$ext,true,$ordenax); | |
28 | + $retorno = iniciaDadosGrafico($map_file,$tema,$_GET["exclui"],$_GET["itemclasses"],$itemvalores,$_GET["tipo"],false,$ext,true,$_GET["ordenax"]); | |
29 | 29 | break; |
30 | 30 | } |
31 | -if (!connection_aborted()){ | |
32 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
31 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
33 | 32 | restauraCon($map_file,$postgis_mapa); |
34 | - cpjson($retorno); | |
35 | 33 | } |
36 | -else | |
37 | -{exit();} | |
34 | +cpjson($retorno); | |
38 | 35 | ?> |
39 | 36 | \ No newline at end of file | ... | ... |