Commit 5362a57b361a18e0cfcf229f250dd544696da7d6
1 parent
4f7154ed
Exists in
master
correção na geração dos arquivos de selecao
Showing
3 changed files
with
20 additions
and
18 deletions
Show diff stats
ferramentas/legenda/exec.php
1 | 1 | <?php |
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | |
2 | +include(dirname(__FILE__)."/../safe.php"); | |
3 | 3 | // |
4 | 4 | //faz a busca da função que deve ser executada |
5 | 5 | // |
... | ... | @@ -37,8 +37,8 @@ Adiciona LABEL em uma classe de um layer |
37 | 37 | {$retorno = "erro";} |
38 | 38 | else{ |
39 | 39 | //$l->set("labelitem",$item); |
40 | - $novac = $l->getclass($classe); | |
41 | - $m->adicionaLabel($novac,$wrap,$fonte,$tamanho,$angulo,$fundo,$sombra,$cor,$outlinecolor,$shadowcolor,$shadowsizex,$shadowsizey,$force,$mindistance,$minfeaturesize,$offsetx,$offsety,$partials,$position,"[".$item."]"); | |
40 | + $novac = $l->getclass($_GET["classe"]); | |
41 | + $m->adicionaLabel($novac,$_GET["wrap"],$_GET["fonte"],$_GET["tamanho"],$_GET["angulo"],$_GET["fundo"],$_GET["sombra"],$_GET["cor"],$_GET["outlinecolor"],$_GET["shadowcolor"],$_GET["shadowsizex"],$_GET["shadowsizey"],$_GET["force"],$_GET["mindistance"],$_GET["minfeaturesize"],$_GET["offsetx"],$_GET["offsety"],$_GET["partials"],$_GET["position"],"[".$_GET["item"]."]"); | |
42 | 42 | $m->salva(); |
43 | 43 | $retorno = "ok"; |
44 | 44 | } |
... | ... | @@ -51,7 +51,7 @@ Remove LABEL em uma classe de um layer |
51 | 51 | case "REMOVELABELCLASSE": |
52 | 52 | include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); |
53 | 53 | $m = new Temas($map_file,$tema); |
54 | - $m->removeLabel($classe); | |
54 | + $m->removeLabel($_GET["classe"]); | |
55 | 55 | $m->salva(); |
56 | 56 | $retorno = "ok"; |
57 | 57 | break; |
... | ... | @@ -93,7 +93,7 @@ Acrescenta a contagem de elementos em cada classe. |
93 | 93 | case "APLICATODASCLASSES": |
94 | 94 | include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php"); |
95 | 95 | $m = new Legenda($map_file,$locaplic,$tema); |
96 | - $r = $m->aplicaTodasClasses($parametro,$valor); | |
96 | + $r = $m->aplicaTodasClasses($_GET["parametro"],$_GET["valor"]); | |
97 | 97 | $m->salva(); |
98 | 98 | if (!$r){$r = "erro.Erro legenda nao disponivel";} |
99 | 99 | $retorno = $r; |
... | ... | @@ -105,7 +105,7 @@ Acrescenta a contagem de elementos em cada classe. |
105 | 105 | if($filter != ""){ |
106 | 106 | //$filter = base64decode($filter); |
107 | 107 | } |
108 | - $m->criaCluster($group,$filter,$maxdistance,$region,$buffer); | |
108 | + $m->criaCluster($_GET["group"],$_GET["filter"],$_GET["maxdistance"],$_GET["region"],$_GET["buffer"]); | |
109 | 109 | $m->salva(); |
110 | 110 | $retorno = "ok"; |
111 | 111 | break; |
... | ... | @@ -118,11 +118,8 @@ Acrescenta a contagem de elementos em cada classe. |
118 | 118 | $retorno = "ok"; |
119 | 119 | break; |
120 | 120 | } |
121 | -if (!connection_aborted()){ | |
122 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
121 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
123 | 122 | restauraCon($map_file,$postgis_mapa); |
124 | - cpjson($retorno); | |
125 | 123 | } |
126 | -else | |
127 | -{exit();} | |
124 | +cpjson($retorno); | |
128 | 125 | ?> |
129 | 126 | \ No newline at end of file | ... | ... |
ferramentas/safe.php
... | ... | @@ -22,6 +22,14 @@ if(!empty($_GET["g_sid"])){ |
22 | 22 | $contadorsalva = $_SESSION["contadorsalva"]; |
23 | 23 | $fingerprint = $_SESSION['fingerprint']; |
24 | 24 | } |
25 | +else{ | |
26 | + $g_sid = ""; | |
27 | +} | |
28 | +//variaveis mais utilizadas | |
29 | +$tema = $_GET["tema"]; | |
30 | +$ext = $_GET["ext"]; | |
31 | +$funcao = $_GET["funcao"]; | |
32 | + | |
25 | 33 | include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); |
26 | 34 | if(isset($fingerprint) && !empty($g_sid)) { |
27 | 35 | $f = explode(",",$fingerprint); | ... | ... |
ferramentas/tabela/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 | // |
... | ... | @@ -16,7 +16,7 @@ Inclu&iacute; elementos em uma sele&ccedil;&atilde;o. |
16 | 16 | case "INCLUISEL": |
17 | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_selecao.php"); |
18 | 18 | $m = new Selecao($map_file,$tema); |
19 | - $retorno = $m->incluiSel($ids); | |
19 | + $retorno = $m->incluiSel($_GET["ids"]); | |
20 | 20 | // |
21 | 21 | //é necessário obter os parâmetros do mapa para remontar a árvore de camadas |
22 | 22 | // |
... | ... | @@ -137,11 +137,8 @@ Faz a fus&atilde;o da imagem de um gr&aacute;fico com a imagem do mapa atual. |
137 | 137 | $retorno = $imagem; |
138 | 138 | break; |
139 | 139 | } |
140 | -if (!connection_aborted()){ | |
141 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | |
140 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
142 | 141 | restauraCon($map_file,$postgis_mapa); |
143 | - cpjson($retorno); | |
144 | 142 | } |
145 | -else | |
146 | -{exit();} | |
143 | +cpjson($retorno); | |
147 | 144 | ?> |
148 | 145 | \ No newline at end of file | ... | ... |