Commit 4e629496892b0bb9f3fe78a708950cfea6f1f449
1 parent
9e752d44
Exists in
master
and in
7 other branches
Correção no editor de mapfile para evitar perda de strings quando existirem sina…
…is não permitidos no mapfile (usados em expressões)
Showing
6 changed files
with
23 additions
and
32 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/catalogo/mapfile/editor/funcoes.php
... | ... | @@ -195,7 +195,7 @@ function salvaMapfile() |
195 | 195 | |
196 | 196 | $layer = $mapa->getlayerbyname($codigo); |
197 | 197 | if ($layer == "") { |
198 | - return "<br><span style='color:red;'>Atenção: não existe nenhum LAYER com NAME igual a " . $codigo . "</span><br>"; | |
198 | + return "<br><span style='color:red;'>Atenção: não existe nenhum LAYER com NAME igual a " . $codigo . "</span><br>"; | |
199 | 199 | } else { |
200 | 200 | // pega o metadata |
201 | 201 | $meta = $layer->getmetadata("permitedownload"); | ... | ... |
admin/catalogo/mapfile/editor/index.php
... | ... | @@ -3,6 +3,11 @@ |
3 | 3 | // TODO editor de cores |
4 | 4 | // |
5 | 5 | |
6 | +//nao tire daqui ou as expressoes podem ser sanitizadas | |
7 | +if (isset ( $_POST ["texto"] )) { | |
8 | + $gravarTexto = $_POST ["texto"]; | |
9 | + $_POST ["texto"] = ""; | |
10 | +} | |
6 | 11 | /****************************************************************/ |
7 | 12 | //include ("exec.php"); |
8 | 13 | // |
... | ... | @@ -14,7 +19,6 @@ |
14 | 19 | include ("../../../php/checaLogin.php"); |
15 | 20 | \admin\php\login\checaLogin(); |
16 | 21 | |
17 | - | |
18 | 22 | //$k = filter_var ( $k, FILTER_SANITIZE_STRING ); |
19 | 23 | |
20 | 24 | //funcoes de administracao |
... | ... | @@ -39,10 +43,6 @@ define ( "ONDEI3GEO", "../../../.." ); |
39 | 43 | include "../../../head.php"; |
40 | 44 | $codigo = filter_var ( $_GET ["codigo"], FILTER_SANITIZE_STRING ); |
41 | 45 | $id_tema = ( int ) $_GET ["id_tema"]; |
42 | -if (isset ( $_POST ["texto"] )) { | |
43 | - $gravarTexto = $_POST ["texto"]; | |
44 | - $_POST ["texto"] = ""; | |
45 | -} | |
46 | 46 | |
47 | 47 | if (\admin\php\funcoesAdmin\verificaOperacaoSessao ( "admin/html/editortexto" ) === false) { |
48 | 48 | header ( "HTTP/1.1 403 Vc nao pode realizar essa operacao" ); |
... | ... | @@ -50,6 +50,7 @@ if (\admin\php\funcoesAdmin\verificaOperacaoSessao ( "admin/html/editortexto" ) |
50 | 50 | } |
51 | 51 | $versao = \admin\php\funcoesAdmin\versao (); |
52 | 52 | $versao = $versao ["principal"]; |
53 | + | |
53 | 54 | \admin\catalogo\mapfile\editor\salvaMapfile (); |
54 | 55 | $textoMapfile = \admin\catalogo\mapfile\editor\textoMapfile ( $codigo ); |
55 | 56 | ?> | ... | ... |
ferramentas/salvamapfile/index.js
temas/_lbairros.map
1 | 1 | MAP |
2 | - FONTSET "/var/www/i3geo/symbols/fontes.txt" | |
3 | - SYMBOLSET "/var/www/i3geo/symbols/simbolosv6.sym" | |
2 | + FONTSET "/var/www/i3geo/symbols/fontes.txt" | |
3 | + SYMBOLSET "/var/www/i3geo/symbols/simbolosv6.sym" | |
4 | 4 | LAYER |
5 | - CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432" | |
5 | + CONNECTION "i3geosaude" | |
6 | 6 | CONNECTIONTYPE POSTGIS |
7 | 7 | DATA "the_geom from (select gid, st_setsrid(the_geom,4326) as the_geom,co_bairro,no_bairro,no_distr,no_municip from i3geo_metaestat.bairros ) as foo using unique co_bairro using srid=4326" |
8 | 8 | METADATA |
9 | - "cache" "sim" | |
10 | 9 | "TIP" "no_bairro,id" |
10 | + "cache" "sim" | |
11 | 11 | "CLASSE" "SIM" |
12 | 12 | "permitekmz" "SIM" |
13 | 13 | "ITENSDESC" "id,Código bairro,Nome,Distrito,Município" |
... | ... | @@ -18,11 +18,11 @@ MAP |
18 | 18 | "permitecomentario" "NAO" |
19 | 19 | "escondido" "NAO" |
20 | 20 | "download" "SIM" |
21 | - "CONEXAOORIGINAL" "i3geosaude" | |
22 | 21 | "ITENS" "gid,co_bairro,no_bairro,no_distr,no_municip" |
23 | - "permitekml" "SIM" | |
24 | - "permiteogc" "SIM" | |
22 | + "CONEXAOORIGINAL" "i3geosaude" | |
25 | 23 | "transitioneffect" "NAO" |
24 | + "permiteogc" "SIM" | |
25 | + "permitekml" "SIM" | |
26 | 26 | "TEMA" "_Bairros POSTGIS" |
27 | 27 | "identifica" "sim" |
28 | 28 | END # METADATA |
... | ... | @@ -35,13 +35,13 @@ MAP |
35 | 35 | TYPE POLYGON |
36 | 36 | UNITS METERS |
37 | 37 | CLASS |
38 | - NAME "" | |
38 | + NAME " " | |
39 | 39 | STYLE |
40 | - OUTLINECOLOR 255 100 0 | |
41 | - END # STYLE | |
42 | - TITLE "" | |
40 | + COLOR 255 0 0 | |
41 | + OUTLINECOLOR 255 255 255 | |
42 | + END | |
43 | 43 | END # CLASS |
44 | - END # LAYER | |
45 | 44 | |
45 | + END # LAYER | |
46 | 46 | END # MAP |
47 | 47 | ... | ... |
temas/_lbiomashp.map
1 | 1 | MAP |
2 | - FONTSET "../symbols/fontes.txt" | |
3 | - SYMBOLSET "../symbols/simbolosv6.sym" | |
2 | + FONTSET "../symbols/fontes.txt" | |
3 | + SYMBOLSET "../symbols/simbolosv6.sym" | |
4 | 4 | LAYER |
5 | 5 | COMPOSITE |
6 | 6 | OPACITY 50 |
... | ... | @@ -11,23 +11,15 @@ MAP |
11 | 11 | "TIP" "CD_LEGENDA" |
12 | 12 | "cache" "sim" |
13 | 13 | "CLASSE" "SIM" |
14 | - "olopacity" "" | |
15 | 14 | "animagif" "" |
16 | 15 | "permitekmz" "SIM" |
17 | - "gmopacity" "" | |
18 | - "gmstatus" "" | |
19 | 16 | "ITENSDESC" "Teste de acentuação" |
20 | 17 | "TILES" "SIM" |
21 | 18 | "ESCALA" "250000" |
22 | 19 | "editavel" "" |
23 | - "arquivotemaoriginal" "" | |
24 | 20 | "extensao" "-73.990940816816 -33.74827031115 -34.822855820777 5.272224303909" |
25 | - "nomeoriginal" "" | |
26 | - "olstatus" "" | |
27 | 21 | "permitedownload" "SIM" |
28 | - "FILTROORIGINAL" "" | |
29 | 22 | "permitecomentario" "NAO" |
30 | - "DATAORIGINAL" "" | |
31 | 23 | "escondido" "NAO" |
32 | 24 | "download" "SIM" |
33 | 25 | "esquematabelaeditavel" "" |
... | ... | @@ -58,7 +50,7 @@ MAP |
58 | 50 | NAME "CAATINGA" |
59 | 51 | EXPRESSION ('[CD_LEGENDA]'eq'CAATINGA') |
60 | 52 | STYLE |
61 | - COLOR 183 247 169 | |
53 | + COLOR 50 247 169 | |
62 | 54 | OUTLINECOLOR 255 255 255 |
63 | 55 | END # STYLE |
64 | 56 | TITLE "" |
... | ... | @@ -109,6 +101,4 @@ MAP |
109 | 101 | TITLE "" |
110 | 102 | END # CLASS |
111 | 103 | END # LAYER |
112 | - | |
113 | 104 | END # MAP |
114 | - | ... | ... |