Commit 31aa180751c9f157941c0dcdd8d804d5d407db51
1 parent
74fce19f
Exists in
master
Inclusão de variavel em ms_configura.php para definicao de parametros de projecao
Showing
41 changed files
with
789 additions
and
235 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/dicionario/core.js
... | ... | @@ -306,6 +306,76 @@ i3GEOadmin.core.dicionario = { |
306 | 306 | en : "", |
307 | 307 | es : "" |
308 | 308 | } ], |
309 | + 'salva2' : [ { | |
310 | + pt : "salvar", | |
311 | + en : "", | |
312 | + es : "" | |
313 | + } ], | |
314 | + 'nome2' : [ { | |
315 | + pt : "Nome:", | |
316 | + en : "", | |
317 | + es : "" | |
318 | + } ], | |
319 | + 'sim2' : [ { | |
320 | + pt : "Sim", | |
321 | + en : "", | |
322 | + es : "" | |
323 | + } ], | |
324 | + 'nao2' : [ { | |
325 | + pt : "Não", | |
326 | + en : "", | |
327 | + es : "" | |
328 | + } ], | |
329 | + '' : [ { | |
330 | + pt : "", | |
331 | + en : "", | |
332 | + es : "" | |
333 | + } ], | |
334 | + '' : [ { | |
335 | + pt : "", | |
336 | + en : "", | |
337 | + es : "" | |
338 | + } ], | |
339 | + '' : [ { | |
340 | + pt : "", | |
341 | + en : "", | |
342 | + es : "" | |
343 | + } ], | |
344 | + '' : [ { | |
345 | + pt : "", | |
346 | + en : "", | |
347 | + es : "" | |
348 | + } ], | |
349 | + '' : [ { | |
350 | + pt : "", | |
351 | + en : "", | |
352 | + es : "" | |
353 | + } ], | |
354 | + '' : [ { | |
355 | + pt : "", | |
356 | + en : "", | |
357 | + es : "" | |
358 | + } ], | |
359 | + '' : [ { | |
360 | + pt : "", | |
361 | + en : "", | |
362 | + es : "" | |
363 | + } ], | |
364 | + '' : [ { | |
365 | + pt : "", | |
366 | + en : "", | |
367 | + es : "" | |
368 | + } ], | |
369 | + '' : [ { | |
370 | + pt : "", | |
371 | + en : "", | |
372 | + es : "" | |
373 | + } ], | |
374 | + '' : [ { | |
375 | + pt : "", | |
376 | + en : "", | |
377 | + es : "" | |
378 | + } ], | |
309 | 379 | '' : [ { |
310 | 380 | pt : "", |
311 | 381 | en : "", | ... | ... |
admin/dicionario/perfis.js
... | ... | @@ -25,5 +25,10 @@ i3GEOadmin.perfis.dicionario = { |
25 | 25 | pt : "<p>Perfis existentes: (clique na célula para editar e salve a linha editada)</p>", |
26 | 26 | en : "", |
27 | 27 | es : "" |
28 | + } ], | |
29 | + 'msgBuscaPerfil' : [ { | |
30 | + pt : "buscando perfis...", | |
31 | + en : "", | |
32 | + es : "" | |
28 | 33 | } ] |
29 | 34 | }; | ... | ... |
admin/dicionario/sistemas.js
... | ... | @@ -25,5 +25,75 @@ i3GEOadmin.sistemas.dicionario = { |
25 | 25 | pt : "Sistemas existentes:", |
26 | 26 | en : "", |
27 | 27 | es : "" |
28 | + } ], | |
29 | + 'msgBuscaSistema' : [ { | |
30 | + pt : "buscando sistemas...", | |
31 | + en : "", | |
32 | + es : "" | |
33 | + } ], | |
34 | + 'adicionaFuncao' : [ { | |
35 | + pt : "'adiciona função'", | |
36 | + en : "", | |
37 | + es : "" | |
38 | + } ], | |
39 | + 'sistema' : [ { | |
40 | + pt : "Sistema", | |
41 | + en : "", | |
42 | + es : "" | |
43 | + } ], | |
44 | + 'funcao' : [ { | |
45 | + pt : "Função", | |
46 | + en : "", | |
47 | + es : "" | |
48 | + } ], | |
49 | + 'nome' : [ { | |
50 | + pt : "Nome:", | |
51 | + en : "", | |
52 | + es : "" | |
53 | + } ], | |
54 | + 'perfil' : [ { | |
55 | + pt : "Perfis - escolha da lista abaixo:", | |
56 | + en : "", | |
57 | + es : "" | |
58 | + } ], | |
59 | + 'publicado' : [ { | |
60 | + pt : "Publicado?", | |
61 | + en : "", | |
62 | + es : "" | |
63 | + } ], | |
64 | + 'nomeFuncao' : [ { | |
65 | + pt : "Nome da função:", | |
66 | + en : "", | |
67 | + es : "" | |
68 | + } ], | |
69 | + 'programa' : [ { | |
70 | + pt : "Programa que será executado:", | |
71 | + en : "", | |
72 | + es : "" | |
73 | + } ], | |
74 | + 'largura' : [ { | |
75 | + pt : "Largura da janela onde o programa será aberto:", | |
76 | + en : "", | |
77 | + es : "" | |
78 | + } ], | |
79 | + 'altura' : [ { | |
80 | + pt : "Altura da janela:", | |
81 | + en : "", | |
82 | + es : "" | |
83 | + } ], | |
84 | + 'perfilLista' : [ { | |
85 | + pt : "Perfis - escolha da lista abaixo:", | |
86 | + en : "", | |
87 | + es : "" | |
88 | + } ], | |
89 | + 'msgNaoExclui' : [ { | |
90 | + pt : "Não foi possível excluir. Verifique se não existem menus vinculados a este tema", | |
91 | + en : "", | |
92 | + es : "" | |
93 | + } ], | |
94 | + '' : [ { | |
95 | + pt : "", | |
96 | + en : "", | |
97 | + es : "" | |
28 | 98 | } ] |
29 | 99 | }; | ... | ... |
admin/dicionario/subgrupos.js
1 | 1 | //+$trad(1,i3GEOadmin.principal.dicionario)+ |
2 | -//i3GEOadmin.subgrupos = {}; | |
3 | -i3GEOadmin.subgrupos.dicionario = { | |
4 | - '' : [ { | |
2 | +i3GEOadmin.listasubgrupos = {}; | |
3 | +i3GEOadmin.listasubgrupos.dicionario = { | |
4 | + 'msgBuscaSubgrupo' : [ { | |
5 | + pt : "buscando subgrupos...", | |
6 | + en : "", | |
7 | + es : "" | |
8 | + } ], | |
9 | + 'subgrupos' : [ { | |
10 | + pt : "Subgrupos", | |
11 | + en : "", | |
12 | + es : "" | |
13 | + } ], | |
14 | + 'nomePadrao' : [ { | |
15 | + pt : "Nome padrão:", | |
16 | + en : "", | |
17 | + es : "" | |
18 | + } ], | |
19 | + 'descricao' : [ { | |
20 | + pt : "Descrição (opcional):", | |
21 | + en : "", | |
22 | + es : "" | |
23 | + } ], | |
24 | + 'nomeIn' : [ { | |
25 | + pt : "Nome em inglês (opcional):", | |
26 | + en : "", | |
27 | + es : "" | |
28 | + } ], | |
29 | + 'nomeEs' : [ { | |
30 | + pt : "Espanhol (opcional):", | |
31 | + en : "", | |
32 | + es : "" | |
33 | + } ], | |
34 | + 'nomeIt' : [ { | |
35 | + pt : "Italiano (opcional):", | |
36 | + en : "", | |
37 | + es : "" | |
38 | + } ], | |
39 | + '' : [ { | |
40 | + pt : "", | |
41 | + en : "", | |
42 | + es : "" | |
43 | + } ], | |
44 | + '' : [ { | |
45 | + pt : "", | |
46 | + en : "", | |
47 | + es : "" | |
48 | + } ], | |
49 | + '' : [ { | |
50 | + pt : "", | |
51 | + en : "", | |
52 | + es : "" | |
53 | + } ], | |
54 | + '' : [ { | |
5 | 55 | pt : "", |
6 | 56 | en : "", |
7 | 57 | es : "" | ... | ... |
admin/dicionario/tags.js
... | ... | @@ -25,5 +25,50 @@ i3GEOadmin.tags.dicionario = { |
25 | 25 | pt : "<p>Tags existentes: (clique na célula para editar e salve a linha editada)</p>", |
26 | 26 | en : "", |
27 | 27 | es : "" |
28 | + } ], | |
29 | + 'msgBuscaTags' : [ { | |
30 | + pt : "buscando tags...", | |
31 | + en : "", | |
32 | + es : "" | |
33 | + } ], | |
34 | + '' : [ { | |
35 | + pt : "", | |
36 | + en : "", | |
37 | + es : "" | |
38 | + } ], | |
39 | + '' : [ { | |
40 | + pt : "", | |
41 | + en : "", | |
42 | + es : "" | |
43 | + } ], | |
44 | + '' : [ { | |
45 | + pt : "", | |
46 | + en : "", | |
47 | + es : "" | |
48 | + } ], | |
49 | + '' : [ { | |
50 | + pt : "", | |
51 | + en : "", | |
52 | + es : "" | |
53 | + } ], | |
54 | + '' : [ { | |
55 | + pt : "", | |
56 | + en : "", | |
57 | + es : "" | |
58 | + } ], | |
59 | + '' : [ { | |
60 | + pt : "", | |
61 | + en : "", | |
62 | + es : "" | |
63 | + } ], | |
64 | + '' : [ { | |
65 | + pt : "", | |
66 | + en : "", | |
67 | + es : "" | |
68 | + } ], | |
69 | + '' : [ { | |
70 | + pt : "", | |
71 | + en : "", | |
72 | + es : "" | |
28 | 73 | } ] |
29 | 74 | }; | ... | ... |
admin/dicionario/usuarios.js
... | ... | @@ -30,5 +30,105 @@ i3GEOadmin.usuarios.dicionario = { |
30 | 30 | pt : "Usuários cadastrados:", |
31 | 31 | en : "", |
32 | 32 | es : "" |
33 | + } ], | |
34 | + 'msgBuscaUsuario' : [ { | |
35 | + pt : "buscando usuários...", | |
36 | + en : "", | |
37 | + es : "" | |
38 | + } ], | |
39 | + 'novoPapel' : [ { | |
40 | + pt : "Adicionar novo papel", | |
41 | + en : "", | |
42 | + es : "" | |
43 | + } ], | |
44 | + 'definePapel' : [ { | |
45 | + pt : "Edite para definir o papel!!!", | |
46 | + en : "", | |
47 | + es : "" | |
48 | + } ], | |
49 | + 'enviaSenha' : [ { | |
50 | + pt : "enviar senha", | |
51 | + en : "", | |
52 | + es : "" | |
53 | + } ], | |
54 | + 'defineUsuario' : [ { | |
55 | + pt : "Edite para definir o usuário!!!", | |
56 | + en : "", | |
57 | + es : "" | |
58 | + } ], | |
59 | + 'usuario' : [ { | |
60 | + pt : "Usuário", | |
61 | + en : "", | |
62 | + es : "" | |
63 | + } ], | |
64 | + 'msgUsuario' : [ { | |
65 | + pt : "Se o usuário já existir, preencha para alterar a senha. Se for mantido em branco, o sistema gerará uma senha aleatória no caso de novos usuários. Envie a senha por e-mail após o cadastro.", | |
66 | + en : "", | |
67 | + es : "" | |
68 | + } ], | |
69 | + 'novaSenha' : [ { | |
70 | + pt : "Nova senha:", | |
71 | + en : "", | |
72 | + es : "" | |
73 | + } ], | |
74 | + 'dataCadastro' : [ { | |
75 | + pt : "Data de cadastro:", | |
76 | + en : "", | |
77 | + es : "" | |
78 | + } ], | |
79 | + 'ativo' : [ { | |
80 | + pt : "Ativo:", | |
81 | + en : "", | |
82 | + es : "" | |
83 | + } ], | |
84 | + 'msgExcluiUsuario' : [ { | |
85 | + pt : " excluindo o registro do usuário= ", | |
86 | + en : "", | |
87 | + es : "" | |
88 | + } ], | |
89 | + 'msgNaoEnvia' : [ { | |
90 | + pt : "Não foi possível enviar", | |
91 | + en : "", | |
92 | + es : "" | |
93 | + } ], | |
94 | + 'msgEnvia' : [ { | |
95 | + pt : "Enviando e-mail", | |
96 | + en : "", | |
97 | + es : "" | |
98 | + } ], | |
99 | + 'msgNaoExclui' : [ { | |
100 | + pt : "Não foi possível excluir. Verifique se não existem menus vinculados a este tema", | |
101 | + en : "", | |
102 | + es : "" | |
103 | + } ], | |
104 | + '' : [ { | |
105 | + pt : "", | |
106 | + en : "", | |
107 | + es : "" | |
108 | + } ], | |
109 | + '' : [ { | |
110 | + pt : "", | |
111 | + en : "", | |
112 | + es : "" | |
113 | + } ], | |
114 | + '' : [ { | |
115 | + pt : "", | |
116 | + en : "", | |
117 | + es : "" | |
118 | + } ], | |
119 | + '' : [ { | |
120 | + pt : "", | |
121 | + en : "", | |
122 | + es : "" | |
123 | + } ], | |
124 | + '' : [ { | |
125 | + pt : "", | |
126 | + en : "", | |
127 | + es : "" | |
128 | + } ], | |
129 | + '' : [ { | |
130 | + pt : "", | |
131 | + en : "", | |
132 | + es : "" | |
33 | 133 | } ] |
34 | 134 | }; | ... | ... |
admin/dicionario/webservices.js
... | ... | @@ -25,5 +25,45 @@ i3GEOadmin.webservices.dicionario = { |
25 | 25 | pt : "Endereços cadastrados:", |
26 | 26 | en : "", |
27 | 27 | es : "" |
28 | + } ], | |
29 | + 'tipo' : [ { | |
30 | + pt : "tipo", | |
31 | + en : "", | |
32 | + es : "" | |
33 | + } ], | |
34 | + 'msgBuscaEndereco' : [ { | |
35 | + pt : "buscando endereços...", | |
36 | + en : "", | |
37 | + es : "" | |
38 | + } ], | |
39 | + 'nome' : [ { | |
40 | + pt : "Nome:", | |
41 | + en : "", | |
42 | + es : "" | |
43 | + } ], | |
44 | + 'descricao' : [ { | |
45 | + pt : "Descrição:", | |
46 | + en : "", | |
47 | + es : "" | |
48 | + } ], | |
49 | + 'autor' : [ { | |
50 | + pt : "Autor:", | |
51 | + en : "", | |
52 | + es : "" | |
53 | + } ], | |
54 | + 'endereco' : [ { | |
55 | + pt : "Endereço:", | |
56 | + en : "", | |
57 | + es : "" | |
58 | + } ], | |
59 | + 'tipo1' : [ { | |
60 | + pt : "Tipo:", | |
61 | + en : "", | |
62 | + es : "" | |
63 | + } ], | |
64 | + '' : [ { | |
65 | + pt : "", | |
66 | + en : "", | |
67 | + es : "" | |
28 | 68 | } ] |
29 | 69 | }; | ... | ... |
admin/html/admin.css
... | ... | @@ -249,10 +249,12 @@ select{ |
249 | 249 | } |
250 | 250 | |
251 | 251 | .fundoPonto { |
252 | - background: url("../../imagens/fundo_ponto.jpg") repeat-x scroll left | |
253 | - transparent; | |
254 | - margin: 0px; | |
252 | + padding-top: 0px; | |
253 | + COLOR: #2F4632; | |
255 | 254 | font-family: Verdana, Arial, Helvetica, sans-serif; |
255 | + background-color: rgb(250, 250, 250); | |
256 | + margin: auto; | |
257 | + font-size: 12px; | |
256 | 258 | } |
257 | 259 | |
258 | 260 | .cabecalhoGeral { | ... | ... |
admin/js/estat_editor.js
... | ... | @@ -576,6 +576,7 @@ i3GEOadmin.editor = { |
576 | 576 | '<p class="paragrafo" >shp: <br><input type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + |
577 | 577 | '<p class="paragrafo" >shx: <br><input type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + |
578 | 578 | '<p class="paragrafo" >dbf: <br><input type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>' + |
579 | + '<p class="paragrafo" >prj (opcional): <br><input type="file" size=22 name="i3GEOuploadprj" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
579 | 580 | '</fieldset>' + |
580 | 581 | '<fieldset class=subbloco >' + |
581 | 582 | '<legend>Destino</legend>' + |
... | ... | @@ -599,10 +600,9 @@ i3GEOadmin.editor = { |
599 | 600 | '</fieldset>' + |
600 | 601 | '<fieldset class=subbloco >' + |
601 | 602 | '<legend>Projeção</legend>' + |
602 | - '<p class="paragrafo" >Assegure-se que o shapefile esteja na projeção geográfica se você for usar com o sistema de metadados estatísticos.</p>' + | |
603 | - '<p class="paragrafo" >Código da projeção (SRID) do arquivo</p>' + | |
603 | + '<p class="paragrafo" >Se você não escolheu o arquivo PRJ escolha o código da projeção (SRID) do arquivo</p>' + | |
604 | 604 | '<input class=digitar type="text" value="4326" size=20 id="insrid" name="insrid" style="top:0px;left:0px;cursor:pointer;float:left;margin-right:10px;"><div id=selInSrid ></div>' + |
605 | - '<p class="paragrafo" >Projetar o arquivo para (deixe em branco caso não deva ser feita a projeção dos dados):</p>' + | |
605 | + '<p class="paragrafo" >Projetar o arquivo para (deixe em branco se você não quiser aplicar nenhuma transformação de projeção):</p>' + | |
606 | 606 | '<input class=digitar type="text" value="" size=20 id="outsrid" name="outsrid" style="top:0px;left:0px;cursor:pointer;float:left;margin-right:10px;"><div id=selOutSrid ></div>' + |
607 | 607 | '</fieldset>' + |
608 | 608 | '<fieldset class=subbloco >' + | ... | ... |
admin/js/perfis.js
... | ... | @@ -53,7 +53,7 @@ Obt&eacute;m a lista de perfis |
53 | 53 | */ |
54 | 54 | function pegaPerfis() |
55 | 55 | { |
56 | - core_pegaDados("buscando perfis...","../php/menutemas.php?funcao=pegaPerfis","montaTabela"); | |
56 | + core_pegaDados($trad("msgBuscaPerfil",i3GEOadmin.perfis.dicionario),"../php/menutemas.php?funcao=pegaPerfis","montaTabela"); | |
57 | 57 | } |
58 | 58 | function montaTabela(dados) |
59 | 59 | { |
... | ... | @@ -78,10 +78,10 @@ function montaTabela(dados) |
78 | 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; |
79 | 79 | }; |
80 | 80 | var myColumnDefs = [ |
81 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
82 | - {label:"salvar",formatter:formatSalva}, | |
81 | + {key:"excluir",label:$trad("excluir",i3GEOadmin.core.dicionario),formatter:formatExclui}, | |
82 | + {label:$trad("salva2",i3GEOadmin.core.dicionario),formatter:formatSalva}, | |
83 | 83 | {label:"id",key:"id_perfil", formatter:formatTextoId}, |
84 | - {label:"nome",resizeable:true,key:"perfil", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
84 | + {label:$trad("nome",i3GEOadmin.core.dicionario),resizeable:true,key:"perfil", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
85 | 85 | ]; |
86 | 86 | myDataSource = new YAHOO.util.DataSource(dados); |
87 | 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; |
... | ... | @@ -166,13 +166,13 @@ function gravaLinha(row) |
166 | 166 | var id_perfil = r.getData("id_perfil"); |
167 | 167 | var perfil = r.getData("perfil"); |
168 | 168 | core_carregando("ativa"); |
169 | - var mensagem = " gravando registro do id= "+id_perfil; | |
169 | + var mensagem = $trad("gravaId",i3GEOadmin.core.dicionario)+id_perfil; | |
170 | 170 | var sUrl = "../php/menutemas.php?funcao=alteraPerfis&perfil="+perfil+"&id="+id_perfil; |
171 | 171 | core_gravaLinha(mensagem,row,sUrl); |
172 | 172 | } |
173 | 173 | function excluiLinha(id,row) |
174 | 174 | { |
175 | - var mensagem = " excluindo o registro do id= "+id; | |
175 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id; | |
176 | 176 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=perfis"; |
177 | 177 | core_excluiLinha(sUrl,row,mensagem); |
178 | 178 | } | ... | ... |
admin/js/sistemas.js
... | ... | @@ -49,7 +49,7 @@ function ativaBotaoAdicionaRaiz(sUrl,idBotao) |
49 | 49 | var botao, adiciona = function() |
50 | 50 | { |
51 | 51 | core_carregando("ativa"); |
52 | - core_carregando(" adicionando um novo registro"); | |
52 | + core_carregando($trad("msgNovoRegistro",i3GEOadmin.core.dicionario)); | |
53 | 53 | var callback = |
54 | 54 | { |
55 | 55 | success:function(o) |
... | ... | @@ -79,7 +79,7 @@ Obt&eacute;m a lista de sistemas |
79 | 79 | */ |
80 | 80 | function pegaSistemas() |
81 | 81 | { |
82 | - core_pegaDados("buscando sistemas...","../php/sistemas.php?funcao=pegaSistemas","montaArvore"); | |
82 | + core_pegaDados($trad("msgBuscaSistema",i3GEOadmin.sistemas.dicionario),"../php/sistemas.php?funcao=pegaSistemas","montaArvore"); | |
83 | 83 | } |
84 | 84 | /* |
85 | 85 | Function: montaArvore |
... | ... | @@ -140,8 +140,8 @@ function adicionaNos(no,dados,redesenha) |
140 | 140 | { |
141 | 141 | for (var i=0, j=dados.length; i<j; i++) |
142 | 142 | { |
143 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('funcao','"+dados[i].id_funcao+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" /> "; | |
144 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"editar('funcao','"+dados[i].id_funcao+"')\" title=editar width='10px' heigth='10px' src=\"../imagens/06.png\" /> <span>"+dados[i].nome_funcao+"</span>"; | |
143 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('funcao','"+dados[i].id_funcao+"')\" title="+ $trad('excluir',i3GEOadmin.core.dicionario) +" width='10px' heigth='10px' src=\"../imagens/01.png\" /> "; | |
144 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"editar('funcao','"+dados[i].id_funcao+"')\" title="+ $trad('editar',i3GEOadmin.core.dicionario) +" width='10px' heigth='10px' src=\"../imagens/06.png\" /> <span>"+dados[i].nome_funcao+"</span>"; | |
145 | 145 | var d = {html:conteudo,id_funcao:dados[i].id_funcao,tipo:"funcao"}; |
146 | 146 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
147 | 147 | tempNode.isLeaf = true; |
... | ... | @@ -154,9 +154,9 @@ function adicionaNosRaiz(dados,redesenha) |
154 | 154 | var root = tree.getRoot(); |
155 | 155 | for (var i=0, j=dados.length; i<j; i++) |
156 | 156 | { |
157 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"excluir('sistema','"+dados[i].id_sistema+"')\" title=excluir src=\"../imagens/01.png\" />"; | |
158 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"adicionarFuncao('"+dados[i].id_sistema+"')\" title='adiciona função' src=\"../imagens/05.png\" />"; | |
159 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('sistema','"+dados[i].id_sistema+"')\" title=editar src=\"../imagens/06.png\" /><b> <span>"+dados[i].nome_sistema+"</span>"; | |
157 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"excluir('sistema','"+dados[i].id_sistema+"')\" title="+ $trad('excluir',i3GEOadmin.core.dicionario) +" src=\"../imagens/01.png\" />"; | |
158 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"adicionarFuncao('"+dados[i].id_sistema+"')\" title="+ $trad('adicionaFuncao',i3GEOadmin.sistemas.dicionario) +" src=\"../imagens/05.png\" />"; | |
159 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('sistema','"+dados[i].id_sistema+"')\" title="+ $trad('editar',i3GEOadmin.core.dicionario) +" src=\"../imagens/06.png\" /><b> <span>"+dados[i].nome_sistema+"</span>"; | |
160 | 160 | var d = {html:conteudo,id_sistema:dados[i].id_sistema,tipo:"sistema"}; |
161 | 161 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); |
162 | 162 | tempNode.enableHighlight = false; |
... | ... | @@ -177,7 +177,7 @@ function editar(tipo,id) |
177 | 177 | if(tipo == "funcao") |
178 | 178 | { |
179 | 179 | core_carregando("ativa"); |
180 | - core_carregando(" buscando dados"); | |
180 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); | |
181 | 181 | var callback = |
182 | 182 | { |
183 | 183 | success:function(o) |
... | ... | @@ -198,7 +198,7 @@ function editar(tipo,id) |
198 | 198 | if(tipo == "sistema") |
199 | 199 | { |
200 | 200 | core_carregando("ativa"); |
201 | - core_carregando(" buscando dados"); | |
201 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); | |
202 | 202 | var callback = |
203 | 203 | { |
204 | 204 | success:function(o) |
... | ... | @@ -219,14 +219,14 @@ function editar(tipo,id) |
219 | 219 | } |
220 | 220 | function montaEditorSistemas(dados,id) |
221 | 221 | { |
222 | - core_montaEditor("gravaDadosSistema('"+id+"')","","","","Sistema",true,true,false); | |
222 | + core_montaEditor("gravaDadosSistema('"+id+"')","","","",$trad("sistema",i3GEOadmin.sistemas.dicionario),true,true,false); | |
223 | 223 | $i("editor_bd").innerHTML = montaDivSistemas(dados); |
224 | 224 | core_carregando("desativa"); |
225 | 225 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_sistema\")"); |
226 | 226 | } |
227 | 227 | function montaEditorFuncoes(dados,id) |
228 | 228 | { |
229 | - core_montaEditor("gravaDadosFuncao('"+id+"')","","","","Função",true,true,false); | |
229 | + core_montaEditor("gravaDadosFuncao('"+id+"')","","","",$trad("funcao",i3GEOadmin.sistemas.dicionario),true,true,false); | |
230 | 230 | $i("editor_bd").innerHTML = montaDivFuncoes(dados); |
231 | 231 | core_carregando("desativa"); |
232 | 232 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_funcao\")"); |
... | ... | @@ -245,13 +245,13 @@ function montaDivSistemas(i) |
245 | 245 | var param = |
246 | 246 | { |
247 | 247 | "linhas":[ |
248 | - {titulo:"Nome:",id:"Enome_sistema",size:"50",value:i.nome_sistema,tipo:"text",div:""}, | |
249 | - {titulo:"Perfis - escolha da lista abaixo:",id:"Eperfil_sistema",size:"50",value:i.perfil_sistema,tipo:"text",div:"<div id=comboPerfis >Buscando...</div>"} | |
248 | + {titulo:$trad("nome",i3GEOadmin.sistemas.dicionario),id:"Enome_sistema",size:"50",value:i.nome_sistema,tipo:"text",div:""}, | |
249 | + {titulo:$trad("perfil",i3GEOadmin.sistemas.dicionario),id:"Eperfil_sistema",size:"50",value:i.perfil_sistema,tipo:"text",div:"<div id=comboPerfis >Buscando...</div>"} | |
250 | 250 | ] |
251 | 251 | }; |
252 | 252 | var ins = ""; |
253 | 253 | ins += core_geraLinhas(param); |
254 | - ins += "<br>Publicado?<br>"; | |
254 | + ins += "<br>"+ $trad("publicado",i3GEOadmin.sistemas.dicionario) +"<br>"; | |
255 | 255 | ins += "<select id='Epublicado_sistema' >"; |
256 | 256 | ins += core_combosimnao(i.publicado_sistema); |
257 | 257 | ins += "</select>"; |
... | ... | @@ -262,11 +262,11 @@ function montaDivFuncoes(i) |
262 | 262 | var param = |
263 | 263 | { |
264 | 264 | "linhas":[ |
265 | - {titulo:"Nome da função:",id:"Enome_funcao",size:"50",value:i.nome_funcao,tipo:"text",div:""}, | |
266 | - {titulo:"Programa que será executado:",id:"Eabrir_funcao",size:"50",value:i.abrir_funcao,tipo:"text",div:""}, | |
267 | - {titulo:"Largura da janela onde o programa será aberto:",id:"Ew_funcao",size:"5",value:i.w_funcao,tipo:"text",div:""}, | |
268 | - {titulo:"Altura da janela:",id:"Eh_funcao",size:"5",value:i.h_funcao,tipo:"text",div:""}, | |
269 | - {titulo:"Perfis - escolha da lista abaixo:",id:"Eperfil_funcao",size:"50",value:i.perfil_funcao,tipo:"text",div:"<div id=comboPerfis >Buscando...</div>"} | |
265 | + {titulo:$trad("publicado",i3GEOadmin.sistemas.dicionario),id:"Enome_funcao",size:"50",value:i.nome_funcao,tipo:"text",div:""}, | |
266 | + {titulo:$trad("programa",i3GEOadmin.sistemas.dicionario),id:"Eabrir_funcao",size:"50",value:i.abrir_funcao,tipo:"text",div:""}, | |
267 | + {titulo:$trad("largura",i3GEOadmin.sistemas.dicionario),id:"Ew_funcao",size:"5",value:i.w_funcao,tipo:"text",div:""}, | |
268 | + {titulo:$trad("altura",i3GEOadmin.sistemas.dicionario),id:"Eh_funcao",size:"5",value:i.h_funcao,tipo:"text",div:""}, | |
269 | + {titulo:$trad("perfilLista",i3GEOadmin.sistemas.dicionario),id:"Eperfil_funcao",size:"50",value:i.perfil_funcao,tipo:"text",div:"<div id=comboPerfis >Buscando...</div>"} | |
270 | 270 | ] |
271 | 271 | }; |
272 | 272 | var ins = ""; |
... | ... | @@ -284,7 +284,7 @@ Exclui um no espec&iacute;fico |
284 | 284 | */ |
285 | 285 | function excluir(tipo,id) |
286 | 286 | { |
287 | - var mensagem = " excluindo o registro do id= "+id; | |
287 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id; | |
288 | 288 | var no = "", sUrl = ""; |
289 | 289 | if(tipo == "sistema") |
290 | 290 | { |
... | ... | @@ -337,7 +337,7 @@ function gravaDadosFuncao(id) |
337 | 337 | {par += "&"+campos[i]+"_funcao="+($i("E"+campos[i]+"_funcao").value);} |
338 | 338 | par += "&id_funcao="+id; |
339 | 339 | core_carregando("ativa"); |
340 | - core_carregando(" gravando o registro do id= "+id); | |
340 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); | |
341 | 341 | var sUrl = "../php/sistemas.php?funcao=alterarFuncoes"+par; |
342 | 342 | var callback = |
343 | 343 | { |
... | ... | @@ -347,7 +347,7 @@ function gravaDadosFuncao(id) |
347 | 347 | { |
348 | 348 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") |
349 | 349 | { |
350 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem menus vinculados a este tema</span>"); | |
350 | + core_carregando("<span style=color:red >"+ $trad("msgNaoExclui",i3GEOadmin.sistemas.dicionario) +"</span>"); | |
351 | 351 | setTimeout("core_carregando('desativa')",3000); |
352 | 352 | } |
353 | 353 | else |
... | ... | @@ -382,7 +382,7 @@ function gravaDadosSistema(id) |
382 | 382 | {par += "&"+campos[i]+"_sistema="+($i("E"+campos[i]+"_sistema").value);} |
383 | 383 | par += "&id_sistema="+id; |
384 | 384 | core_carregando("ativa"); |
385 | - core_carregando(" gravando o registro do id= "+id); | |
385 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); | |
386 | 386 | var sUrl = "../php/sistemas.php?funcao=alterarSistemas"+par; |
387 | 387 | var callback = |
388 | 388 | { |
... | ... | @@ -392,7 +392,7 @@ function gravaDadosSistema(id) |
392 | 392 | { |
393 | 393 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") |
394 | 394 | { |
395 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem menus vinculados a este tema</span>"); | |
395 | + core_carregando("<span style=color:red >"+ $trad("msgNaoExclui",i3GEOadmin.sistemas.dicionario) +"</span>"); | |
396 | 396 | setTimeout("core_carregando('desativa')",3000); |
397 | 397 | } |
398 | 398 | else | ... | ... |
admin/js/subgrupos.js
... | ... | @@ -59,11 +59,11 @@ i3GEOadmin.subgrupos = { |
59 | 59 | }, |
60 | 60 | defColunas: function(){ |
61 | 61 | return [ |
62 | - {key:"excluir",label:"excluir",formatter:i3GEOadmin.subgrupos.formatExclui}, | |
63 | - {key:"mais",label:"editar",formatter:i3GEOadmin.subgrupos.formatMais}, | |
64 | - {label:"id",key:"id_subgrupo", formatter:i3GEOadmin.subgrupos.formatTexto}, | |
65 | - {label:"nome",resizeable:true,key:"nome_subgrupo", formatter:i3GEOadmin.subgrupos.formatTexto}, | |
66 | - {label:"descrição",resizeable:true,key:"desc_subgrupo", formatter:i3GEOadmin.subgrupos.formatTexto}, | |
62 | + {key:"excluir",label:$trad("excluir",i3GEOadmin.core.dicionario),formatter:i3GEOadmin.subgrupos.formatExclui}, | |
63 | + {key:"mais",label:$trad("editar",i3GEOadmin.core.dicionario),formatter:i3GEOadmin.subgrupos.formatMais}, | |
64 | + {label:"id",key:"id_subgrupo",resizeable:true, formatter:i3GEOadmin.subgrupos.formatTexto}, | |
65 | + {label:$trad("nome",i3GEOadmin.core.dicionario),key:"nome_subgrupo", formatter:i3GEOadmin.subgrupos.formatTexto}, | |
66 | + {label:$trad("descricao",i3GEOadmin.core.dicionario),resizeable:true,key:"desc_subgrupo", formatter:i3GEOadmin.subgrupos.formatTexto}, | |
67 | 67 | {label:"en",resizeable:true,key:"en", formatter:i3GEOadmin.subgrupos.formatTexto}, |
68 | 68 | {label:"es",resizeable:true,key:"es", formatter:i3GEOadmin.subgrupos.formatTexto}, |
69 | 69 | {label:"it",resizeable:true,key:"it", formatter:i3GEOadmin.subgrupos.formatTexto} |
... | ... | @@ -89,7 +89,7 @@ i3GEOadmin.subgrupos = { |
89 | 89 | obtem: function(){ |
90 | 90 | i3GEOadmin.subgrupos.dados = ""; |
91 | 91 | core_carregando("ativa"); |
92 | - core_pegaDados("buscando subgrupos...","../php/menutemas.php?funcao=pegaSubGrupos","i3GEOadmin.subgrupos.tabela"); | |
92 | + core_pegaDados($trad("msgBuscaSubgrupo",i3GEOadmin.listasubgrupos.dicionario),"../php/menutemas.php?funcao=pegaSubGrupos","i3GEOadmin.subgrupos.tabela"); | |
93 | 93 | }, |
94 | 94 | tabela: function(dados){ |
95 | 95 | if(i3GEOadmin.subgrupos.dados == ""){ |
... | ... | @@ -127,7 +127,7 @@ i3GEOadmin.subgrupos = { |
127 | 127 | } |
128 | 128 | if (column.key == 'mais'){ |
129 | 129 | core_carregando("ativa"); |
130 | - core_carregando("buscando dados..."); | |
130 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); | |
131 | 131 | $clicouId = registro.getData('id_subgrupo'); |
132 | 132 | $recordid = registro.getId(); |
133 | 133 | sUrl = "../php/menutemas.php?funcao=pegaSubGrupos&id_subgrupo="+$clicouId; |
... | ... | @@ -152,7 +152,7 @@ i3GEOadmin.subgrupos = { |
152 | 152 | var botao, ins, |
153 | 153 | novoel = document.createElement("div"); |
154 | 154 | novoel.id = "janela_editor2"; |
155 | - ins = '<div class="hd"><input id=okcancel_checkbox_id2 type="buttom" value="Salva" /><span style="margin-left:10px;position:relative;top:-10px;">Subgrupos</span></div>'; | |
155 | + ins = '<div class="hd"><input id=okcancel_checkbox_id2 type="buttom" value="Salva" /><span style="margin-left:10px;position:relative;top:-10px;">'+ $trad("subgrupos",i3GEOadmin.listasubgrupos.dicionario) +'</span></div>'; | |
156 | 156 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
157 | 157 | ins += "<div id='editor_bd2'></div>"; |
158 | 158 | ins += "<div id='letras_SG'></div>"; |
... | ... | @@ -186,11 +186,11 @@ i3GEOadmin.subgrupos = { |
186 | 186 | formulario: function(i){ |
187 | 187 | var param = { |
188 | 188 | "linhas":[ |
189 | - {titulo:"Nome padrão:",id:"Enome_subgrupo",size:"50",value:i.nome_subgrupo,tipo:"text",div:""}, | |
190 | - {titulo:"Descricao (opcional):",id:"Edesc_subgrupo",size:"50",value:i.desc_subgrupo,tipo:"text",div:""}, | |
191 | - {titulo:"Nome em inglês (opcional):",id:"Een",size:"50",value:i.en,tipo:"text",div:""}, | |
192 | - {titulo:"Espanhol (opcional):",id:"Ees",size:"50",value:i.es,tipo:"text",div:""}, | |
193 | - {titulo:"Italiano (opcional):",id:"Eit",size:"50",value:i.it,tipo:"text",div:""} | |
189 | + {titulo:$trad("nomePadrao",i3GEOadmin.listasubgrupos.dicionario),id:"Enome_subgrupo",size:"50",value:i.nome_subgrupo,tipo:"text",div:""}, | |
190 | + {titulo:$trad("descricao",i3GEOadmin.listasubgrupos.dicionario),id:"Edesc_subgrupo",size:"50",value:i.desc_subgrupo,tipo:"text",div:""}, | |
191 | + {titulo:$trad("nomeIn",i3GEOadmin.listasubgrupos.dicionario),id:"Een",size:"50",value:i.en,tipo:"text",div:""}, | |
192 | + {titulo:$trad("nomeEs",i3GEOadmin.listasubgrupos.dicionario),id:"Ees",size:"50",value:i.es,tipo:"text",div:""}, | |
193 | + {titulo:$trad("nomeIt",i3GEOadmin.listasubgrupos.dicionario),id:"Eit",size:"50",value:i.it,tipo:"text",div:""} | |
194 | 194 | ] |
195 | 195 | }, |
196 | 196 | ins = ""; |
... | ... | @@ -205,7 +205,7 @@ i3GEOadmin.subgrupos = { |
205 | 205 | i3GEOadmin.subgrupos.letra = letra; |
206 | 206 | if(i3GEOadmin.subgrupos.dados == ""){ |
207 | 207 | core_carregando("ativa"); |
208 | - core_pegaDados("buscando subgrupos...","../php/menutemas.php?funcao=pegaSubGrupos","i3GEOadmin.subgrupos.atualizaFiltro"); | |
208 | + core_pegaDados($trad("msgBuscaSubgrupo",i3GEOadmin.listasubgrupos.dicionario),"../php/menutemas.php?funcao=pegaSubGrupos","i3GEOadmin.subgrupos.atualizaFiltro"); | |
209 | 209 | return; |
210 | 210 | } |
211 | 211 | var i,temp, |
... | ... | @@ -226,7 +226,7 @@ i3GEOadmin.subgrupos = { |
226 | 226 | i3GEOadmin.subgrupos.tabela(novo); |
227 | 227 | }, |
228 | 228 | exclui: function(id,row){ |
229 | - var mensagem = " excluindo o registro do id= "+id, | |
229 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id, | |
230 | 230 | sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=subgrupos"; |
231 | 231 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.subgrupos.dataTable); |
232 | 232 | i3GEOadmin.subgrupos.dados = ""; |
... | ... | @@ -244,13 +244,13 @@ i3GEOadmin.subgrupos = { |
244 | 244 | } |
245 | 245 | par += "&id_subgrupo="+id; |
246 | 246 | core_carregando("ativa"); |
247 | - core_carregando(" gravando o registro do id= "+id); | |
247 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); | |
248 | 248 | sUrl = "../php/menutemas.php?funcao=alteraSubGrupos"+par; |
249 | 249 | callback = { |
250 | 250 | success:function(o){ |
251 | 251 | try { |
252 | 252 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { |
253 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem registros vinculados</span>"); | |
253 | + core_carregando("<span style=color:red >"+ $trad("msgErroExclui",i3GEOadmin.core.dicionario) +"</span>"); | |
254 | 254 | setTimeout("core_carregando('desativa')",3000); |
255 | 255 | } |
256 | 256 | else{ | ... | ... |
admin/js/tags.js
... | ... | @@ -53,7 +53,7 @@ Obt&eacute;m a lista de tags |
53 | 53 | */ |
54 | 54 | function pegaTags() |
55 | 55 | { |
56 | - core_pegaDados("buscando tags...","../php/menutemas.php?funcao=pegaTags","montaTabela"); | |
56 | + core_pegaDados($trad("msgBuscaTags",i3GEOadmin.tags.dicionario),"../php/menutemas.php?funcao=pegaTags","montaTabela"); | |
57 | 57 | } |
58 | 58 | function montaTabela(dados) |
59 | 59 | { |
... | ... | @@ -78,10 +78,10 @@ function montaTabela(dados) |
78 | 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; |
79 | 79 | }; |
80 | 80 | var myColumnDefs = [ |
81 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
82 | - {label:"salvar",formatter:formatSalva}, | |
81 | + {key:"excluir",label:$trad("excluir",i3GEOadmin.core.dicionario),formatter:formatExclui}, | |
82 | + {label:$trad("salva2",i3GEOadmin.core.dicionario),formatter:formatSalva}, | |
83 | 83 | {label:"id",key:"id_tag", formatter:formatTextoId}, |
84 | - {label:"nome",resizeable:true,key:"nome", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
84 | + {label:$trad("nome",i3GEOadmin.core.dicionario),resizeable:true,key:"nome", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
85 | 85 | ]; |
86 | 86 | myDataSource = new YAHOO.util.DataSource(dados); |
87 | 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; |
... | ... | @@ -165,13 +165,13 @@ function gravaLinha(row) |
165 | 165 | var id_tag = r.getData("id_tag"); |
166 | 166 | var nome = r.getData("nome"); |
167 | 167 | core_carregando("ativa"); |
168 | - var mensagem = " gravando registro do id= "+id_tag; | |
168 | + var mensagem = $trad("gravaId",i3GEOadmin.core.dicionario)+id_tag; | |
169 | 169 | var sUrl = "../php/menutemas.php?funcao=alteraTags&nome="+nome+"&id="+id_tag; |
170 | 170 | core_gravaLinha(mensagem,row,sUrl); |
171 | 171 | } |
172 | 172 | function excluiLinha(id,row) |
173 | 173 | { |
174 | - var mensagem = " excluindo o registro do id= "+id; | |
174 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id; | |
175 | 175 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=tags"; |
176 | 176 | core_excluiLinha(sUrl,row,mensagem); |
177 | -} | |
178 | 177 | \ No newline at end of file |
178 | +} | ... | ... |
admin/js/usuarios.js
... | ... | @@ -45,7 +45,7 @@ function ativaBotaoAdicionaUsuario(sUrl,idBotao){ |
45 | 45 | var botao, adiciona = function() |
46 | 46 | { |
47 | 47 | core_carregando("ativa"); |
48 | - core_carregando(" adicionando um novo registro"); | |
48 | + core_carregando($trad("msgNovoRegistro",i3GEOadmin.core.dicionario)); | |
49 | 49 | var callback = |
50 | 50 | { |
51 | 51 | success:function(o) |
... | ... | @@ -76,7 +76,7 @@ Obt&eacute;m a lista de operacoes |
76 | 76 | <PEGAOPERACOES> |
77 | 77 | */ |
78 | 78 | function pegaUsuarios(){ |
79 | - core_pegaDados("buscando usuários...","../php/usuarios.php?funcao=pegaUsuarios","montaArvore"); | |
79 | + core_pegaDados($trad("msgBuscaUsuario",i3GEOadmin.usuarios.dicionario),"../php/usuarios.php?funcao=pegaUsuarios","montaArvore"); | |
80 | 80 | } |
81 | 81 | /* |
82 | 82 | Function: montaArvore |
... | ... | @@ -143,7 +143,7 @@ function adicionaNosPapeis(no,dados,redesenha) |
143 | 143 | } |
144 | 144 | if(!redesenha) |
145 | 145 | { |
146 | - var conteudo = "<span style=\"cursor:pointer;\" onclick=\"editar('papel','"+no.data.id_usuario+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo papel</i></span>"; | |
146 | + var conteudo = "<span style=\"cursor:pointer;\" onclick=\"editar('papel','"+no.data.id_usuario+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>"+ $trad("novoPapel",i3GEOadmin.usuarios.dicionario) +"</i></span>"; | |
147 | 147 | var d = {html:conteudo}; |
148 | 148 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
149 | 149 | tempNode.isLeaf = true; |
... | ... | @@ -152,11 +152,11 @@ function adicionaNosPapeis(no,dados,redesenha) |
152 | 152 | for (var i=0, j=dados.length; i<j; i++) |
153 | 153 | { |
154 | 154 | if(!tree.getNodeByProperty("id_nopapel",dados[i].id_usuario+"_"+dados[i].id_papel)){ |
155 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('papel','"+dados[i].id_usuario+"','"+dados[i].id_papel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
155 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('papel','"+dados[i].id_usuario+"','"+dados[i].id_papel+"')\" title="+ $trad("excluir",i3GEOadmin.core.dicionario) +" width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
156 | 156 | if(dados[i].nome != "") |
157 | 157 | {conteudo += " <span><b>"+dados[i].nome+"</b> - "+dados[i].descricao+"</span>";} |
158 | 158 | else |
159 | - {conteudo += " <span style=color:red >Edite para definir o papel!!!</span>";} | |
159 | + {conteudo += " <span style=color:red >"+ $trad("definePapel",i3GEOadmin.usuarios.dicionario) +"</span>";} | |
160 | 160 | var d = {html:conteudo,id_nopapel:dados[i].id_usuario+"_"+dados[i].id_papel,tipo:"papel"}; |
161 | 161 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
162 | 162 | tempNode.isLeaf = true; |
... | ... | @@ -168,13 +168,13 @@ function adicionaNosPapeis(no,dados,redesenha) |
168 | 168 | function adicionaNosUsuarios(dados,redesenha){ |
169 | 169 | var root = tree.getRoot(); |
170 | 170 | for (var i=0, j=dados.length; i<j; i++){ |
171 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('usuario','"+dados[i].id_usuario+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
172 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('usuario','"+dados[i].id_usuario+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
173 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:0px;width:25px;\" onclick=\"emailsenha('"+dados[i].id_usuario+"')\" title='enviar senha' src=\"../imagens/07.png\" /><b>"; | |
171 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('usuario','"+dados[i].id_usuario+"')\" title="+ $trad("excluir",i3GEOadmin.core.dicionario) +" width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
172 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('usuario','"+dados[i].id_usuario+"')\" title="+ $trad("editar",i3GEOadmin.core.dicionario) +"editar src=\"../imagens/06.png\" /><b>"; | |
173 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px;width:25px;\" onclick=\"emailsenha('"+dados[i].id_usuario+"')\" title='"+ $trad("enviaSenha",i3GEOadmin.usuarios.dicionario) +"' src=\"../imagens/07.png\" /><b>"; | |
174 | 174 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") |
175 | 175 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} |
176 | 176 | else |
177 | - {conteudo += " <span style=color:red >Edite para definir o usuário!!!</span>";} | |
177 | + {conteudo += " <span style=color:red >"+ $trad("defineUsuario",i3GEOadmin.usuarios.dicionario) +"</span>";} | |
178 | 178 | var d = {html:conteudo,id_usuario:dados[i].id_usuario,tipo:"usuario"}; |
179 | 179 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); |
180 | 180 | tempNode.enableHighlight = false; |
... | ... | @@ -189,7 +189,7 @@ Abre o editor de um no |
189 | 189 | function editar(tipo,id) |
190 | 190 | { |
191 | 191 | core_carregando("ativa"); |
192 | - core_carregando(" buscando dados"); | |
192 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); | |
193 | 193 | var sUrl = null; |
194 | 194 | var callback = |
195 | 195 | { |
... | ... | @@ -229,15 +229,15 @@ function montaDivUsuario(i){ |
229 | 229 | var temp = function(){ |
230 | 230 | gravaDados('usuario',i.id_usuario); |
231 | 231 | }; |
232 | - core_montaEditor(temp,"450px","380px","","Usuário",true,true,false); | |
232 | + core_montaEditor(temp,"450px","380px","",$trad("usuario",i3GEOadmin.usuarios.dicionario),true,true,false); | |
233 | 233 | var param = { |
234 | 234 | "linhas":[ |
235 | - {titulo:"Nome:",id:"Enome_usuario",size:"50",value:i.nome_usuario,tipo:"text",div:""}, | |
235 | + {titulo:$trad("nome2",i3GEOadmin.core.dicionario),id:"Enome_usuario",size:"50",value:i.nome_usuario,tipo:"text",div:""}, | |
236 | 236 | {titulo:"Login:",id:"Elogin",size:"50",value:i.login,tipo:"text",div:""}, |
237 | - {ajuda:"Se o usuário já existir, preencha para alterar a senha. Se for mantido em branco, o sistema gerará uma senha aleatória no caso de novos usuários. Envie a senha por e-mail após o cadastro.",titulo:"Nova senha:",id:"Esenha",size:"50",value:"",tipo:"text",div:""}, | |
237 | + {ajuda:$trad("msgUsuario",i3GEOadmin.usuarios.dicionario),titulo:$trad("novaSenha",i3GEOadmin.usuarios.dicionario),id:"Esenha",size:"50",value:"",tipo:"text",div:""}, | |
238 | 238 | {titulo:"E-mail:",id:"Eemail",size:"50",value:i.email,tipo:"text",div:""}, |
239 | - {titulo:"Data de cadastro:",id:"Edata_cadastro",size:"50",value:i.data_cadastro,tipo:"text",div:""}, | |
240 | - {titulo:"Ativo:",id:"",size:"50",value:i.ativo,tipo:"text",div:"<div id=cAtivo ></div>"} | |
239 | + {titulo:$trad("dataCadastro",i3GEOadmin.usuarios.dicionario),id:"Edata_cadastro",size:"50",value:i.data_cadastro,tipo:"text",div:""}, | |
240 | + {titulo:$trad("ativo",i3GEOadmin.usuarios.dicionario),id:"",size:"50",value:i.ativo,tipo:"text",div:"<div id=cAtivo ></div>"} | |
241 | 241 | ] |
242 | 242 | }; |
243 | 243 | var ins = ""; |
... | ... | @@ -246,8 +246,8 @@ function montaDivUsuario(i){ |
246 | 246 | $i("editor_bd").innerHTML = ins; |
247 | 247 | if($i("cAtivo")){ |
248 | 248 | temp = "<select id='Eativo' >"; |
249 | - temp += "<option value='1' >Sim</option>"; | |
250 | - temp += "<option value='0' >Não</option>"; | |
249 | + temp += "<option value='1' >"+ $trad("sim2",i3GEOadmin.core.dicionario) +"</option>"; | |
250 | + temp += "<option value='0' >"+ $trad("nao2",i3GEOadmin.core.dicionario) +"</option>"; | |
251 | 251 | temp += "</select>"; |
252 | 252 | $i("cAtivo").innerHTML = temp; |
253 | 253 | $i("Eativo").value = i.ativo; |
... | ... | @@ -272,7 +272,7 @@ Exclui um elemento do atlas |
272 | 272 | */ |
273 | 273 | function excluir(tipo,id_usuario,id_papel) |
274 | 274 | { |
275 | - var mensagem = " excluindo o registro do usuário= "+id_usuario; | |
275 | + var mensagem = $trad("msgExcluiUsuario",i3GEOadmin.usuarios.dicionario)+id_usuario; | |
276 | 276 | var no = null; |
277 | 277 | var sUrl = null; |
278 | 278 | if(tipo == "usuario") { |
... | ... | @@ -297,7 +297,7 @@ function emailsenha(id_usuario) |
297 | 297 | success:function(o){ |
298 | 298 | try { |
299 | 299 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { |
300 | - core_carregando("<span style=color:red >Não foi possível enviar"); | |
300 | + core_carregando("<span style=color:red >"+ $trad("msgNaoEnvia",i3GEOadmin.usuarios.dicionario) +""); | |
301 | 301 | setTimeout("core_carregando('desativa')",3000); |
302 | 302 | } |
303 | 303 | else{ |
... | ... | @@ -310,7 +310,7 @@ function emailsenha(id_usuario) |
310 | 310 | argument: { foo:"foo", bar:"bar" } |
311 | 311 | }; |
312 | 312 | core_carregando("ativa"); |
313 | - core_carregando("Enviando e-mail"); | |
313 | + core_carregando($trad("msgEnvia",i3GEOadmin.usuarios.dicionario)); | |
314 | 314 | var sUrl = "../php/usuarios.php?funcao=enviarSenhaEmail&id_usuario="+id_usuario; |
315 | 315 | core_makeRequest(sUrl,callback,'POST'); |
316 | 316 | } |
... | ... | @@ -347,7 +347,7 @@ function gravaDados(tipo,id) |
347 | 347 | success:function(o){ |
348 | 348 | try { |
349 | 349 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { |
350 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem menus vinculados a este tema</span>"); | |
350 | + core_carregando("<span style=color:red >"+ $trad("msgNaoExclui",i3GEOadmin.usuarios.dicionario) +"</span>"); | |
351 | 351 | setTimeout("core_carregando('desativa')",3000); |
352 | 352 | } |
353 | 353 | else{ |
... | ... | @@ -373,7 +373,7 @@ function gravaDados(tipo,id) |
373 | 373 | }; |
374 | 374 | if(prog && par){ |
375 | 375 | core_carregando("ativa"); |
376 | - core_carregando(" gravando o registro do id= "+id); | |
376 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); | |
377 | 377 | var sUrl = prog+par; |
378 | 378 | core_makeRequest(sUrl,callback,'POST'); |
379 | 379 | } | ... | ... |
admin/js/webservices.js
... | ... | @@ -44,18 +44,18 @@ i3GEOadmin.webservices = { |
44 | 44 | elCell.innerHTML = "<pre ><p style=cursor:default >" + oData + "</pre>"; |
45 | 45 | }, |
46 | 46 | formatExclui: function(elCell, oRecord, oColumn){ |
47 | - elCell.innerHTML = "<div title='exclui' class=excluir style='text-align:center' ></div>"; | |
47 | + elCell.innerHTML = "<div title="+ $trad("excluiTitulo",i3GEOadmin.core.dicionario) +" class=excluir style='text-align:center' ></div>"; | |
48 | 48 | }, |
49 | 49 | formatMais: function(elCell, oRecord, oColumn){ |
50 | - elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
50 | + elCell.innerHTML = "<div class="+ $trad("editar",i3GEOadmin.core.dicionario) +" style='text-align:center' ></div>"; | |
51 | 51 | }, |
52 | 52 | defColunas: function(){ |
53 | 53 | return [ |
54 | - {key:"excluir",label:"excluir",formatter:i3GEOadmin.webservices.formatExclui}, | |
55 | - {key:"mais",label:"editar",formatter:i3GEOadmin.webservices.formatMais}, | |
54 | + {key:"excluir",label:$trad("excluir",i3GEOadmin.core.dicionario),formatter:i3GEOadmin.webservices.formatExclui}, | |
55 | + {key:"mais",label:$trad("editar",i3GEOadmin.core.dicionario),formatter:i3GEOadmin.webservices.formatMais}, | |
56 | 56 | {label:"id",key:"id_ws", formatter:i3GEOadmin.webservices.formatTexto}, |
57 | - {label:"nome",resizeable:true,key:"nome_ws", formatter:i3GEOadmin.webservices.formatTexto}, | |
58 | - {label:"tipo",resizeable:true,key:"tipo_ws", formatter:i3GEOadmin.webservices.formatTexto} | |
57 | + {label:$trad("nome",i3GEOadmin.core.dicionario),resizeable:true,key:"nome_ws", formatter:i3GEOadmin.webservices.formatTexto}, | |
58 | + {label:$trad("tipo",i3GEOadmin.webservices.dicionario),resizeable:true,key:"tipo_ws", formatter:i3GEOadmin.webservices.formatTexto} | |
59 | 59 | ]; |
60 | 60 | }, |
61 | 61 | /* |
... | ... | @@ -85,7 +85,7 @@ i3GEOadmin.webservices = { |
85 | 85 | tipows = u[1]; |
86 | 86 | } |
87 | 87 | catch(e){tipows = "";} |
88 | - core_pegaDados("buscando endereços...","../php/webservices.php?funcao=pegaWS&tipows="+tipows,"i3GEOadmin.webservices.tabela"); | |
88 | + core_pegaDados($trad("msgBuscaEndereco",i3GEOadmin.webservices.dicionario),"../php/webservices.php?funcao=pegaWS&tipows="+tipows,"i3GEOadmin.webservices.tabela"); | |
89 | 89 | }, |
90 | 90 | tabela: function(dados){ |
91 | 91 | if(i3GEOadmin.webservices.dados == ""){ |
... | ... | @@ -123,7 +123,7 @@ i3GEOadmin.webservices = { |
123 | 123 | } |
124 | 124 | if (column.key == 'mais'){ |
125 | 125 | core_carregando("ativa"); |
126 | - core_carregando("buscando dados..."); | |
126 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); | |
127 | 127 | $clicouId = registro.getData('id_ws'); |
128 | 128 | $recordid = registro.getId(); |
129 | 129 | sUrl = "../php/webservices.php?funcao=pegaDados&id_ws="+$clicouId; |
... | ... | @@ -155,7 +155,7 @@ i3GEOadmin.webservices = { |
155 | 155 | var editorBotoes,ins, |
156 | 156 | novoel = document.createElement("div"); |
157 | 157 | novoel.id = "janela_editor2"; |
158 | - ins = '<div class="hd">Editor</div>'; | |
158 | + ins = '<div class="hd">'+ $trad("editor",i3GEOadmin.core.dicionario) +'</div>'; | |
159 | 159 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
160 | 160 | ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>"; |
161 | 161 | ins += "<div id='letras_W'></div>"; |
... | ... | @@ -164,8 +164,8 @@ i3GEOadmin.webservices = { |
164 | 164 | document.body.appendChild(novoel); |
165 | 165 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
166 | 166 | editorBotoes.addButtons([ |
167 | - { label: "Salva", value: "OK", checked: false}, | |
168 | - { label: "Cancela", value: "CANCEL", checked: false } | |
167 | + { label: $trad("salva1",i3GEOadmin.core.dicionario), value: "OK", checked: false}, | |
168 | + { label: $trad("cancela",i3GEOadmin.core.dicionario), value: "CANCEL", checked: false } | |
169 | 169 | ]); |
170 | 170 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
171 | 171 | YAHOO.webservices.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { modal:true,fixedcenter:true,close:false,width:"400px", height:"480px",overflow:"auto", visible:false,constraintoviewport:true } ); |
... | ... | @@ -178,16 +178,16 @@ i3GEOadmin.webservices = { |
178 | 178 | formulario: function(i){ |
179 | 179 | var param = { |
180 | 180 | "linhas":[ |
181 | - {titulo:"Nome:",id:"Enome_ws",size:"50",value:i.nome_ws,tipo:"text",div:""}, | |
182 | - {titulo:"Descrição:",id:"Edesc_ws",size:"50",value:i.desc_ws,tipo:"text",div:""}, | |
183 | - {titulo:"Autor:",id:"Eautor_ws",size:"50",value:i.autor_ws,tipo:"text",div:""}, | |
184 | - {titulo:"Endereço:",id:"Elink_ws",size:"50",value:i.link_ws,tipo:"text",div:""} | |
181 | + {titulo:$trad("nome",i3GEOadmin.webservices.dicionario),id:"Enome_ws",size:"50",value:i.nome_ws,tipo:"text",div:""}, | |
182 | + {titulo:$trad("descricao",i3GEOadmin.webservices.dicionario),id:"Edesc_ws",size:"50",value:i.desc_ws,tipo:"text",div:""}, | |
183 | + {titulo:$trad("autor",i3GEOadmin.webservices.dicionario),id:"Eautor_ws",size:"50",value:i.autor_ws,tipo:"text",div:""}, | |
184 | + {titulo:$trad("endereco",i3GEOadmin.webservices.dicionario),id:"Elink_ws",size:"50",value:i.link_ws,tipo:"text",div:""} | |
185 | 185 | ] |
186 | 186 | }; |
187 | 187 | var ins = ""; |
188 | 188 | ins += core_geraLinhas(param); |
189 | 189 | |
190 | - ins += "<p>Tipo:<br>"; | |
190 | + ins += "<p>"+ $trad("tipo1",i3GEOadmin.webservices.dicionario) +"<br>"; | |
191 | 191 | ins += "<select id='Etipo_ws' />"; |
192 | 192 | ins += "<option value='' "; |
193 | 193 | if (i.tipo_ws == ""){ins += "selected";} |
... | ... | @@ -231,7 +231,7 @@ i3GEOadmin.webservices = { |
231 | 231 | tipows = u[1]; |
232 | 232 | } |
233 | 233 | catch(e){tipows = "";} |
234 | - core_pegaDados("buscando endereços...","../php/webservices.php?funcao=pegaWS&tipows="+tipows,"i3GEOadmin.webservices.atualizaFiltro"); | |
234 | + core_pegaDados($trad("msgBuscaEndereco",i3GEOadmin.webservices.dicionario),"../php/webservices.php?funcao=pegaWS&tipows="+tipows,"i3GEOadmin.webservices.atualizaFiltro"); | |
235 | 235 | return; |
236 | 236 | } |
237 | 237 | var i,temp, |
... | ... | @@ -252,7 +252,7 @@ i3GEOadmin.webservices = { |
252 | 252 | i3GEOadmin.webservices.tabela(novo); |
253 | 253 | }, |
254 | 254 | exclui: function(id,row){ |
255 | - var mensagem = " excluindo o registro do id= "+id, | |
255 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id, | |
256 | 256 | sUrl = "../php/webservices.php?funcao=excluir&id="+id; |
257 | 257 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.webservices.dataTable); |
258 | 258 | i3GEOadmin.webservices.dados = ""; |
... | ... | @@ -270,13 +270,13 @@ i3GEOadmin.webservices = { |
270 | 270 | } |
271 | 271 | par += "&id_ws="+id; |
272 | 272 | core_carregando("ativa"); |
273 | - core_carregando(" gravando o registro do id= "+id); | |
273 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); | |
274 | 274 | sUrl = "../php/webservices.php?funcao=alterarWS"+par; |
275 | 275 | callback = { |
276 | 276 | success:function(o){ |
277 | 277 | try { |
278 | 278 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { |
279 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem registros vinculados</span>"); | |
279 | + core_carregando("<span style=color:red >"+ $trad("msgErroExclui",i3GEOadmin.core.dicionario) +"</span>"); | |
280 | 280 | setTimeout("core_carregando('desativa')",3000); |
281 | 281 | } |
282 | 282 | else{ |
... | ... | @@ -293,4 +293,4 @@ i3GEOadmin.webservices = { |
293 | 293 | }; |
294 | 294 | core_makeRequest(sUrl,callback); |
295 | 295 | } |
296 | -}; | |
297 | 296 | \ No newline at end of file |
297 | +}; | ... | ... |
admin/php/metaestat_uploadshp_submit.php
... | ... | @@ -51,17 +51,28 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ |
51 | 51 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shp"); |
52 | 52 | if($status != 1) |
53 | 53 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHP";exit;} |
54 | + | |
54 | 55 | $Arquivo = $_FILES['i3GEOuploadshx']['tmp_name']; |
55 | 56 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shx"); |
56 | 57 | if($status != 1) |
57 | 58 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHX";exit;} |
59 | + | |
58 | 60 | $Arquivo = $_FILES['i3GEOuploaddbf']['tmp_name']; |
59 | 61 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".dbf"); |
60 | 62 | if($status != 1) |
61 | 63 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo DBF";exit;} |
62 | 64 | |
63 | - if(!file_exists($dir_tmp."/".$nomePrefixo.".shp")) | |
64 | - {echo "<p class='paragrafo' >Ocorreu algum problema no envio do arquivo ".$dir_tmp."/".$nomePrefixo;paraAguarde();exit;} | |
65 | + if($_FILES['i3GEOuploadprj']['tmp_name'] != ""){ | |
66 | + $Arquivo = $_FILES['i3GEOuploadprj']['tmp_name']; | |
67 | + $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".prj"); | |
68 | + if($status != 1){ | |
69 | + echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo PRJ";exit; | |
70 | + } | |
71 | + } | |
72 | + if(!file_exists($dir_tmp."/".$nomePrefixo.".shp")){ | |
73 | + echo "<p class='paragrafo' >Ocorreu algum problema no envio do arquivo ".$dir_tmp."/".$nomePrefixo;paraAguarde(); | |
74 | + exit; | |
75 | + } | |
65 | 76 | $arqshp = $dir_tmp."/".$nomePrefixo.".shp"; |
66 | 77 | |
67 | 78 | //pega os parametros de conexao |
... | ... | @@ -75,6 +86,9 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ |
75 | 86 | $mapObj = ms_newMapObjFromString("MAP END"); |
76 | 87 | $layer = ms_newLayerObj($mapObj); |
77 | 88 | $layer->set("data",$arqshp); |
89 | + if(file_exists($dir_tmp."/".$nomePrefixo.".prj")){ | |
90 | + $layer->setprojection("AUTO"); | |
91 | + } | |
78 | 92 | $layer->open(); |
79 | 93 | $colunasTemp = $layer->getItems(); |
80 | 94 | $colunas = array(); |
... | ... | @@ -190,8 +204,30 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ |
190 | 204 | sleep(1); |
191 | 205 | $srid = 4326; |
192 | 206 | $escapar = "'"; |
207 | + $projOutObj = ""; | |
208 | + $projInObj = ""; | |
209 | + // | |
210 | + //caso o usuario tenha definido a projecao de saida, os dados devem ser projetados | |
211 | + // | |
212 | + if($_POST["outsrid"] != ""){ | |
213 | + $mapObj->setProjection("init=epsg:".$_POST["outsrid"]); | |
214 | + $prjMapa = $mapObj->getProjection(); | |
215 | + $prjTema = $layer->getProjection(); | |
216 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | |
217 | + { | |
218 | + $projInObj = ms_newprojectionobj($prjTema); | |
219 | + $projOutObj = ms_newprojectionobj($prjMapa); | |
220 | + } | |
221 | + } | |
222 | + | |
193 | 223 | for ($i=0; $i<$numshapes;$i++){ |
194 | 224 | $s = $layer->getShape(new resultObj($i)); |
225 | + //projeta o shape se existir .prj | |
226 | + if($_FILES['i3GEOuploadprj']['tmp_name'] != "" && $projInObj != ""){ | |
227 | + $s->project($projInObj, $projOutObj); | |
228 | + //para nao projetar com postgis | |
229 | + $_POST["insrid"] = $_POST["outsrid"]; | |
230 | + } | |
195 | 231 | $vs = array(); |
196 | 232 | |
197 | 233 | foreach($colunas as $coluna){ | ... | ... |
admin/principal.html
... | ... | @@ -6,11 +6,21 @@ |
6 | 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
7 | 7 | <link rel="stylesheet" type="text/css" href="../css/input.css"> |
8 | 8 | <link rel="stylesheet" type="text/css" href="html/admin.css"> |
9 | +<style> | |
10 | +body, td { | |
11 | + padding-top: 0px; | |
12 | + COLOR: #2F4632; | |
13 | + font-family: Verdana, Arial, Helvetica, sans-serif; | |
14 | + background-color: rgb(250, 250, 250); | |
15 | + margin: auto; | |
16 | + font-size: 12px; | |
17 | +} | |
18 | +</style> | |
9 | 19 | <script type="text/javascript" src="js/core.js"></script> |
10 | 20 | <script type="text/javascript" src="dicionario/core.js"></script> |
11 | 21 | <script type="text/javascript" src="dicionario/principal.js"></script> |
12 | 22 | </head> |
13 | -<body class=" yui-skin-sam fundoPonto"> | |
23 | +<body class=" yui-skin-sam"> | |
14 | 24 | <center> |
15 | 25 | <div class="bordaSuperior"> </div> |
16 | 26 | <div class="mascaraPrincipal" id="divGeral"> | ... | ... |
classesphp/classe_analise.php
... | ... | @@ -1274,8 +1274,7 @@ class Analise |
1274 | 1274 | $layerdestino->close(); |
1275 | 1275 | $rect = $this->mapa->extent; |
1276 | 1276 | $projInObj = $layerorigem->getProjection(); |
1277 | - if ($projInObj == "") | |
1278 | - { | |
1277 | + if ($projInObj == ""){ | |
1279 | 1278 | $projInObj = ms_newprojectionobj("proj=longlat,ellps=WGS84,datum=WGS84,no_defs"); |
1280 | 1279 | } |
1281 | 1280 | $projOutObj = ms_newprojectionobj("proj=poly,ellps=GRS67,lat_0=".$rect->miny.",lon_0=".$rect->minx.",x_0=5000000,y_0=10000000"); |
... | ... | @@ -1291,12 +1290,11 @@ class Analise |
1291 | 1290 | $def[] = array("dist_m","N","10","2"); |
1292 | 1291 | $def[] = array("origem","C","255"); |
1293 | 1292 | $def[] = array("destino","C","255"); |
1294 | - if($this->dbaseExiste == false) | |
1295 | - { | |
1293 | + if($this->dbaseExiste == false){ | |
1296 | 1294 | $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); |
1297 | 1295 | } |
1298 | - else | |
1299 | - {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); | |
1296 | + else{ | |
1297 | + $db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); | |
1300 | 1298 | } |
1301 | 1299 | //acrescenta os pontos no novo shapefile |
1302 | 1300 | $dbname = $nomeshp.".dbf"; |
... | ... | @@ -1304,26 +1302,23 @@ class Analise |
1304 | 1302 | $db=xbase_open($dbname,2); |
1305 | 1303 | else |
1306 | 1304 | $db=dbase_open($dbname,2); |
1307 | - foreach ($shapesorigem as $sorigem) | |
1308 | - { | |
1309 | - if($itemorigem != "") | |
1310 | - { | |
1305 | + foreach ($shapesorigem as $sorigem){ | |
1306 | + if($itemorigem != ""){ | |
1311 | 1307 | $valororigem = $sorigem->values[$itemorigem]; |
1312 | 1308 | } |
1313 | - else | |
1314 | - {$valororigem = ""; | |
1309 | + else{ | |
1310 | + $valororigem = ""; | |
1315 | 1311 | } |
1316 | 1312 | foreach ($shapesdestino as $sdestino) |
1317 | 1313 | { |
1318 | 1314 | $linha = ms_newLineObj(); |
1319 | 1315 | $linha->add($sorigem->getCentroid()); |
1320 | 1316 | $linha->add($sdestino->getCentroid()); |
1321 | - if($itemdestino != "") | |
1322 | - { | |
1317 | + if($itemdestino != ""){ | |
1323 | 1318 | $valordestino = $sdestino->values[$itemdestino]; |
1324 | 1319 | } |
1325 | - else | |
1326 | - {$valordestino = ""; | |
1320 | + else{ | |
1321 | + $valordestino = ""; | |
1327 | 1322 | } |
1328 | 1323 | $ShapeObj = ms_newShapeObj(MS_SHAPE_LINE); |
1329 | 1324 | $ShapeObj->add($linha); |
... | ... | @@ -1619,7 +1614,7 @@ class Analise |
1619 | 1614 | $nomeCentroides = nomeRandomico(); |
1620 | 1615 | $nomeshp = $this->diretorio."/".$nomeCentroides; |
1621 | 1616 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); |
1622 | - | |
1617 | + | |
1623 | 1618 | //$shapes = $shape[0]; |
1624 | 1619 | foreach($shapes as $shape){ |
1625 | 1620 | $LineObj = ms_newLineObj(); | ... | ... |
classesphp/classe_atributos.php
... | ... | @@ -127,7 +127,7 @@ class Atributos |
127 | 127 | } |
128 | 128 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
129 | 129 | $this->projO = $this->mapa->getProjection(); |
130 | - $this->mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
130 | + $this->mapa->setProjection(pegaProjecaoDefault("proj4")); | |
131 | 131 | } |
132 | 132 | } |
133 | 133 | } |
... | ... | @@ -2382,7 +2382,7 @@ class Atributos |
2382 | 2382 | } |
2383 | 2383 | $conta = $conta + 1; |
2384 | 2384 | } |
2385 | - | |
2385 | + | |
2386 | 2386 | if($wkt == "sim"){ |
2387 | 2387 | $arraytemp = array( |
2388 | 2388 | "alias"=>"wkt", | ... | ... |
classesphp/classe_mapa.php
... | ... | @@ -1787,7 +1787,8 @@ class Mapa |
1787 | 1787 | // adiciona os parametros no nivel do mapa |
1788 | 1788 | $this->mapa->setmetadata("wms_title","i3Geo"); |
1789 | 1789 | $this->mapa->setmetadata("wms_onlineresource","http://".$h.$nomeurl); |
1790 | - $this->mapa->setmetadata("wms_srs","EPSG:4618"); | |
1790 | + $projecao = pegaProjecaoDefault("epsg"); | |
1791 | + $this->mapa->setmetadata("wms_srs","EPSG:".$projecao); | |
1791 | 1792 | $this->mapa->setmetadata("wms_getcontext_enabled","1"); |
1792 | 1793 | foreach ($this->layers as $layer) |
1793 | 1794 | { |
... | ... | @@ -2213,10 +2214,10 @@ class Mapa |
2213 | 2214 | function converteInterfacePara($interface){ |
2214 | 2215 | if($interface == "openlayers"){ |
2215 | 2216 | $prefixo = "ol"; |
2216 | - $this->mapa->setProjection("+proj=longlat +ellps=GRS67 +no_defs"); | |
2217 | + $this->mapa->setProjection(pegaProjecaoDefault("proj4")); | |
2217 | 2218 | } |
2218 | - else | |
2219 | - {$prefixo = "gm"; | |
2219 | + else{ | |
2220 | + $prefixo = "gm"; | |
2220 | 2221 | } |
2221 | 2222 | foreach($this->layers as $l){ |
2222 | 2223 | $opacidadeM = $l->getmetadata($prefixo."opacity"); | ... | ... |
classesphp/classe_selecao.php
... | ... | @@ -124,7 +124,7 @@ $ext - extens&atilde;o geogr&aacute;fica do mapa |
124 | 124 | } |
125 | 125 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
126 | 126 | $this->projO = $this->mapa->getProjection(); |
127 | - $this->mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
127 | + $this->mapa->setProjection(pegaProjecaoDefault("proj4")); | |
128 | 128 | } |
129 | 129 | } |
130 | 130 | /* |
... | ... | @@ -789,8 +789,11 @@ $dir_tmp - localiza&ccedil;&atilde;o do diret&oacute;rio tempor&aacute;rio |
789 | 789 | { |
790 | 790 | if(!$this->layer){return "erro";} |
791 | 791 | $this->layer->setfilter(""); |
792 | - $nomeshp = criaSHP($this->nome,$this->arquivo,$locaplic,$dir_tmp); | |
792 | + $nomeshp = criaSHP($this->nome,$this->arquivo,$locaplic,$dir_tmp,true,"",false); | |
793 | 793 | $novolayer = criaLayer($this->mapa,$this->layer->type,MS_DEFAULT,"Seleção de ".(pegaNome($this->layer))." (".$this->nome.")",$metaClasse="SIM"); |
794 | + if($this->layer->getprojection() != ""){ | |
795 | + $novolayer->setprojection($this->layer->getprojection()); | |
796 | + } | |
794 | 797 | $novolayer->set("data",$nomeshp.".shp"); |
795 | 798 | $novolayer->set("name",basename($nomeshp)); |
796 | 799 | $down = "nao"; | ... | ... |
classesphp/classe_shp.php
... | ... | @@ -257,7 +257,9 @@ $projecao - codigo epsg da proje&ccedil;&atilde;o das coordenadas |
257 | 257 | $poPoint->setXY($xy[$i],$xy[$i+1]); |
258 | 258 | if($projecao != "") |
259 | 259 | { |
260 | - $projOutObj = ms_newprojectionobj("proj=longlat,ellps=WGS84,datum=WGS84,no_defs"); | |
260 | + //$projOutObj = ms_newprojectionobj("proj=longlat,ellps=WGS84,datum=WGS84,no_defs"); | |
261 | + $pmap = pegaProjecaoDefault("proj4"); | |
262 | + $projOutObj = ms_newprojectionobj($pmap); | |
261 | 263 | $projInObj = ms_newprojectionobj("init=epsg:".$projecao); |
262 | 264 | $poPoint->project($projInObj, $projOutObj); |
263 | 265 | } | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -425,7 +425,7 @@ Calcula a extens&atilde;o geogr&aacute;fica de um tema e ajusta o mapa para essa |
425 | 425 | if(!$this->layer){return "erro";} |
426 | 426 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
427 | 427 | $projO = $this->mapa->getProjection(); |
428 | - $this->mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
428 | + $this->mapa->setProjection(pegaProjecaoDefault("proj4")); | |
429 | 429 | } |
430 | 430 | $prjMapa = ""; |
431 | 431 | $prjTema = ""; |
... | ... | @@ -829,7 +829,7 @@ $wkt - boolean indicando se $xy e um WKT |
829 | 829 | $c = $shp->getCentroid(); |
830 | 830 | $c = $c->x; |
831 | 831 | if($c > -181 && $c < 181){ |
832 | - $pinlayer->setprojection("proj=latlong,a=6378137,b=6378137"); | |
832 | + $pinlayer->setprojection(pegaProjecaoDefault("proj4")); | |
833 | 833 | } |
834 | 834 | else{ |
835 | 835 | $pinlayer->setprojection($this->mapa->getProjection()); |
... | ... | @@ -1080,7 +1080,8 @@ Calcula a extens&atilde;o geogr&aacute;fica dos elementos selecionados de um tem |
1080 | 1080 | if(!$this->layer){return "erro";} |
1081 | 1081 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
1082 | 1082 | $projO = $this->mapa->getProjection(); |
1083 | - $this->mapa->setProjection("init=epsg:4291"); | |
1083 | + $projecao = pegaProjecaoDefault("epsg"); | |
1084 | + $this->mapa->setProjection("init=epsg:".$projecao); | |
1084 | 1085 | } |
1085 | 1086 | $extatual = $this->mapa->extent; |
1086 | 1087 | $prjMapa = $this->mapa->getProjection(); | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -716,7 +716,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") |
716 | 716 | $i = $interface; |
717 | 717 | } |
718 | 718 | if($i == "googlemaps"){ |
719 | - $objMapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
719 | + $objMapa->setProjection(pegaProjecaoDefault("proj4")); | |
720 | 720 | } |
721 | 721 | if($ext && $ext != ""){ |
722 | 722 | $e = explode(" ",$ext); |
... | ... | @@ -769,7 +769,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") |
769 | 769 | $s = "var refimagem='".$nomer."';var refwidth=".$w.";var refheight=".$h.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; |
770 | 770 | $mapa = ms_newMapObj($map_file); |
771 | 771 | if($i == "googlemaps"){ |
772 | - $mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
772 | + $mapa->setProjection(pegaProjecaoDefault("proj4")); | |
773 | 773 | } |
774 | 774 | $ref = $mapa->reference; |
775 | 775 | $r = $ref->extent; |
... | ... | @@ -1395,11 +1395,15 @@ $dir_tmp {string} - Diret&oacute;rio tempor&aacute;rio |
1395 | 1395 | |
1396 | 1396 | $nomeRand {boleano} - Gera um nome randomico para o shapefile (TRUE) ou utiliza o nome do tema (FALSE) |
1397 | 1397 | |
1398 | +$prj {string} - String que sera gravada no arquivo prj | |
1399 | + | |
1400 | +$projetaToMap {boolean} - Projeta os shapes para a projecao do mapa | |
1401 | + | |
1398 | 1402 | Retorno: |
1399 | 1403 | |
1400 | 1404 | {string} - nome do arquivo criado ou false se ocorrer erro |
1401 | 1405 | */ |
1402 | -function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | |
1406 | +function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE,$prj="",$projetaToMap=true) | |
1403 | 1407 | { |
1404 | 1408 | $versao = versao(); |
1405 | 1409 | $versao = $versao["principal"]; |
... | ... | @@ -1412,24 +1416,42 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1412 | 1416 | } |
1413 | 1417 | $map = @ms_newMapObj($map_file); |
1414 | 1418 | $layer = $map->getlayerbyname($tema); |
1419 | + //e necessario abrir ou nao vai projetar | |
1420 | + $layer->open(); | |
1421 | + $prjMapa = $map->getProjection(); | |
1422 | + $prjTema = $layer->getProjection(); | |
1423 | + if($prjTema != ""){ | |
1424 | + $projInObj = new projectionObj($prjTema); | |
1425 | + $projOutObj = new projectionObj($prjMapa); | |
1426 | + } | |
1427 | + else{ | |
1428 | + $projInObj = ""; | |
1429 | + $projOutObj = ""; | |
1430 | + $projetaToMap = false; | |
1431 | + } | |
1415 | 1432 | |
1416 | 1433 | $layer->set("template","none.htm"); |
1417 | 1434 | $diretorio = dirname($dir_tmp); |
1418 | 1435 | $tipol = MS_SHP_POINT; |
1419 | - if ($layer->type == MS_LAYER_LINE) | |
1420 | - {$tipol = MS_SHP_ARC;} | |
1421 | - if ($layer->type == MS_LAYER_POLYGON) | |
1422 | - {$tipol = MS_SHP_POLYGON;} | |
1423 | - if ($nomeRand == true) | |
1424 | - {$novonomelayer = $tema."_".nomeRandomico(5);} | |
1425 | - else | |
1426 | - {$novonomelayer = $tema;} | |
1436 | + if ($layer->type == MS_LAYER_LINE){ | |
1437 | + $tipol = MS_SHP_ARC; | |
1438 | + } | |
1439 | + if ($layer->type == MS_LAYER_POLYGON){ | |
1440 | + $tipol = MS_SHP_POLYGON; | |
1441 | + } | |
1442 | + if ($nomeRand == true){ | |
1443 | + $novonomelayer = $tema."_".nomeRandomico(5); | |
1444 | + } | |
1445 | + else{ | |
1446 | + $novonomelayer = $tema; | |
1447 | + } | |
1427 | 1448 | |
1428 | 1449 | $novonomelayer = str_replace(".","-",$novonomelayer); |
1429 | 1450 | $nomeshp = $dir_tmp."/".$novonomelayer; |
1430 | 1451 | |
1431 | - if(file_exists($nomeshp.".shp")) | |
1432 | - {return $nomeshp;} | |
1452 | + if(file_exists($nomeshp.".shp")){ | |
1453 | + return $nomeshp; | |
1454 | + } | |
1433 | 1455 | |
1434 | 1456 | $novoshpf = ms_newShapefileObj($nomeshp, $tipol); |
1435 | 1457 | |
... | ... | @@ -1461,9 +1483,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1461 | 1483 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
1462 | 1484 | $novoshpf->addShape($shape); |
1463 | 1485 | $resultadoFinal = true; |
1486 | + | |
1464 | 1487 | } |
1465 | 1488 | else{ |
1466 | - $shapesSel = retornaShapesSelecionados($layer,$map_file,$map); | |
1489 | + $shapesSel = retornaShapesSelecionados($layer,$map_file,$map,false); | |
1467 | 1490 | $items = pegaItens($layer); |
1468 | 1491 | // cria o dbf |
1469 | 1492 | $def = array(); |
... | ... | @@ -1477,10 +1500,12 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1477 | 1500 | $def[] = array($temp,"C","254"); |
1478 | 1501 | $cni = $cni + 1; |
1479 | 1502 | } |
1480 | - if(!function_exists("dbase_create")) | |
1481 | - {$db = xbase_create($nomeshp.".dbf", $def);} | |
1482 | - else | |
1483 | - {$db = dbase_create($nomeshp.".dbf", $def);} | |
1503 | + if(!function_exists("dbase_create")){ | |
1504 | + $db = xbase_create($nomeshp.".dbf", $def); | |
1505 | + } | |
1506 | + else{ | |
1507 | + $db = dbase_create($nomeshp.".dbf", $def); | |
1508 | + } | |
1484 | 1509 | $dbname = $nomeshp.".dbf"; |
1485 | 1510 | $reg = array(); |
1486 | 1511 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
... | ... | @@ -1489,8 +1514,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1489 | 1514 | if ($res_count > 0){ |
1490 | 1515 | for ($i = 0; $i < $res_count; ++$i){ |
1491 | 1516 | $shape = $shapesSel[$i]; |
1492 | - foreach ($items as $ni) | |
1493 | - { | |
1517 | + if($projetaToMap == true){ | |
1518 | + $shape->project($projInObj, $projOutObj); | |
1519 | + } | |
1520 | + foreach ($items as $ni){ | |
1494 | 1521 | $vreg = $shape->values[$ni]; |
1495 | 1522 | if(strlen($vreg) > 255){ |
1496 | 1523 | $vreg = substr($vreg,0,255); |
... | ... | @@ -1508,7 +1535,6 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1508 | 1535 | xbase_close($db); |
1509 | 1536 | else |
1510 | 1537 | dbase_close($db); |
1511 | - $layer->close(); | |
1512 | 1538 | // |
1513 | 1539 | //verifica a quantidade de registros no final |
1514 | 1540 | // |
... | ... | @@ -1533,16 +1559,34 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1533 | 1559 | {unlink($nomeshp.".shp");} |
1534 | 1560 | if(file_exists($nomeshp.".shx")) |
1535 | 1561 | {unlink($nomeshp.".shx");} |
1562 | + if(file_exists($nomeshp.".prj")) | |
1563 | + {unlink($nomeshp.".prj");} | |
1536 | 1564 | $resultadoFinal = false; |
1537 | 1565 | } |
1538 | 1566 | } |
1539 | - else | |
1540 | - {$resultadoFinal = false;} | |
1567 | + else{ | |
1568 | + $resultadoFinal = false; | |
1569 | + } | |
1570 | + } | |
1571 | + if($resultadoFinal == false){ | |
1572 | + return false; | |
1573 | + } | |
1574 | + else{ | |
1575 | + //gera o arquivo prj | |
1576 | + if($prj != ""){ | |
1577 | + gravaDados(array($prj),$nomeshp.".prj"); | |
1578 | + } | |
1579 | + //se prj for vazio mas existir o arquivo prj original e a projecao do shape nao estiver ativa | |
1580 | + //copia o arquivo prj original se existir | |
1581 | + elseif ($projetaToMap == false){ | |
1582 | + $nomePrjOriginal = str_replace(".shp",".prj",$layer->data); | |
1583 | + $nomeDestino = $nomeshp.".prj"; | |
1584 | + if(file_exists($nomePrjOriginal) && !file_exists($nomeDestino)){ | |
1585 | + copy($nomePrjOriginal,$nomeDestino); | |
1586 | + } | |
1587 | + } | |
1588 | + return $nomeshp; | |
1541 | 1589 | } |
1542 | - if($resultadoFinal == false) | |
1543 | - {return false;} | |
1544 | - else | |
1545 | - {return $nomeshp;} | |
1546 | 1590 | } |
1547 | 1591 | /* |
1548 | 1592 | Function: downloadTema (depreciado) |
... | ... | @@ -1595,7 +1639,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1595 | 1639 | //cria o arquivo mapfile, caso ele não exista, que servirá de base para obtenção dos dados |
1596 | 1640 | // |
1597 | 1641 | $nomeRand = true; |
1598 | - //echo $versao;exit; | |
1642 | + $projecao = pegaProjecaoDefault(); | |
1599 | 1643 | if (($map_file == "") || (!@ms_newMapObj($map_file))){ //a funcao foi chamada do aplicativo datadownload |
1600 | 1644 | if($base == "" or !isset($base)){ |
1601 | 1645 | $base = ""; |
... | ... | @@ -1624,6 +1668,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1624 | 1668 | } |
1625 | 1669 | $map_tmp = ms_newMapObj($base); |
1626 | 1670 | $map_file = $dir_tmp."/".nomerandomico(20).".map"; |
1671 | + $map_tmp->setProjection($projecao["proj4"]); | |
1627 | 1672 | $map_tmp->save($map_file); |
1628 | 1673 | $nomeRand = false; |
1629 | 1674 | } |
... | ... | @@ -1750,6 +1795,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1750 | 1795 | unlink($nomeshp.".dbf"); |
1751 | 1796 | unlink($nomeshp.".shp"); |
1752 | 1797 | unlink($nomeshp.".shx"); |
1798 | + unlink($nomeshp.".prj"); | |
1753 | 1799 | } |
1754 | 1800 | } |
1755 | 1801 | // |
... | ... | @@ -1762,8 +1808,9 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1762 | 1808 | // |
1763 | 1809 | $nomecopia = $dir_tmp."/".basename($meta); |
1764 | 1810 | if(file_exists($meta)){ |
1765 | - if(!file_exists($nomecopia)) | |
1766 | - {copy($meta,$nomecopia);} | |
1811 | + if(!file_exists($nomecopia)){ | |
1812 | + copy($meta,$nomecopia); | |
1813 | + } | |
1767 | 1814 | } |
1768 | 1815 | $resultado[] = basename($dir_tmp)."/".basename($nomecopia); |
1769 | 1816 | } |
... | ... | @@ -1805,12 +1852,19 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1805 | 1852 | } |
1806 | 1853 | // |
1807 | 1854 | //se nao existir selecao seleciona por box |
1855 | + //o box vem do mapfile original | |
1808 | 1856 | // |
1809 | 1857 | if(!file_exists($sel->qyfile) || $numSel < 1){ |
1810 | 1858 | $box = $rectextent->minx." ".$rectextent->miny." ".$rectextent->maxx." ".$rectextent->maxy; |
1811 | 1859 | $sel->selecaoBOX("novo",$box); |
1860 | + //reaproveita arquivo anterior | |
1861 | + $nomeRand = false; | |
1862 | + } | |
1863 | + $nomeshp = criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand,$projecao["prj"]); | |
1864 | + //remove o arquivo de selecao se ele foi criado apenas para pegar todos os elementos | |
1865 | + if($nomeRand == false){ | |
1866 | + $sel->selecaoLimpa(); | |
1812 | 1867 | } |
1813 | - $nomeshp = criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand); | |
1814 | 1868 | if($nomeshp == false){ |
1815 | 1869 | return array("arquivos"=>"<span style=color:red >Ocorreu um erro, tente novamente","nreg"=>0); |
1816 | 1870 | } |
... | ... | @@ -1822,6 +1876,9 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1822 | 1876 | |
1823 | 1877 | $resultado[] = str_replace($radtmp."/","",$nomeshp).".dbf"; |
1824 | 1878 | $dataArquivos[] = date ("F d Y H:i:s.",filemtime($nomeshp.".dbf")); |
1879 | + | |
1880 | + $resultado[] = str_replace($radtmp."/","",$nomeshp).".prj"; | |
1881 | + $dataArquivos[] = date ("F d Y H:i:s.",filemtime($nomeshp.".prj")); | |
1825 | 1882 | } |
1826 | 1883 | } |
1827 | 1884 | } |
... | ... | @@ -1837,6 +1894,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
1837 | 1894 | if($db){$nreg = xbase_numrecords($db);} |
1838 | 1895 | } |
1839 | 1896 | } |
1897 | + | |
1840 | 1898 | // |
1841 | 1899 | //gera um mapfile para download |
1842 | 1900 | // |
... | ... | @@ -2475,17 +2533,17 @@ function retornaShapesMapext($objLayer,$objMapa){ |
2475 | 2533 | function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false){ |
2476 | 2534 | $shapes = array(); |
2477 | 2535 | $qyfile = dirname($map_file)."/".$objLayer->name.".php"; |
2478 | - | |
2479 | - if(!file_exists($qyfile)) | |
2480 | - {return $shapes;} | |
2536 | + if(!file_exists($qyfile)){ | |
2537 | + return $shapes; | |
2538 | + } | |
2481 | 2539 | |
2482 | 2540 | $handle = fopen ($qyfile, "r"); |
2483 | 2541 | $conteudo = fread ($handle, filesize ($qyfile)); |
2484 | 2542 | fclose ($handle); |
2485 | 2543 | $listaDeIndices = unserialize($conteudo); |
2486 | - //echo count($listaDeIndices);exit; | |
2487 | - if(count($listaDeIndices) == 0) | |
2488 | - {return $shapes;} | |
2544 | + if(count($listaDeIndices) == 0){ | |
2545 | + return $shapes; | |
2546 | + } | |
2489 | 2547 | |
2490 | 2548 | $versao = versao(); |
2491 | 2549 | $versao = $versao["principal"]; |
... | ... | @@ -2496,14 +2554,11 @@ function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false) |
2496 | 2554 | |
2497 | 2555 | $sopen = $objLayer->open(); |
2498 | 2556 | if($sopen == MS_FAILURE){return "erro";} |
2499 | - $objLayer->open(); | |
2500 | 2557 | $res_count = $objLayer->getNumresults(); |
2501 | 2558 | $centroides = array(); |
2502 | 2559 | $shapes = array(); |
2503 | 2560 | //pega um shape especifico |
2504 | - | |
2505 | - for ($i = 0; $i < $res_count; ++$i) | |
2506 | - { | |
2561 | + for ($i = 0; $i < $res_count; ++$i){ | |
2507 | 2562 | if($versao >= 6){ |
2508 | 2563 | $shape = $objLayer->getShape($objLayer->getResult($i)); |
2509 | 2564 | $shp_index = $shape->index; |
... | ... | @@ -2839,4 +2894,39 @@ function pegaDadosAdminKey($sql,$subsEsquema){ |
2839 | 2894 | return array(); |
2840 | 2895 | } |
2841 | 2896 | } |
2897 | +/* | |
2898 | + Function: pegaProjecaoDefault | |
2899 | + | |
2900 | +Retorna o array $i3GeoProjDefault definido em i3geo/ms_configura.php | |
2901 | + | |
2902 | +Se essa variavel nao existir, retorna o valor default baseado em EPSG:4326 | |
2903 | + | |
2904 | +Parametros: | |
2905 | + | |
2906 | +tipo {string} - se for vazio retorna todos os elementos do array. Se nao for vazio, usa $tipo como | |
2907 | +chave para retornar apenas o indice desejado (proj4, epsg, prj) | |
2908 | + | |
2909 | +Retorno: | |
2910 | + | |
2911 | +Array | |
2912 | +*/ | |
2913 | +function pegaProjecaoDefault($tipo=""){ | |
2914 | + global $i3GeoProjDefault; | |
2915 | + if(empty($i3GeoProjDefault) || !isset($i3GeoProjDefault)){ | |
2916 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
2917 | + } | |
2918 | + if(empty($i3GeoProjDefault) || !isset($i3GeoProjDefault)){ | |
2919 | + $i3GeoProjDefault = array( | |
2920 | + 'proj4' => '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ', | |
2921 | + 'epsg' => '4326', | |
2922 | + 'prj' => 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]' | |
2923 | + ); | |
2924 | + } | |
2925 | + if($tipo == ""){ | |
2926 | + return $i3GeoProjDefault; | |
2927 | + } | |
2928 | + else{ | |
2929 | + return $i3GeoProjDefault[$tipo]; | |
2930 | + } | |
2931 | +} | |
2842 | 2932 | ?> | ... | ... |
classesphp/mapa_inicia.php
... | ... | @@ -111,22 +111,26 @@ function iniciaMapa() |
111 | 111 | include_once("funcoes_gerais.php"); |
112 | 112 | } |
113 | 113 | validaAcessoTemas($map_file); |
114 | - if(!isset($kmlurl)) | |
115 | - {$kmlurl = "";} | |
114 | + if(!isset($kmlurl)){ | |
115 | + $kmlurl = ""; | |
116 | + } | |
116 | 117 | error_reporting(0); |
117 | - if(!isset($interface)){$interface = "";} | |
118 | + if(!isset($interface)){ | |
119 | + $interface = ""; | |
120 | + } | |
118 | 121 | if($interface == "openlayers"){ |
119 | 122 | $m = ms_newMapObj($map_file); |
120 | 123 | $e = $m->extent; |
121 | 124 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
122 | 125 | $c = $m->numlayers; |
123 | - for ($i=0;$i < $c;++$i) | |
124 | - { | |
126 | + for ($i=0;$i < $c;++$i){ | |
125 | 127 | $layer = $m->getlayer($i); |
126 | - if($layer->status == 2) | |
127 | - {$layer->setmetadata("olstatus","DEFAULT");} | |
128 | - else | |
129 | - {$layer->setmetadata("olstatus","OFF");} | |
128 | + if($layer->status == 2){ | |
129 | + $layer->setmetadata("olstatus","DEFAULT"); | |
130 | + } | |
131 | + else{ | |
132 | + $layer->setmetadata("olstatus","OFF"); | |
133 | + } | |
130 | 134 | $layer->setmetadata("olopacity",$layer->opacity); |
131 | 135 | } |
132 | 136 | $m->save($map_file); |
... | ... | @@ -137,7 +141,7 @@ function iniciaMapa() |
137 | 141 | $e = $m->extent; |
138 | 142 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
139 | 143 | if($interface == "googlemaps"){ |
140 | - $m->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m"); | |
144 | + $m->setProjection("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m"); | |
141 | 145 | } |
142 | 146 | $c = $m->numlayers; |
143 | 147 | for ($i=0;$i < $c;++$i) | ... | ... |
exemplos/index.html
... | ... | @@ -5,13 +5,13 @@ |
5 | 5 | |
6 | 6 | <link rel="stylesheet" type="text/css" href="../admin/html/admin.css"> |
7 | 7 | <style> |
8 | -body,td { | |
9 | - text-align: left; | |
10 | - border: 0px solid #FFFFFF; | |
11 | - font-family: Verdana, Arial, Helvetica, sans-serif; | |
12 | - position: relative; | |
13 | - font-size: 0.8em; | |
14 | - padding-bottom: 10px; | |
8 | +body, td { | |
9 | + padding-top: 0px; | |
10 | + COLOR: #2F4632; | |
11 | + font-family: Verdana, Arial, Helvetica, sans-serif; | |
12 | + background-color: rgb(250, 250, 250); | |
13 | + margin: auto; | |
14 | + font-size: 12px; | |
15 | 15 | } |
16 | 16 | </style> |
17 | 17 | <script> |
... | ... | @@ -20,7 +20,7 @@ body,td { |
20 | 20 | */ |
21 | 21 | </script> |
22 | 22 | </head> |
23 | -<body class="yui-skin-sam fundoPonto"> | |
23 | +<body class="yui-skin-sam"> | |
24 | 24 | <center> |
25 | 25 | <div class="bordaSuperior"> </div> |
26 | 26 | <div class="mascaraPrincipal" id="divGeral"> | ... | ... |
ferramentas/buscarapida/gadget.php
1 | 1 | <?php |
2 | 2 | include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); |
3 | -if(!isset($palavra)) | |
4 | -{echo "Parâmetro &palavra= não foi definido. 'palavra' é a palavra que será buscada";} | |
5 | -if(!isset($locaplic)) | |
6 | -{echo "<br>Parâmetro &locaplic= não foi definido. 'locaplic' indica onde o i3geo está instalado";} | |
3 | +include_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
4 | +$projecao = pegaProjecaoDefault("epsg"); | |
5 | +if(!isset($palavra)){ | |
6 | + echo "Parâmetro &palavra= não foi definido. 'palavra' é a palavra que será buscada"; | |
7 | +} | |
8 | +if(!isset($locaplic)){ | |
9 | + echo "<br>Parâmetro &locaplic= não foi definido. 'locaplic' indica onde o i3geo está instalado"; | |
10 | +} | |
7 | 11 | ?> |
8 | 12 | <html xmlns="http://www.w3.org/1999/xhtml"> |
9 | 13 | <head> |
... | ... | @@ -22,7 +26,7 @@ i3GEObuscaRapida.idresultado |
22 | 26 | var mapaLugar = function(wkt,layer,gid,nm) |
23 | 27 | { |
24 | 28 | var ext = i3GEO.util.wkt2ext(wkt,"polygon"); |
25 | - var url = "<?php echo $locaplic;?>/ms_criamapa.php?srs_wms=epsg:4618&image_wms=image/png&versao_wms=1.1.1" | |
29 | + var url = "<?php echo $locaplic;?>/ms_criamapa.php?srs_wms=epsg:<?php echo $projecao;?>&image_wms=image/png&versao_wms=1.1.1" | |
26 | 30 | url += "&url_wms=http://mapas.mma.gov.br/webservices/geonameswms.php?gid="+gid+"&"; |
27 | 31 | url += "&layer_wms="+layer+"&style_wms=default" |
28 | 32 | url += "&nome_wms="+nm+" - "+layer | ... | ... |
ferramentas/congelamapa/openlayers.php
... | ... | @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; |
17 | 17 | copy($map_file,$novo_mapfile); |
18 | 18 | chmod($novo_mapfile,0777); |
19 | 19 | $mapa = ms_newMapObj($novo_mapfile); |
20 | -$mapa->setProjection("+proj=longlat +ellps=GRS67 +no_defs"); | |
20 | +$mapa->setProjection(pegaProjecaoDefault("proj4")); | |
21 | 21 | $numlayers = $mapa->numlayers; |
22 | 22 | $layers = array(); |
23 | 23 | for($i = 0;$i < $numlayers;++$i){ | ... | ... |
ferramentas/congelamapa/openlayers3.php
... | ... | @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; |
17 | 17 | copy($map_file,$novo_mapfile); |
18 | 18 | chmod($novo_mapfile,0777); |
19 | 19 | $mapa = ms_newMapObj($novo_mapfile); |
20 | -$mapa->setProjection("+proj=longlat +ellps=GRS67 +no_defs"); | |
20 | +$mapa->setProjection(pegaProjecaoDefault("proj4")); | |
21 | 21 | $numlayers = $mapa->numlayers; |
22 | 22 | $layers = array(); |
23 | 23 | for($i = 0;$i < $numlayers;++$i){ | ... | ... |
ferramentas/imprimir/a4lpaisagempdf.php
... | ... | @@ -42,9 +42,9 @@ $map->save($temp); |
42 | 42 | substituiCon($temp,$postgis_mapa); |
43 | 43 | $map = ms_newMapObj($temp); |
44 | 44 | |
45 | -if($map->getmetadata("interface") == "googlemaps") | |
46 | -{ | |
47 | - $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
45 | +if($map->getmetadata("interface") == "googlemaps"){ | |
46 | + $proj4 = pegaProjecaoDefault("proj4"); | |
47 | + $map->setProjection($proj4); | |
48 | 48 | $map->set("units",MS_METERS); |
49 | 49 | $map->preparequery(); |
50 | 50 | $map->set("scaledenom",$map->scaledenom * 100000); | ... | ... |
ferramentas/imprimir/aggpng.php
... | ... | @@ -72,7 +72,8 @@ $of->set("imagemode","RGB"); |
72 | 72 | $map = ms_newMapObj($temp); |
73 | 73 | if($map->getmetadata("interface") == "googlemaps") |
74 | 74 | { |
75 | - $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
75 | + $proj4 = pegaProjecaoDefault("proj4"); | |
76 | + $map->setProjection($proj4); | |
76 | 77 | $map->set("units",MS_METERS); |
77 | 78 | $map->preparequery(); |
78 | 79 | $map->set("scaledenom",$map->scaledenom * 100000); | ... | ... |
ferramentas/imprimir/geotif.php
... | ... | @@ -71,7 +71,8 @@ $of->set("imagemode","RGB"); |
71 | 71 | $map = ms_newMapObj($temp); |
72 | 72 | if($map->getmetadata("interface") == "googlemaps") |
73 | 73 | { |
74 | - $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
74 | + $proj4 = pegaProjecaoDefault("proj4"); | |
75 | + $map->setProjection($proj4); | |
75 | 76 | $map->set("units",MS_METERS); |
76 | 77 | $map->preparequery(); |
77 | 78 | $map->set("scaledenom",$map->scaledenom * 100000); | ... | ... |
ferramentas/imprimir/jpeg.php
... | ... | @@ -74,7 +74,8 @@ $of->set("mimetype","image/jpeg"); |
74 | 74 | $of->set("extension","jpg"); |
75 | 75 | if($map->getmetadata("interface") == "googlemaps") |
76 | 76 | { |
77 | - $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
77 | + $proj4 = pegaProjecaoDefault("proj4"); | |
78 | + $map->setProjection($proj4); | |
78 | 79 | $map->set("units",MS_METERS); |
79 | 80 | $map->preparequery(); |
80 | 81 | $map->set("scaledenom",$map->scaledenom * 100000); | ... | ... |
ferramentas/imprimir/svg.php
... | ... | @@ -69,7 +69,8 @@ substituiCon($temp,$postgis_mapa); |
69 | 69 | $map = ms_newMapObj($temp); |
70 | 70 | if($map->getmetadata("interface") == "googlemaps") |
71 | 71 | { |
72 | - $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | |
72 | + $proj4 = pegaProjecaoDefault("proj4"); | |
73 | + $map->setProjection($proj4); | |
73 | 74 | $map->set("units",MS_METERS); |
74 | 75 | $map->preparequery(); |
75 | 76 | $map->set("scaledenom",$map->scaledenom * 100000); | ... | ... |
ferramentas/parametrossql/ogc.php
... | ... | @@ -12,6 +12,8 @@ require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); |
12 | 12 | include(dirname(__FILE__)."/../../ms_configura.php"); |
13 | 13 | include(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); |
14 | 14 | include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); |
15 | +$projDefault = pegaProjecaoDefault(); | |
16 | + | |
15 | 17 | $temas = $tema; |
16 | 18 | if(isset($_GET["sld"]) || isset($_GET["filter"])){ |
17 | 19 | $cache = false; |
... | ... | @@ -40,7 +42,7 @@ if($_GET["SRS"] == "EPSG:900913"){ |
40 | 42 | $req = ms_newowsrequestobj(); |
41 | 43 | $_GET = array_merge($_GET,$_POST); |
42 | 44 | if(!isset($_GET["srs"]) && !isset($_GET["SRS"])){ |
43 | - $_GET["srs"] = "EPSG:4326"; | |
45 | + $_GET["srs"] = "EPSG:".$projDefault["epsg"]; | |
44 | 46 | } |
45 | 47 | foreach ($_GET as $k=>$v){ |
46 | 48 | $req->setParameter(strtoupper($k), $v); |
... | ... | @@ -97,7 +99,7 @@ else{ |
97 | 99 | $oMap->setmetadata("ows_enable_request","*"); |
98 | 100 | //parametro mandatario |
99 | 101 | if($oMap->getmetadata("wms_srs") == ""){ |
100 | - $oMap->setmetadata("wms_srs","EPSG:4326"); | |
102 | + $oMap->setmetadata("wms_srs","EPSG:".$projDefault["epsg"]); | |
101 | 103 | } |
102 | 104 | |
103 | 105 | $e = $oMap->extent; |
... | ... | @@ -310,7 +312,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ |
310 | 312 | $x--; |
311 | 313 | $y--; |
312 | 314 | |
313 | - $projInObj = ms_newprojectionobj("proj=latlong,a=6378137,b=6378137"); | |
315 | + $projInObj = ms_newprojectionobj($projDefault["proj4"]); | |
314 | 316 | $projOutObj = ms_newprojectionobj("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m"); |
315 | 317 | |
316 | 318 | $poPoint1 = ms_newpointobj(); |
... | ... | @@ -324,7 +326,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ |
324 | 326 | |
325 | 327 | $oMap->getlayer(0)->set("status",MS_DEFAULT); |
326 | 328 | $oMap->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m"); |
327 | - $layer0->setProjection("proj=latlong,a=6378137,b=6378137"); | |
329 | + $layer0->setProjection($projDefault["proj4"]); | |
328 | 330 | // |
329 | 331 | //se o layer foi marcado para corte altera os parametros para ampliar o mapa |
330 | 332 | //antes de gerar a imagem |
... | ... | @@ -401,7 +403,7 @@ if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ |
401 | 403 | $req->setParameter("TYPENAME",$l->name); |
402 | 404 | } |
403 | 405 | if($l->getProjection() == "" ){ |
404 | - $l->setProjection("proj=latlong,a=6378137,b=6378137"); | |
406 | + $l->setProjection($projDefault["proj4"]); | |
405 | 407 | } |
406 | 408 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ |
407 | 409 | $req->setParameter("SRS","EPSG:3857"); | ... | ... |
ferramentas/telaremota/openlayers1.php
... | ... | @@ -119,7 +119,7 @@ function inicia(){ |
119 | 119 | OpenLayers.ImgPath = "../../pacotes/openlayers/img/" |
120 | 120 | OpenLayers.Lang.setCode("pt-BR"); |
121 | 121 | var urlLayer = "../../classesphp/mapa_openlayers.php?DESLIGACACHE=sim&g_sid=<?php echo $g_sid;?>&telaR=<?php echo $telaR;?>"; |
122 | - | |
122 | + | |
123 | 123 | var remoto = new OpenLayers.Layer.WMS( |
124 | 124 | "Remoto", |
125 | 125 | urlLayer, |
... | ... | @@ -168,7 +168,7 @@ function inicia(){ |
168 | 168 | "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", |
169 | 169 | { |
170 | 170 | layers : "baseraster", |
171 | - srs : "EPSG:4618", | |
171 | + srs : "EPSG:4326", | |
172 | 172 | format : "image/png", |
173 | 173 | isBaseLayer : false |
174 | 174 | }, { | ... | ... |
ferramentas/wkt2layer/exec.php
... | ... | @@ -45,7 +45,7 @@ Insere elementos no mapa como um layer do tipo feature baseado em wkt |
45 | 45 | $c = $shp->getCentroid(); |
46 | 46 | $c = $c->x; |
47 | 47 | if($c > -181 && $c < 181){ |
48 | - $l->setprojection("proj=latlong,a=6378137,b=6378137"); | |
48 | + $l->setprojection(pegaProjecaoDefault("proj4")); | |
49 | 49 | } |
50 | 50 | else{ |
51 | 51 | $l->setprojection($this->mapa->getProjection()); | ... | ... |
ms_criamapa.php
... | ... | @@ -297,14 +297,17 @@ if($_SERVER['SERVER_NAME'] != "localhost" && ($i3geomaster[0]["usuario"] == "adm |
297 | 297 | /* |
298 | 298 | Define o cookie para o idioma da interface |
299 | 299 | */ |
300 | -if(isset($idioma) && $idioma != "") | |
301 | -{setcookie("i3geolingua", $idioma);} | |
300 | +if(isset($idioma) && $idioma != ""){ | |
301 | + setcookie("i3geolingua", $idioma); | |
302 | +} | |
302 | 303 | /* |
303 | 304 | Cria os diretorios temporários que serão utilizados pelo i3geo para armazenar as imagens e outros dados. |
304 | 305 | */ |
305 | 306 | $diretorios = criaDirMapa($dir_tmp,$cachedir); |
306 | -if(!$diretorios) | |
307 | -{echo "<p style=color:red ><b>Não foi possível criar os diretórios temporários em $dir_tmp.</b></p>";exit;} | |
307 | +if(!$diretorios){ | |
308 | + echo "<p style=color:red ><b>Não foi possível criar os diretórios temporários em $dir_tmp.</b></p>"; | |
309 | + exit; | |
310 | +} | |
308 | 311 | criaIndex($dir_tmp,$diretorios); |
309 | 312 | $tmpfname = $diretorios[0]; |
310 | 313 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
... | ... | @@ -390,8 +393,10 @@ session_name("i3GeoPHP"); |
390 | 393 | session_start(); |
391 | 394 | //echo $_SESSION["map_file"];exit; |
392 | 395 | if (!isset($g_sid)){$g_sid="";} |
393 | -if(isset($_SESSION["map_file"]) || $g_sid != "" || $g_sid == "undefined") | |
394 | -{session_regenerate_id();$_SESSION = array();} | |
396 | +if(isset($_SESSION["map_file"]) || $g_sid != "" || $g_sid == "undefined"){ | |
397 | + session_regenerate_id(); | |
398 | + $_SESSION = array(); | |
399 | +} | |
395 | 400 | /* |
396 | 401 | Aguarde |
397 | 402 | |
... | ... | @@ -470,8 +475,9 @@ if(!isset($base) || $base == ""){ |
470 | 475 | if($base == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav'.$versao.'.map')){ |
471 | 476 | $base = "/opt/www/html/i3geo/aplicmap/geral1v".$versao.".map"; |
472 | 477 | } |
473 | - if($base == "") | |
474 | - {$base = $locaplic."/aplicmap/geral1v".$versao.".map";} | |
478 | + if($base == ""){ | |
479 | + $base = $locaplic."/aplicmap/geral1v".$versao.".map"; | |
480 | + } | |
475 | 481 | } |
476 | 482 | } |
477 | 483 | //if(!isset($estadosl)) |
... | ... | @@ -576,6 +582,11 @@ $w->set("imagepath",$atual.$diretorios[2]."/"); |
576 | 582 | $atual = $w->imageurl; |
577 | 583 | $w->set("imageurl",$atual.$diretorios[2]."/"); |
578 | 584 | |
585 | +$projecao = pegaProjecaoDefault("proj4"); | |
586 | +if($projecao != ""){ | |
587 | + $mapn->setProjection($projecao); | |
588 | +} | |
589 | + | |
579 | 590 | $salvo = $mapn->save($tmpfname); |
580 | 591 | |
581 | 592 | $_SESSION["imgurl"] = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].$atual.$diretorios[2]."/"; | ... | ... |
ogc.php
... | ... | @@ -212,7 +212,7 @@ if(!empty($restauramapa)){ |
212 | 212 | //para operar como o Geoserver, abre o openlayers |
213 | 213 | // |
214 | 214 | if(isset($format) && strtolower($format) == "application/openlayers"){ |
215 | - $urln = dirname($_SERVER["PHP_SELF"])."/mashups/openlayers.php?layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica"; | |
215 | + $urln = dirname($_SERVER["PHP_SELF"])."/mashups/openlayers.php?layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica,legenda"; | |
216 | 216 | //echo $urln;exit; |
217 | 217 | if(!headers_sent()){ |
218 | 218 | header("Location:".$urln); |
... | ... | @@ -323,7 +323,8 @@ else{ |
323 | 323 | $oMap->setmetadata("ows_enable_request","*"); |
324 | 324 | //parametro mandatario |
325 | 325 | if($oMap->getmetadata("wms_srs") == ""){ |
326 | - $oMap->setmetadata("wms_srs","EPSG:4326"); | |
326 | + $projecao = pegaProjecaoDefault("epsg"); | |
327 | + $oMap->setmetadata("wms_srs","EPSG:".$projecao); | |
327 | 328 | } |
328 | 329 | $e = $oMap->extent; |
329 | 330 | $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
... | ... | @@ -751,11 +752,11 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ |
751 | 752 | $x = $_GET["X"]; |
752 | 753 | $y = $_GET["Y"]; |
753 | 754 | $z = $_GET["Z"]; |
754 | - | |
755 | + $proj4 = pegaProjecaoDefault("proj4"); | |
755 | 756 | if(file_exists($tema)){ |
756 | 757 | $layer0 = $oMap->getlayer(0); |
757 | 758 | $layer0->set("status",MS_DEFAULT); |
758 | - $layer0->setProjection("proj=latlong,a=6378137,b=6378137"); | |
759 | + $layer0->setProjection($proj4); | |
759 | 760 | } |
760 | 761 | else{ |
761 | 762 | //pode ter mais de um tema |
... | ... | @@ -763,7 +764,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ |
763 | 764 | foreach($lista as $nomeLayer){ |
764 | 765 | $layer0 = $oMap->getlayerbyname($nomeLayer); |
765 | 766 | $layer0->set("status",MS_DEFAULT); |
766 | - $layer0->setProjection("proj=latlong,a=6378137,b=6378137"); | |
767 | + $layer0->setProjection($proj4); | |
767 | 768 | } |
768 | 769 | } |
769 | 770 | // |
... | ... | @@ -879,7 +880,7 @@ if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ |
879 | 880 | $req->setParameter("TYPENAME",$l->name); |
880 | 881 | } |
881 | 882 | if($l->getProjection() == "" ){ |
882 | - $l->setProjection("proj=latlong,a=6378137,b=6378137"); | |
883 | + $l->setProjection(pegaProjecaoDefault("proj4")); | |
883 | 884 | } |
884 | 885 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ |
885 | 886 | $req->setParameter("SRS","EPSG:3857"); | ... | ... |
testainstal.php
... | ... | @@ -114,8 +114,16 @@ catch(ee) |
114 | 114 | echo "<br>MapServer: <br>"; |
115 | 115 | echo ms_GetVersion(); |
116 | 116 | echo "<br><br>"; |
117 | - echo "Array que armazena os parâmetros da versão:<br><br>"; | |
117 | + echo "Array que armazena os parâmetros da versão:<br><pre>"; | |
118 | 118 | var_dump (versao())."<br><br>"; |
119 | + echo "</pre>"; | |
120 | + echo "Configuração da projeção default:<br>"; | |
121 | + if(!isset($i3GeoProjDefault)){ | |
122 | + echo "<span style=color:red >A variável de configuração i3GeoProjDefault não existe no ms_configura.php. Será utilizada a projeção 4326</span><br><br>"; | |
123 | + } | |
124 | + echo "<pre>"; | |
125 | + var_dump (pegaProjecaoDefault())."<br><br>"; | |
126 | + echo "</pre>"; | |
119 | 127 | if(!function_exists("ms_GetVersion")) |
120 | 128 | { |
121 | 129 | echo "<span style=color:red >PARECE QUE O MAPSERVER NAO ESTA INSTALADO!!!<br><br>"; |
... | ... | @@ -123,7 +131,7 @@ catch(ee) |
123 | 131 | if (get_cfg_var("safe_mode") == 1){ |
124 | 132 | echo "<span style=color:red >Problema: safe_mode no php.ini deveria estar como 'Off'. O i3Geo não irá funcionar!!!<br></span>"; |
125 | 133 | } |
126 | - echo "<br><br>As seguintes letras devem aparecer corretamente acentuadas: "; | |
134 | + echo "<br>As seguintes letras devem aparecer corretamente acentuadas: "; | |
127 | 135 | echo "<br><br>çÇãâáÁóÓ"; |
128 | 136 | echo "<br><br>Caso contrário, verifique os parâmetros de configuração do Apache <b>AddDefaultCharset (httpd.conf) e default_charset (php.ini)</b> (default_charset='' no php.ini geralmente funciona)."; |
129 | 137 | //executa as opcoes linux definidas no formulario | ... | ... |