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 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | // | 3 | // |
4 | //faz a busca da função que deve ser executada | 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,16 +20,13 @@ Salva o mapa acrescentando um novo layer com o resultado. | ||
20 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); | 20 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
21 | copiaSeguranca($map_file); | 21 | copiaSeguranca($map_file); |
22 | $m = new Analise($map_file,$tema); | 22 | $m = new Analise($map_file,$tema); |
23 | - $retorno = $m->agrupaElementos($item,$locaplic); | 23 | + $retorno = $m->agrupaElementos($_GET["item"],$locaplic); |
24 | $m->salva(); | 24 | $m->salva(); |
25 | $_SESSION["contadorsalva"]++; | 25 | $_SESSION["contadorsalva"]++; |
26 | break; | 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 | restauraCon($map_file,$postgis_mapa); | 29 | restauraCon($map_file,$postgis_mapa); |
31 | - cpjson($retorno); | ||
32 | } | 30 | } |
33 | -else | ||
34 | -{exit();} | 31 | +cpjson($retorno); |
35 | ?> | 32 | ?> |
36 | \ No newline at end of file | 33 | \ No newline at end of file |
ferramentas/buffer/exec.php
1 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | // | 3 | // |
4 | //faz a busca da função que deve ser executada | 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,23 +19,25 @@ Salva o mapa acrescentando um novo layer com o buffer. | ||
19 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); | 19 | include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); |
20 | copiaSeguranca($map_file); | 20 | copiaSeguranca($map_file); |
21 | $m = new Analise($map_file,$tema,$locaplic,$ext); | 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 | $m->salva(); | 26 | $m->salva(); |
27 | //$_SESSION["contadorsalva"]++; | 27 | //$_SESSION["contadorsalva"]++; |
28 | //limpa selecao | 28 | //limpa selecao |
29 | $qyfile = str_replace(".map",".qy",$map_file); | 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 | break; | 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 | restauraCon($map_file,$postgis_mapa); | 40 | restauraCon($map_file,$postgis_mapa); |
37 | - cpjson($retorno); | ||
38 | } | 41 | } |
39 | -else | ||
40 | -{exit();} | 42 | +cpjson($retorno); |
41 | ?> | 43 | ?> |
42 | \ No newline at end of file | 44 | \ No newline at end of file |
ferramentas/carregakml/exec.php
1 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | $retorno = ""; //string que será retornada ao browser via JSON | 3 | $retorno = ""; //string que será retornada ao browser via JSON |
4 | +$url = $_GET["url"]; | ||
4 | switch (strtoupper($funcao)) | 5 | switch (strtoupper($funcao)) |
5 | { | 6 | { |
6 | case "CRIALAYER": | 7 | case "CRIALAYER": |
@@ -15,11 +16,12 @@ switch (strtoupper($funcao)) | @@ -15,11 +16,12 @@ switch (strtoupper($funcao)) | ||
15 | $classe->set("name",""); | 16 | $classe->set("name",""); |
16 | $novolayer->set("status",MS_DEFAULT); | 17 | $novolayer->set("status",MS_DEFAULT); |
17 | $novolayer->set("template","none.htm"); | 18 | $novolayer->set("template","none.htm"); |
18 | - $salvo = $mapa->save($map_file); | 19 | + $salvo = $mapa->save(str_replace(".map","",$map_file).".map"); |
19 | $retorno = "ok"; | 20 | $retorno = "ok"; |
20 | break; | 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 | \ No newline at end of file | 28 | \ No newline at end of file |
ferramentas/centroide/exec.php
1 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | // | 3 | // |
4 | //faz a busca da função que deve ser executada | 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,11 +24,8 @@ Salva o mapa acrescentando um novo layer com os pontos. | ||
24 | $_SESSION["contadorsalva"]++; | 24 | $_SESSION["contadorsalva"]++; |
25 | break; | 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 | restauraCon($map_file,$postgis_mapa); | 28 | restauraCon($map_file,$postgis_mapa); |
30 | - cpjson($retorno); | ||
31 | } | 29 | } |
32 | -else | ||
33 | -{exit();} | 30 | +cpjson($retorno); |
34 | ?> | 31 | ?> |
35 | \ No newline at end of file | 32 | \ No newline at end of file |
ferramentas/comentarios/index.php
@@ -14,6 +14,7 @@ g_sid | @@ -14,6 +14,7 @@ g_sid | ||
14 | 14 | ||
15 | tema - tema que será comentado | 15 | tema - tema que será comentado |
16 | */ | 16 | */ |
17 | +include (dirname(__FILE__)."/../../classesphp/sani_request.php"); | ||
17 | $parametrosURL = array_merge($_GET,$_POST); | 18 | $parametrosURL = array_merge($_GET,$_POST); |
18 | 19 | ||
19 | session_name("openid"); | 20 | session_name("openid"); |
ferramentas/conectargeojson/exec.php
1 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | // | 3 | // |
4 | //faz a busca da função que deve ser executada | 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,20 +17,19 @@ Adiciona um tema baseado em uma URL GeoJson. | ||
17 | include_once(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); |
18 | copiaSeguranca($map_file); | 18 | copiaSeguranca($map_file); |
19 | $m = new Mapa($map_file); | 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 | $retorno = "erro."; | 27 | $retorno = "erro."; |
26 | } | 28 | } |
27 | break; | 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 | restauraCon($map_file,$postgis_mapa); | 32 | restauraCon($map_file,$postgis_mapa); |
32 | - cpjson($retorno); | ||
33 | } | 33 | } |
34 | -else | ||
35 | -{exit();} | 34 | +cpjson($retorno); |
36 | ?> | 35 | ?> |
37 | \ No newline at end of file | 36 | \ No newline at end of file |
ferramentas/graficointerativo1/exec.php
1 | <?php | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | 2 | +include_once(dirname(__FILE__)."/../safe.php"); |
3 | // | 3 | // |
4 | //faz a busca da função que deve ser executada | 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,24 +15,21 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção | ||
15 | */ | 15 | */ |
16 | case "GRAFICOSELECAO": | 16 | case "GRAFICOSELECAO": |
17 | include(dirname(__FILE__)."/../../classesphp/graficos.php"); | 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 | if(count($itemvalores) == 1){ | 25 | if(count($itemvalores) == 1){ |
26 | $itemvalores = $itemvalores[0]; | 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 | break; | 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 | restauraCon($map_file,$postgis_mapa); | 32 | restauraCon($map_file,$postgis_mapa); |
34 | - cpjson($retorno); | ||
35 | } | 33 | } |
36 | -else | ||
37 | -{exit();} | 34 | +cpjson($retorno); |
38 | ?> | 35 | ?> |
39 | \ No newline at end of file | 36 | \ No newline at end of file |