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,6 +306,76 @@ i3GEOadmin.core.dicionario = { | ||
| 306 | en : "", | 306 | en : "", |
| 307 | es : "" | 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 | pt : "", | 380 | pt : "", |
| 311 | en : "", | 381 | en : "", |
admin/dicionario/perfis.js
| @@ -25,5 +25,10 @@ i3GEOadmin.perfis.dicionario = { | @@ -25,5 +25,10 @@ i3GEOadmin.perfis.dicionario = { | ||
| 25 | pt : "<p>Perfis existentes: (clique na célula para editar e salve a linha editada)</p>", | 25 | pt : "<p>Perfis existentes: (clique na célula para editar e salve a linha editada)</p>", |
| 26 | en : "", | 26 | en : "", |
| 27 | es : "" | 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,5 +25,75 @@ i3GEOadmin.sistemas.dicionario = { | ||
| 25 | pt : "Sistemas existentes:", | 25 | pt : "Sistemas existentes:", |
| 26 | en : "", | 26 | en : "", |
| 27 | es : "" | 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 | //+$trad(1,i3GEOadmin.principal.dicionario)+ | 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 | pt : "", | 55 | pt : "", |
| 6 | en : "", | 56 | en : "", |
| 7 | es : "" | 57 | es : "" |
admin/dicionario/tags.js
| @@ -25,5 +25,50 @@ i3GEOadmin.tags.dicionario = { | @@ -25,5 +25,50 @@ i3GEOadmin.tags.dicionario = { | ||
| 25 | pt : "<p>Tags existentes: (clique na célula para editar e salve a linha editada)</p>", | 25 | pt : "<p>Tags existentes: (clique na célula para editar e salve a linha editada)</p>", |
| 26 | en : "", | 26 | en : "", |
| 27 | es : "" | 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,5 +30,105 @@ i3GEOadmin.usuarios.dicionario = { | ||
| 30 | pt : "Usuários cadastrados:", | 30 | pt : "Usuários cadastrados:", |
| 31 | en : "", | 31 | en : "", |
| 32 | es : "" | 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,5 +25,45 @@ i3GEOadmin.webservices.dicionario = { | ||
| 25 | pt : "Endereços cadastrados:", | 25 | pt : "Endereços cadastrados:", |
| 26 | en : "", | 26 | en : "", |
| 27 | es : "" | 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,10 +249,12 @@ select{ | ||
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | .fundoPonto { | 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 | font-family: Verdana, Arial, Helvetica, sans-serif; | 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 | .cabecalhoGeral { | 260 | .cabecalhoGeral { |
admin/js/estat_editor.js
| @@ -576,6 +576,7 @@ i3GEOadmin.editor = { | @@ -576,6 +576,7 @@ i3GEOadmin.editor = { | ||
| 576 | '<p class="paragrafo" >shp: <br><input type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | 576 | '<p class="paragrafo" >shp: <br><input type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 577 | '<p class="paragrafo" >shx: <br><input type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | 577 | '<p class="paragrafo" >shx: <br><input type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + |
| 578 | '<p class="paragrafo" >dbf: <br><input type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>' + | 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 | '</fieldset>' + | 580 | '</fieldset>' + |
| 580 | '<fieldset class=subbloco >' + | 581 | '<fieldset class=subbloco >' + |
| 581 | '<legend>Destino</legend>' + | 582 | '<legend>Destino</legend>' + |
| @@ -599,10 +600,9 @@ i3GEOadmin.editor = { | @@ -599,10 +600,9 @@ i3GEOadmin.editor = { | ||
| 599 | '</fieldset>' + | 600 | '</fieldset>' + |
| 600 | '<fieldset class=subbloco >' + | 601 | '<fieldset class=subbloco >' + |
| 601 | '<legend>Projeção</legend>' + | 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 | '<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>' + | 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 | '<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>' + | 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 | '</fieldset>' + | 607 | '</fieldset>' + |
| 608 | '<fieldset class=subbloco >' + | 608 | '<fieldset class=subbloco >' + |
admin/js/perfis.js
| @@ -53,7 +53,7 @@ Obt&eacute;m a lista de perfis | @@ -53,7 +53,7 @@ Obt&eacute;m a lista de perfis | ||
| 53 | */ | 53 | */ |
| 54 | function pegaPerfis() | 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 | function montaTabela(dados) | 58 | function montaTabela(dados) |
| 59 | { | 59 | { |
| @@ -78,10 +78,10 @@ function montaTabela(dados) | @@ -78,10 +78,10 @@ function montaTabela(dados) | ||
| 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; |
| 79 | }; | 79 | }; |
| 80 | var myColumnDefs = [ | 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 | {label:"id",key:"id_perfil", formatter:formatTextoId}, | 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 | myDataSource = new YAHOO.util.DataSource(dados); | 86 | myDataSource = new YAHOO.util.DataSource(dados); |
| 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; |
| @@ -166,13 +166,13 @@ function gravaLinha(row) | @@ -166,13 +166,13 @@ function gravaLinha(row) | ||
| 166 | var id_perfil = r.getData("id_perfil"); | 166 | var id_perfil = r.getData("id_perfil"); |
| 167 | var perfil = r.getData("perfil"); | 167 | var perfil = r.getData("perfil"); |
| 168 | core_carregando("ativa"); | 168 | core_carregando("ativa"); |
| 169 | - var mensagem = " gravando registro do id= "+id_perfil; | 169 | + var mensagem = $trad("gravaId",i3GEOadmin.core.dicionario)+id_perfil; |
| 170 | var sUrl = "../php/menutemas.php?funcao=alteraPerfis&perfil="+perfil+"&id="+id_perfil; | 170 | var sUrl = "../php/menutemas.php?funcao=alteraPerfis&perfil="+perfil+"&id="+id_perfil; |
| 171 | core_gravaLinha(mensagem,row,sUrl); | 171 | core_gravaLinha(mensagem,row,sUrl); |
| 172 | } | 172 | } |
| 173 | function excluiLinha(id,row) | 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 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=perfis"; | 176 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=perfis"; |
| 177 | core_excluiLinha(sUrl,row,mensagem); | 177 | core_excluiLinha(sUrl,row,mensagem); |
| 178 | } | 178 | } |
admin/js/sistemas.js
| @@ -49,7 +49,7 @@ function ativaBotaoAdicionaRaiz(sUrl,idBotao) | @@ -49,7 +49,7 @@ function ativaBotaoAdicionaRaiz(sUrl,idBotao) | ||
| 49 | var botao, adiciona = function() | 49 | var botao, adiciona = function() |
| 50 | { | 50 | { |
| 51 | core_carregando("ativa"); | 51 | core_carregando("ativa"); |
| 52 | - core_carregando(" adicionando um novo registro"); | 52 | + core_carregando($trad("msgNovoRegistro",i3GEOadmin.core.dicionario)); |
| 53 | var callback = | 53 | var callback = |
| 54 | { | 54 | { |
| 55 | success:function(o) | 55 | success:function(o) |
| @@ -79,7 +79,7 @@ Obt&eacute;m a lista de sistemas | @@ -79,7 +79,7 @@ Obt&eacute;m a lista de sistemas | ||
| 79 | */ | 79 | */ |
| 80 | function pegaSistemas() | 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 | Function: montaArvore | 85 | Function: montaArvore |
| @@ -140,8 +140,8 @@ function adicionaNos(no,dados,redesenha) | @@ -140,8 +140,8 @@ function adicionaNos(no,dados,redesenha) | ||
| 140 | { | 140 | { |
| 141 | for (var i=0, j=dados.length; i<j; i++) | 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 | var d = {html:conteudo,id_funcao:dados[i].id_funcao,tipo:"funcao"}; | 145 | var d = {html:conteudo,id_funcao:dados[i].id_funcao,tipo:"funcao"}; |
| 146 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | 146 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 147 | tempNode.isLeaf = true; | 147 | tempNode.isLeaf = true; |
| @@ -154,9 +154,9 @@ function adicionaNosRaiz(dados,redesenha) | @@ -154,9 +154,9 @@ function adicionaNosRaiz(dados,redesenha) | ||
| 154 | var root = tree.getRoot(); | 154 | var root = tree.getRoot(); |
| 155 | for (var i=0, j=dados.length; i<j; i++) | 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 | var d = {html:conteudo,id_sistema:dados[i].id_sistema,tipo:"sistema"}; | 160 | var d = {html:conteudo,id_sistema:dados[i].id_sistema,tipo:"sistema"}; |
| 161 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); | 161 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); |
| 162 | tempNode.enableHighlight = false; | 162 | tempNode.enableHighlight = false; |
| @@ -177,7 +177,7 @@ function editar(tipo,id) | @@ -177,7 +177,7 @@ function editar(tipo,id) | ||
| 177 | if(tipo == "funcao") | 177 | if(tipo == "funcao") |
| 178 | { | 178 | { |
| 179 | core_carregando("ativa"); | 179 | core_carregando("ativa"); |
| 180 | - core_carregando(" buscando dados"); | 180 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); |
| 181 | var callback = | 181 | var callback = |
| 182 | { | 182 | { |
| 183 | success:function(o) | 183 | success:function(o) |
| @@ -198,7 +198,7 @@ function editar(tipo,id) | @@ -198,7 +198,7 @@ function editar(tipo,id) | ||
| 198 | if(tipo == "sistema") | 198 | if(tipo == "sistema") |
| 199 | { | 199 | { |
| 200 | core_carregando("ativa"); | 200 | core_carregando("ativa"); |
| 201 | - core_carregando(" buscando dados"); | 201 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); |
| 202 | var callback = | 202 | var callback = |
| 203 | { | 203 | { |
| 204 | success:function(o) | 204 | success:function(o) |
| @@ -219,14 +219,14 @@ function editar(tipo,id) | @@ -219,14 +219,14 @@ function editar(tipo,id) | ||
| 219 | } | 219 | } |
| 220 | function montaEditorSistemas(dados,id) | 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 | $i("editor_bd").innerHTML = montaDivSistemas(dados); | 223 | $i("editor_bd").innerHTML = montaDivSistemas(dados); |
| 224 | core_carregando("desativa"); | 224 | core_carregando("desativa"); |
| 225 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_sistema\")"); | 225 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_sistema\")"); |
| 226 | } | 226 | } |
| 227 | function montaEditorFuncoes(dados,id) | 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 | $i("editor_bd").innerHTML = montaDivFuncoes(dados); | 230 | $i("editor_bd").innerHTML = montaDivFuncoes(dados); |
| 231 | core_carregando("desativa"); | 231 | core_carregando("desativa"); |
| 232 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_funcao\")"); | 232 | core_comboPerfis("comboPerfis","selPerfil","","registraPerfil(this.value,\"Eperfil_funcao\")"); |
| @@ -245,13 +245,13 @@ function montaDivSistemas(i) | @@ -245,13 +245,13 @@ function montaDivSistemas(i) | ||
| 245 | var param = | 245 | var param = |
| 246 | { | 246 | { |
| 247 | "linhas":[ | 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 | var ins = ""; | 252 | var ins = ""; |
| 253 | ins += core_geraLinhas(param); | 253 | ins += core_geraLinhas(param); |
| 254 | - ins += "<br>Publicado?<br>"; | 254 | + ins += "<br>"+ $trad("publicado",i3GEOadmin.sistemas.dicionario) +"<br>"; |
| 255 | ins += "<select id='Epublicado_sistema' >"; | 255 | ins += "<select id='Epublicado_sistema' >"; |
| 256 | ins += core_combosimnao(i.publicado_sistema); | 256 | ins += core_combosimnao(i.publicado_sistema); |
| 257 | ins += "</select>"; | 257 | ins += "</select>"; |
| @@ -262,11 +262,11 @@ function montaDivFuncoes(i) | @@ -262,11 +262,11 @@ function montaDivFuncoes(i) | ||
| 262 | var param = | 262 | var param = |
| 263 | { | 263 | { |
| 264 | "linhas":[ | 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 | var ins = ""; | 272 | var ins = ""; |
| @@ -284,7 +284,7 @@ Exclui um no espec&iacute;fico | @@ -284,7 +284,7 @@ Exclui um no espec&iacute;fico | ||
| 284 | */ | 284 | */ |
| 285 | function excluir(tipo,id) | 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 | var no = "", sUrl = ""; | 288 | var no = "", sUrl = ""; |
| 289 | if(tipo == "sistema") | 289 | if(tipo == "sistema") |
| 290 | { | 290 | { |
| @@ -337,7 +337,7 @@ function gravaDadosFuncao(id) | @@ -337,7 +337,7 @@ function gravaDadosFuncao(id) | ||
| 337 | {par += "&"+campos[i]+"_funcao="+($i("E"+campos[i]+"_funcao").value);} | 337 | {par += "&"+campos[i]+"_funcao="+($i("E"+campos[i]+"_funcao").value);} |
| 338 | par += "&id_funcao="+id; | 338 | par += "&id_funcao="+id; |
| 339 | core_carregando("ativa"); | 339 | core_carregando("ativa"); |
| 340 | - core_carregando(" gravando o registro do id= "+id); | 340 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); |
| 341 | var sUrl = "../php/sistemas.php?funcao=alterarFuncoes"+par; | 341 | var sUrl = "../php/sistemas.php?funcao=alterarFuncoes"+par; |
| 342 | var callback = | 342 | var callback = |
| 343 | { | 343 | { |
| @@ -347,7 +347,7 @@ function gravaDadosFuncao(id) | @@ -347,7 +347,7 @@ function gravaDadosFuncao(id) | ||
| 347 | { | 347 | { |
| 348 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") | 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 | setTimeout("core_carregando('desativa')",3000); | 351 | setTimeout("core_carregando('desativa')",3000); |
| 352 | } | 352 | } |
| 353 | else | 353 | else |
| @@ -382,7 +382,7 @@ function gravaDadosSistema(id) | @@ -382,7 +382,7 @@ function gravaDadosSistema(id) | ||
| 382 | {par += "&"+campos[i]+"_sistema="+($i("E"+campos[i]+"_sistema").value);} | 382 | {par += "&"+campos[i]+"_sistema="+($i("E"+campos[i]+"_sistema").value);} |
| 383 | par += "&id_sistema="+id; | 383 | par += "&id_sistema="+id; |
| 384 | core_carregando("ativa"); | 384 | core_carregando("ativa"); |
| 385 | - core_carregando(" gravando o registro do id= "+id); | 385 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); |
| 386 | var sUrl = "../php/sistemas.php?funcao=alterarSistemas"+par; | 386 | var sUrl = "../php/sistemas.php?funcao=alterarSistemas"+par; |
| 387 | var callback = | 387 | var callback = |
| 388 | { | 388 | { |
| @@ -392,7 +392,7 @@ function gravaDadosSistema(id) | @@ -392,7 +392,7 @@ function gravaDadosSistema(id) | ||
| 392 | { | 392 | { |
| 393 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") | 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 | setTimeout("core_carregando('desativa')",3000); | 396 | setTimeout("core_carregando('desativa')",3000); |
| 397 | } | 397 | } |
| 398 | else | 398 | else |
admin/js/subgrupos.js
| @@ -59,11 +59,11 @@ i3GEOadmin.subgrupos = { | @@ -59,11 +59,11 @@ i3GEOadmin.subgrupos = { | ||
| 59 | }, | 59 | }, |
| 60 | defColunas: function(){ | 60 | defColunas: function(){ |
| 61 | return [ | 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 | {label:"en",resizeable:true,key:"en", formatter:i3GEOadmin.subgrupos.formatTexto}, | 67 | {label:"en",resizeable:true,key:"en", formatter:i3GEOadmin.subgrupos.formatTexto}, |
| 68 | {label:"es",resizeable:true,key:"es", formatter:i3GEOadmin.subgrupos.formatTexto}, | 68 | {label:"es",resizeable:true,key:"es", formatter:i3GEOadmin.subgrupos.formatTexto}, |
| 69 | {label:"it",resizeable:true,key:"it", formatter:i3GEOadmin.subgrupos.formatTexto} | 69 | {label:"it",resizeable:true,key:"it", formatter:i3GEOadmin.subgrupos.formatTexto} |
| @@ -89,7 +89,7 @@ i3GEOadmin.subgrupos = { | @@ -89,7 +89,7 @@ i3GEOadmin.subgrupos = { | ||
| 89 | obtem: function(){ | 89 | obtem: function(){ |
| 90 | i3GEOadmin.subgrupos.dados = ""; | 90 | i3GEOadmin.subgrupos.dados = ""; |
| 91 | core_carregando("ativa"); | 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 | tabela: function(dados){ | 94 | tabela: function(dados){ |
| 95 | if(i3GEOadmin.subgrupos.dados == ""){ | 95 | if(i3GEOadmin.subgrupos.dados == ""){ |
| @@ -127,7 +127,7 @@ i3GEOadmin.subgrupos = { | @@ -127,7 +127,7 @@ i3GEOadmin.subgrupos = { | ||
| 127 | } | 127 | } |
| 128 | if (column.key == 'mais'){ | 128 | if (column.key == 'mais'){ |
| 129 | core_carregando("ativa"); | 129 | core_carregando("ativa"); |
| 130 | - core_carregando("buscando dados..."); | 130 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); |
| 131 | $clicouId = registro.getData('id_subgrupo'); | 131 | $clicouId = registro.getData('id_subgrupo'); |
| 132 | $recordid = registro.getId(); | 132 | $recordid = registro.getId(); |
| 133 | sUrl = "../php/menutemas.php?funcao=pegaSubGrupos&id_subgrupo="+$clicouId; | 133 | sUrl = "../php/menutemas.php?funcao=pegaSubGrupos&id_subgrupo="+$clicouId; |
| @@ -152,7 +152,7 @@ i3GEOadmin.subgrupos = { | @@ -152,7 +152,7 @@ i3GEOadmin.subgrupos = { | ||
| 152 | var botao, ins, | 152 | var botao, ins, |
| 153 | novoel = document.createElement("div"); | 153 | novoel = document.createElement("div"); |
| 154 | novoel.id = "janela_editor2"; | 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 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; | 156 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
| 157 | ins += "<div id='editor_bd2'></div>"; | 157 | ins += "<div id='editor_bd2'></div>"; |
| 158 | ins += "<div id='letras_SG'></div>"; | 158 | ins += "<div id='letras_SG'></div>"; |
| @@ -186,11 +186,11 @@ i3GEOadmin.subgrupos = { | @@ -186,11 +186,11 @@ i3GEOadmin.subgrupos = { | ||
| 186 | formulario: function(i){ | 186 | formulario: function(i){ |
| 187 | var param = { | 187 | var param = { |
| 188 | "linhas":[ | 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 | ins = ""; | 196 | ins = ""; |
| @@ -205,7 +205,7 @@ i3GEOadmin.subgrupos = { | @@ -205,7 +205,7 @@ i3GEOadmin.subgrupos = { | ||
| 205 | i3GEOadmin.subgrupos.letra = letra; | 205 | i3GEOadmin.subgrupos.letra = letra; |
| 206 | if(i3GEOadmin.subgrupos.dados == ""){ | 206 | if(i3GEOadmin.subgrupos.dados == ""){ |
| 207 | core_carregando("ativa"); | 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 | return; | 209 | return; |
| 210 | } | 210 | } |
| 211 | var i,temp, | 211 | var i,temp, |
| @@ -226,7 +226,7 @@ i3GEOadmin.subgrupos = { | @@ -226,7 +226,7 @@ i3GEOadmin.subgrupos = { | ||
| 226 | i3GEOadmin.subgrupos.tabela(novo); | 226 | i3GEOadmin.subgrupos.tabela(novo); |
| 227 | }, | 227 | }, |
| 228 | exclui: function(id,row){ | 228 | exclui: function(id,row){ |
| 229 | - var mensagem = " excluindo o registro do id= "+id, | 229 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id, |
| 230 | sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=subgrupos"; | 230 | sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=subgrupos"; |
| 231 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.subgrupos.dataTable); | 231 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.subgrupos.dataTable); |
| 232 | i3GEOadmin.subgrupos.dados = ""; | 232 | i3GEOadmin.subgrupos.dados = ""; |
| @@ -244,13 +244,13 @@ i3GEOadmin.subgrupos = { | @@ -244,13 +244,13 @@ i3GEOadmin.subgrupos = { | ||
| 244 | } | 244 | } |
| 245 | par += "&id_subgrupo="+id; | 245 | par += "&id_subgrupo="+id; |
| 246 | core_carregando("ativa"); | 246 | core_carregando("ativa"); |
| 247 | - core_carregando(" gravando o registro do id= "+id); | 247 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); |
| 248 | sUrl = "../php/menutemas.php?funcao=alteraSubGrupos"+par; | 248 | sUrl = "../php/menutemas.php?funcao=alteraSubGrupos"+par; |
| 249 | callback = { | 249 | callback = { |
| 250 | success:function(o){ | 250 | success:function(o){ |
| 251 | try { | 251 | try { |
| 252 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | 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 | setTimeout("core_carregando('desativa')",3000); | 254 | setTimeout("core_carregando('desativa')",3000); |
| 255 | } | 255 | } |
| 256 | else{ | 256 | else{ |
admin/js/tags.js
| @@ -53,7 +53,7 @@ Obt&eacute;m a lista de tags | @@ -53,7 +53,7 @@ Obt&eacute;m a lista de tags | ||
| 53 | */ | 53 | */ |
| 54 | function pegaTags() | 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 | function montaTabela(dados) | 58 | function montaTabela(dados) |
| 59 | { | 59 | { |
| @@ -78,10 +78,10 @@ function montaTabela(dados) | @@ -78,10 +78,10 @@ function montaTabela(dados) | ||
| 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | 78 | elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; |
| 79 | }; | 79 | }; |
| 80 | var myColumnDefs = [ | 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 | {label:"id",key:"id_tag", formatter:formatTextoId}, | 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 | myDataSource = new YAHOO.util.DataSource(dados); | 86 | myDataSource = new YAHOO.util.DataSource(dados); |
| 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | 87 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; |
| @@ -165,13 +165,13 @@ function gravaLinha(row) | @@ -165,13 +165,13 @@ function gravaLinha(row) | ||
| 165 | var id_tag = r.getData("id_tag"); | 165 | var id_tag = r.getData("id_tag"); |
| 166 | var nome = r.getData("nome"); | 166 | var nome = r.getData("nome"); |
| 167 | core_carregando("ativa"); | 167 | core_carregando("ativa"); |
| 168 | - var mensagem = " gravando registro do id= "+id_tag; | 168 | + var mensagem = $trad("gravaId",i3GEOadmin.core.dicionario)+id_tag; |
| 169 | var sUrl = "../php/menutemas.php?funcao=alteraTags&nome="+nome+"&id="+id_tag; | 169 | var sUrl = "../php/menutemas.php?funcao=alteraTags&nome="+nome+"&id="+id_tag; |
| 170 | core_gravaLinha(mensagem,row,sUrl); | 170 | core_gravaLinha(mensagem,row,sUrl); |
| 171 | } | 171 | } |
| 172 | function excluiLinha(id,row) | 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 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=tags"; | 175 | var sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=tags"; |
| 176 | core_excluiLinha(sUrl,row,mensagem); | 176 | core_excluiLinha(sUrl,row,mensagem); |
| 177 | -} | ||
| 178 | \ No newline at end of file | 177 | \ No newline at end of file |
| 178 | +} |
admin/js/usuarios.js
| @@ -45,7 +45,7 @@ function ativaBotaoAdicionaUsuario(sUrl,idBotao){ | @@ -45,7 +45,7 @@ function ativaBotaoAdicionaUsuario(sUrl,idBotao){ | ||
| 45 | var botao, adiciona = function() | 45 | var botao, adiciona = function() |
| 46 | { | 46 | { |
| 47 | core_carregando("ativa"); | 47 | core_carregando("ativa"); |
| 48 | - core_carregando(" adicionando um novo registro"); | 48 | + core_carregando($trad("msgNovoRegistro",i3GEOadmin.core.dicionario)); |
| 49 | var callback = | 49 | var callback = |
| 50 | { | 50 | { |
| 51 | success:function(o) | 51 | success:function(o) |
| @@ -76,7 +76,7 @@ Obt&eacute;m a lista de operacoes | @@ -76,7 +76,7 @@ Obt&eacute;m a lista de operacoes | ||
| 76 | <PEGAOPERACOES> | 76 | <PEGAOPERACOES> |
| 77 | */ | 77 | */ |
| 78 | function pegaUsuarios(){ | 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 | Function: montaArvore | 82 | Function: montaArvore |
| @@ -143,7 +143,7 @@ function adicionaNosPapeis(no,dados,redesenha) | @@ -143,7 +143,7 @@ function adicionaNosPapeis(no,dados,redesenha) | ||
| 143 | } | 143 | } |
| 144 | if(!redesenha) | 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 | var d = {html:conteudo}; | 147 | var d = {html:conteudo}; |
| 148 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | 148 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 149 | tempNode.isLeaf = true; | 149 | tempNode.isLeaf = true; |
| @@ -152,11 +152,11 @@ function adicionaNosPapeis(no,dados,redesenha) | @@ -152,11 +152,11 @@ function adicionaNosPapeis(no,dados,redesenha) | ||
| 152 | for (var i=0, j=dados.length; i<j; i++) | 152 | for (var i=0, j=dados.length; i<j; i++) |
| 153 | { | 153 | { |
| 154 | if(!tree.getNodeByProperty("id_nopapel",dados[i].id_usuario+"_"+dados[i].id_papel)){ | 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 | if(dados[i].nome != "") | 156 | if(dados[i].nome != "") |
| 157 | {conteudo += " <span><b>"+dados[i].nome+"</b> - "+dados[i].descricao+"</span>";} | 157 | {conteudo += " <span><b>"+dados[i].nome+"</b> - "+dados[i].descricao+"</span>";} |
| 158 | else | 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 | var d = {html:conteudo,id_nopapel:dados[i].id_usuario+"_"+dados[i].id_papel,tipo:"papel"}; | 160 | var d = {html:conteudo,id_nopapel:dados[i].id_usuario+"_"+dados[i].id_papel,tipo:"papel"}; |
| 161 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | 161 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 162 | tempNode.isLeaf = true; | 162 | tempNode.isLeaf = true; |
| @@ -168,13 +168,13 @@ function adicionaNosPapeis(no,dados,redesenha) | @@ -168,13 +168,13 @@ function adicionaNosPapeis(no,dados,redesenha) | ||
| 168 | function adicionaNosUsuarios(dados,redesenha){ | 168 | function adicionaNosUsuarios(dados,redesenha){ |
| 169 | var root = tree.getRoot(); | 169 | var root = tree.getRoot(); |
| 170 | for (var i=0, j=dados.length; i<j; i++){ | 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 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") | 174 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") |
| 175 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} | 175 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} |
| 176 | else | 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 | var d = {html:conteudo,id_usuario:dados[i].id_usuario,tipo:"usuario"}; | 178 | var d = {html:conteudo,id_usuario:dados[i].id_usuario,tipo:"usuario"}; |
| 179 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); | 179 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); |
| 180 | tempNode.enableHighlight = false; | 180 | tempNode.enableHighlight = false; |
| @@ -189,7 +189,7 @@ Abre o editor de um no | @@ -189,7 +189,7 @@ Abre o editor de um no | ||
| 189 | function editar(tipo,id) | 189 | function editar(tipo,id) |
| 190 | { | 190 | { |
| 191 | core_carregando("ativa"); | 191 | core_carregando("ativa"); |
| 192 | - core_carregando(" buscando dados"); | 192 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); |
| 193 | var sUrl = null; | 193 | var sUrl = null; |
| 194 | var callback = | 194 | var callback = |
| 195 | { | 195 | { |
| @@ -229,15 +229,15 @@ function montaDivUsuario(i){ | @@ -229,15 +229,15 @@ function montaDivUsuario(i){ | ||
| 229 | var temp = function(){ | 229 | var temp = function(){ |
| 230 | gravaDados('usuario',i.id_usuario); | 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 | var param = { | 233 | var param = { |
| 234 | "linhas":[ | 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 | {titulo:"Login:",id:"Elogin",size:"50",value:i.login,tipo:"text",div:""}, | 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 | {titulo:"E-mail:",id:"Eemail",size:"50",value:i.email,tipo:"text",div:""}, | 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 | var ins = ""; | 243 | var ins = ""; |
| @@ -246,8 +246,8 @@ function montaDivUsuario(i){ | @@ -246,8 +246,8 @@ function montaDivUsuario(i){ | ||
| 246 | $i("editor_bd").innerHTML = ins; | 246 | $i("editor_bd").innerHTML = ins; |
| 247 | if($i("cAtivo")){ | 247 | if($i("cAtivo")){ |
| 248 | temp = "<select id='Eativo' >"; | 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 | temp += "</select>"; | 251 | temp += "</select>"; |
| 252 | $i("cAtivo").innerHTML = temp; | 252 | $i("cAtivo").innerHTML = temp; |
| 253 | $i("Eativo").value = i.ativo; | 253 | $i("Eativo").value = i.ativo; |
| @@ -272,7 +272,7 @@ Exclui um elemento do atlas | @@ -272,7 +272,7 @@ Exclui um elemento do atlas | ||
| 272 | */ | 272 | */ |
| 273 | function excluir(tipo,id_usuario,id_papel) | 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 | var no = null; | 276 | var no = null; |
| 277 | var sUrl = null; | 277 | var sUrl = null; |
| 278 | if(tipo == "usuario") { | 278 | if(tipo == "usuario") { |
| @@ -297,7 +297,7 @@ function emailsenha(id_usuario) | @@ -297,7 +297,7 @@ function emailsenha(id_usuario) | ||
| 297 | success:function(o){ | 297 | success:function(o){ |
| 298 | try { | 298 | try { |
| 299 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | 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 | setTimeout("core_carregando('desativa')",3000); | 301 | setTimeout("core_carregando('desativa')",3000); |
| 302 | } | 302 | } |
| 303 | else{ | 303 | else{ |
| @@ -310,7 +310,7 @@ function emailsenha(id_usuario) | @@ -310,7 +310,7 @@ function emailsenha(id_usuario) | ||
| 310 | argument: { foo:"foo", bar:"bar" } | 310 | argument: { foo:"foo", bar:"bar" } |
| 311 | }; | 311 | }; |
| 312 | core_carregando("ativa"); | 312 | core_carregando("ativa"); |
| 313 | - core_carregando("Enviando e-mail"); | 313 | + core_carregando($trad("msgEnvia",i3GEOadmin.usuarios.dicionario)); |
| 314 | var sUrl = "../php/usuarios.php?funcao=enviarSenhaEmail&id_usuario="+id_usuario; | 314 | var sUrl = "../php/usuarios.php?funcao=enviarSenhaEmail&id_usuario="+id_usuario; |
| 315 | core_makeRequest(sUrl,callback,'POST'); | 315 | core_makeRequest(sUrl,callback,'POST'); |
| 316 | } | 316 | } |
| @@ -347,7 +347,7 @@ function gravaDados(tipo,id) | @@ -347,7 +347,7 @@ function gravaDados(tipo,id) | ||
| 347 | success:function(o){ | 347 | success:function(o){ |
| 348 | try { | 348 | try { |
| 349 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | 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 | setTimeout("core_carregando('desativa')",3000); | 351 | setTimeout("core_carregando('desativa')",3000); |
| 352 | } | 352 | } |
| 353 | else{ | 353 | else{ |
| @@ -373,7 +373,7 @@ function gravaDados(tipo,id) | @@ -373,7 +373,7 @@ function gravaDados(tipo,id) | ||
| 373 | }; | 373 | }; |
| 374 | if(prog && par){ | 374 | if(prog && par){ |
| 375 | core_carregando("ativa"); | 375 | core_carregando("ativa"); |
| 376 | - core_carregando(" gravando o registro do id= "+id); | 376 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); |
| 377 | var sUrl = prog+par; | 377 | var sUrl = prog+par; |
| 378 | core_makeRequest(sUrl,callback,'POST'); | 378 | core_makeRequest(sUrl,callback,'POST'); |
| 379 | } | 379 | } |
admin/js/webservices.js
| @@ -44,18 +44,18 @@ i3GEOadmin.webservices = { | @@ -44,18 +44,18 @@ i3GEOadmin.webservices = { | ||
| 44 | elCell.innerHTML = "<pre ><p style=cursor:default >" + oData + "</pre>"; | 44 | elCell.innerHTML = "<pre ><p style=cursor:default >" + oData + "</pre>"; |
| 45 | }, | 45 | }, |
| 46 | formatExclui: function(elCell, oRecord, oColumn){ | 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 | formatMais: function(elCell, oRecord, oColumn){ | 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 | defColunas: function(){ | 52 | defColunas: function(){ |
| 53 | return [ | 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 | {label:"id",key:"id_ws", formatter:i3GEOadmin.webservices.formatTexto}, | 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,7 +85,7 @@ i3GEOadmin.webservices = { | ||
| 85 | tipows = u[1]; | 85 | tipows = u[1]; |
| 86 | } | 86 | } |
| 87 | catch(e){tipows = "";} | 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 | tabela: function(dados){ | 90 | tabela: function(dados){ |
| 91 | if(i3GEOadmin.webservices.dados == ""){ | 91 | if(i3GEOadmin.webservices.dados == ""){ |
| @@ -123,7 +123,7 @@ i3GEOadmin.webservices = { | @@ -123,7 +123,7 @@ i3GEOadmin.webservices = { | ||
| 123 | } | 123 | } |
| 124 | if (column.key == 'mais'){ | 124 | if (column.key == 'mais'){ |
| 125 | core_carregando("ativa"); | 125 | core_carregando("ativa"); |
| 126 | - core_carregando("buscando dados..."); | 126 | + core_carregando($trad("msgBuscaDados",i3GEOadmin.core.dicionario)); |
| 127 | $clicouId = registro.getData('id_ws'); | 127 | $clicouId = registro.getData('id_ws'); |
| 128 | $recordid = registro.getId(); | 128 | $recordid = registro.getId(); |
| 129 | sUrl = "../php/webservices.php?funcao=pegaDados&id_ws="+$clicouId; | 129 | sUrl = "../php/webservices.php?funcao=pegaDados&id_ws="+$clicouId; |
| @@ -155,7 +155,7 @@ i3GEOadmin.webservices = { | @@ -155,7 +155,7 @@ i3GEOadmin.webservices = { | ||
| 155 | var editorBotoes,ins, | 155 | var editorBotoes,ins, |
| 156 | novoel = document.createElement("div"); | 156 | novoel = document.createElement("div"); |
| 157 | novoel.id = "janela_editor2"; | 157 | novoel.id = "janela_editor2"; |
| 158 | - ins = '<div class="hd">Editor</div>'; | 158 | + ins = '<div class="hd">'+ $trad("editor",i3GEOadmin.core.dicionario) +'</div>'; |
| 159 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; | 159 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
| 160 | ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>"; | 160 | ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>"; |
| 161 | ins += "<div id='letras_W'></div>"; | 161 | ins += "<div id='letras_W'></div>"; |
| @@ -164,8 +164,8 @@ i3GEOadmin.webservices = { | @@ -164,8 +164,8 @@ i3GEOadmin.webservices = { | ||
| 164 | document.body.appendChild(novoel); | 164 | document.body.appendChild(novoel); |
| 165 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); | 165 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 166 | editorBotoes.addButtons([ | 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 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); | 170 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 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 } ); | 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,16 +178,16 @@ i3GEOadmin.webservices = { | ||
| 178 | formulario: function(i){ | 178 | formulario: function(i){ |
| 179 | var param = { | 179 | var param = { |
| 180 | "linhas":[ | 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 | var ins = ""; | 187 | var ins = ""; |
| 188 | ins += core_geraLinhas(param); | 188 | ins += core_geraLinhas(param); |
| 189 | 189 | ||
| 190 | - ins += "<p>Tipo:<br>"; | 190 | + ins += "<p>"+ $trad("tipo1",i3GEOadmin.webservices.dicionario) +"<br>"; |
| 191 | ins += "<select id='Etipo_ws' />"; | 191 | ins += "<select id='Etipo_ws' />"; |
| 192 | ins += "<option value='' "; | 192 | ins += "<option value='' "; |
| 193 | if (i.tipo_ws == ""){ins += "selected";} | 193 | if (i.tipo_ws == ""){ins += "selected";} |
| @@ -231,7 +231,7 @@ i3GEOadmin.webservices = { | @@ -231,7 +231,7 @@ i3GEOadmin.webservices = { | ||
| 231 | tipows = u[1]; | 231 | tipows = u[1]; |
| 232 | } | 232 | } |
| 233 | catch(e){tipows = "";} | 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 | return; | 235 | return; |
| 236 | } | 236 | } |
| 237 | var i,temp, | 237 | var i,temp, |
| @@ -252,7 +252,7 @@ i3GEOadmin.webservices = { | @@ -252,7 +252,7 @@ i3GEOadmin.webservices = { | ||
| 252 | i3GEOadmin.webservices.tabela(novo); | 252 | i3GEOadmin.webservices.tabela(novo); |
| 253 | }, | 253 | }, |
| 254 | exclui: function(id,row){ | 254 | exclui: function(id,row){ |
| 255 | - var mensagem = " excluindo o registro do id= "+id, | 255 | + var mensagem = $trad("msgExclui",i3GEOadmin.core.dicionario)+id, |
| 256 | sUrl = "../php/webservices.php?funcao=excluir&id="+id; | 256 | sUrl = "../php/webservices.php?funcao=excluir&id="+id; |
| 257 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.webservices.dataTable); | 257 | core_excluiLinha(sUrl,row,mensagem,"",i3GEOadmin.webservices.dataTable); |
| 258 | i3GEOadmin.webservices.dados = ""; | 258 | i3GEOadmin.webservices.dados = ""; |
| @@ -270,13 +270,13 @@ i3GEOadmin.webservices = { | @@ -270,13 +270,13 @@ i3GEOadmin.webservices = { | ||
| 270 | } | 270 | } |
| 271 | par += "&id_ws="+id; | 271 | par += "&id_ws="+id; |
| 272 | core_carregando("ativa"); | 272 | core_carregando("ativa"); |
| 273 | - core_carregando(" gravando o registro do id= "+id); | 273 | + core_carregando($trad("gravaId",i3GEOadmin.core.dicionario)+id); |
| 274 | sUrl = "../php/webservices.php?funcao=alterarWS"+par; | 274 | sUrl = "../php/webservices.php?funcao=alterarWS"+par; |
| 275 | callback = { | 275 | callback = { |
| 276 | success:function(o){ | 276 | success:function(o){ |
| 277 | try { | 277 | try { |
| 278 | if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | 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 | setTimeout("core_carregando('desativa')",3000); | 280 | setTimeout("core_carregando('desativa')",3000); |
| 281 | } | 281 | } |
| 282 | else{ | 282 | else{ |
| @@ -293,4 +293,4 @@ i3GEOadmin.webservices = { | @@ -293,4 +293,4 @@ i3GEOadmin.webservices = { | ||
| 293 | }; | 293 | }; |
| 294 | core_makeRequest(sUrl,callback); | 294 | core_makeRequest(sUrl,callback); |
| 295 | } | 295 | } |
| 296 | -}; | ||
| 297 | \ No newline at end of file | 296 | \ No newline at end of file |
| 297 | +}; |
admin/php/metaestat_uploadshp_submit.php
| @@ -51,17 +51,28 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | @@ -51,17 +51,28 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | ||
| 51 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shp"); | 51 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shp"); |
| 52 | if($status != 1) | 52 | if($status != 1) |
| 53 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHP";exit;} | 53 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHP";exit;} |
| 54 | + | ||
| 54 | $Arquivo = $_FILES['i3GEOuploadshx']['tmp_name']; | 55 | $Arquivo = $_FILES['i3GEOuploadshx']['tmp_name']; |
| 55 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shx"); | 56 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shx"); |
| 56 | if($status != 1) | 57 | if($status != 1) |
| 57 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHX";exit;} | 58 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHX";exit;} |
| 59 | + | ||
| 58 | $Arquivo = $_FILES['i3GEOuploaddbf']['tmp_name']; | 60 | $Arquivo = $_FILES['i3GEOuploaddbf']['tmp_name']; |
| 59 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".dbf"); | 61 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".dbf"); |
| 60 | if($status != 1) | 62 | if($status != 1) |
| 61 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo DBF";exit;} | 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 | $arqshp = $dir_tmp."/".$nomePrefixo.".shp"; | 76 | $arqshp = $dir_tmp."/".$nomePrefixo.".shp"; |
| 66 | 77 | ||
| 67 | //pega os parametros de conexao | 78 | //pega os parametros de conexao |
| @@ -75,6 +86,9 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | @@ -75,6 +86,9 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | ||
| 75 | $mapObj = ms_newMapObjFromString("MAP END"); | 86 | $mapObj = ms_newMapObjFromString("MAP END"); |
| 76 | $layer = ms_newLayerObj($mapObj); | 87 | $layer = ms_newLayerObj($mapObj); |
| 77 | $layer->set("data",$arqshp); | 88 | $layer->set("data",$arqshp); |
| 89 | + if(file_exists($dir_tmp."/".$nomePrefixo.".prj")){ | ||
| 90 | + $layer->setprojection("AUTO"); | ||
| 91 | + } | ||
| 78 | $layer->open(); | 92 | $layer->open(); |
| 79 | $colunasTemp = $layer->getItems(); | 93 | $colunasTemp = $layer->getItems(); |
| 80 | $colunas = array(); | 94 | $colunas = array(); |
| @@ -190,8 +204,30 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | @@ -190,8 +204,30 @@ if (isset($_FILES['i3GEOuploadshp']['name'])){ | ||
| 190 | sleep(1); | 204 | sleep(1); |
| 191 | $srid = 4326; | 205 | $srid = 4326; |
| 192 | $escapar = "'"; | 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 | for ($i=0; $i<$numshapes;$i++){ | 223 | for ($i=0; $i<$numshapes;$i++){ |
| 194 | $s = $layer->getShape(new resultObj($i)); | 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 | $vs = array(); | 231 | $vs = array(); |
| 196 | 232 | ||
| 197 | foreach($colunas as $coluna){ | 233 | foreach($colunas as $coluna){ |
admin/principal.html
| @@ -6,11 +6,21 @@ | @@ -6,11 +6,21 @@ | ||
| 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| 7 | <link rel="stylesheet" type="text/css" href="../css/input.css"> | 7 | <link rel="stylesheet" type="text/css" href="../css/input.css"> |
| 8 | <link rel="stylesheet" type="text/css" href="html/admin.css"> | 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 | <script type="text/javascript" src="js/core.js"></script> | 19 | <script type="text/javascript" src="js/core.js"></script> |
| 10 | <script type="text/javascript" src="dicionario/core.js"></script> | 20 | <script type="text/javascript" src="dicionario/core.js"></script> |
| 11 | <script type="text/javascript" src="dicionario/principal.js"></script> | 21 | <script type="text/javascript" src="dicionario/principal.js"></script> |
| 12 | </head> | 22 | </head> |
| 13 | -<body class=" yui-skin-sam fundoPonto"> | 23 | +<body class=" yui-skin-sam"> |
| 14 | <center> | 24 | <center> |
| 15 | <div class="bordaSuperior"> </div> | 25 | <div class="bordaSuperior"> </div> |
| 16 | <div class="mascaraPrincipal" id="divGeral"> | 26 | <div class="mascaraPrincipal" id="divGeral"> |
classesphp/classe_analise.php
| @@ -1274,8 +1274,7 @@ class Analise | @@ -1274,8 +1274,7 @@ class Analise | ||
| 1274 | $layerdestino->close(); | 1274 | $layerdestino->close(); |
| 1275 | $rect = $this->mapa->extent; | 1275 | $rect = $this->mapa->extent; |
| 1276 | $projInObj = $layerorigem->getProjection(); | 1276 | $projInObj = $layerorigem->getProjection(); |
| 1277 | - if ($projInObj == "") | ||
| 1278 | - { | 1277 | + if ($projInObj == ""){ |
| 1279 | $projInObj = ms_newprojectionobj("proj=longlat,ellps=WGS84,datum=WGS84,no_defs"); | 1278 | $projInObj = ms_newprojectionobj("proj=longlat,ellps=WGS84,datum=WGS84,no_defs"); |
| 1280 | } | 1279 | } |
| 1281 | $projOutObj = ms_newprojectionobj("proj=poly,ellps=GRS67,lat_0=".$rect->miny.",lon_0=".$rect->minx.",x_0=5000000,y_0=10000000"); | 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,12 +1290,11 @@ class Analise | ||
| 1291 | $def[] = array("dist_m","N","10","2"); | 1290 | $def[] = array("dist_m","N","10","2"); |
| 1292 | $def[] = array("origem","C","255"); | 1291 | $def[] = array("origem","C","255"); |
| 1293 | $def[] = array("destino","C","255"); | 1292 | $def[] = array("destino","C","255"); |
| 1294 | - if($this->dbaseExiste == false) | ||
| 1295 | - { | 1293 | + if($this->dbaseExiste == false){ |
| 1296 | $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); | 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 | //acrescenta os pontos no novo shapefile | 1299 | //acrescenta os pontos no novo shapefile |
| 1302 | $dbname = $nomeshp.".dbf"; | 1300 | $dbname = $nomeshp.".dbf"; |
| @@ -1304,26 +1302,23 @@ class Analise | @@ -1304,26 +1302,23 @@ class Analise | ||
| 1304 | $db=xbase_open($dbname,2); | 1302 | $db=xbase_open($dbname,2); |
| 1305 | else | 1303 | else |
| 1306 | $db=dbase_open($dbname,2); | 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 | $valororigem = $sorigem->values[$itemorigem]; | 1307 | $valororigem = $sorigem->values[$itemorigem]; |
| 1312 | } | 1308 | } |
| 1313 | - else | ||
| 1314 | - {$valororigem = ""; | 1309 | + else{ |
| 1310 | + $valororigem = ""; | ||
| 1315 | } | 1311 | } |
| 1316 | foreach ($shapesdestino as $sdestino) | 1312 | foreach ($shapesdestino as $sdestino) |
| 1317 | { | 1313 | { |
| 1318 | $linha = ms_newLineObj(); | 1314 | $linha = ms_newLineObj(); |
| 1319 | $linha->add($sorigem->getCentroid()); | 1315 | $linha->add($sorigem->getCentroid()); |
| 1320 | $linha->add($sdestino->getCentroid()); | 1316 | $linha->add($sdestino->getCentroid()); |
| 1321 | - if($itemdestino != "") | ||
| 1322 | - { | 1317 | + if($itemdestino != ""){ |
| 1323 | $valordestino = $sdestino->values[$itemdestino]; | 1318 | $valordestino = $sdestino->values[$itemdestino]; |
| 1324 | } | 1319 | } |
| 1325 | - else | ||
| 1326 | - {$valordestino = ""; | 1320 | + else{ |
| 1321 | + $valordestino = ""; | ||
| 1327 | } | 1322 | } |
| 1328 | $ShapeObj = ms_newShapeObj(MS_SHAPE_LINE); | 1323 | $ShapeObj = ms_newShapeObj(MS_SHAPE_LINE); |
| 1329 | $ShapeObj->add($linha); | 1324 | $ShapeObj->add($linha); |
| @@ -1619,7 +1614,7 @@ class Analise | @@ -1619,7 +1614,7 @@ class Analise | ||
| 1619 | $nomeCentroides = nomeRandomico(); | 1614 | $nomeCentroides = nomeRandomico(); |
| 1620 | $nomeshp = $this->diretorio."/".$nomeCentroides; | 1615 | $nomeshp = $this->diretorio."/".$nomeCentroides; |
| 1621 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); | 1616 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); |
| 1622 | - | 1617 | + |
| 1623 | //$shapes = $shape[0]; | 1618 | //$shapes = $shape[0]; |
| 1624 | foreach($shapes as $shape){ | 1619 | foreach($shapes as $shape){ |
| 1625 | $LineObj = ms_newLineObj(); | 1620 | $LineObj = ms_newLineObj(); |
classesphp/classe_atributos.php
| @@ -127,7 +127,7 @@ class Atributos | @@ -127,7 +127,7 @@ class Atributos | ||
| 127 | } | 127 | } |
| 128 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 128 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
| 129 | $this->projO = $this->mapa->getProjection(); | 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,7 +2382,7 @@ class Atributos | ||
| 2382 | } | 2382 | } |
| 2383 | $conta = $conta + 1; | 2383 | $conta = $conta + 1; |
| 2384 | } | 2384 | } |
| 2385 | - | 2385 | + |
| 2386 | if($wkt == "sim"){ | 2386 | if($wkt == "sim"){ |
| 2387 | $arraytemp = array( | 2387 | $arraytemp = array( |
| 2388 | "alias"=>"wkt", | 2388 | "alias"=>"wkt", |
classesphp/classe_mapa.php
| @@ -1787,7 +1787,8 @@ class Mapa | @@ -1787,7 +1787,8 @@ class Mapa | ||
| 1787 | // adiciona os parametros no nivel do mapa | 1787 | // adiciona os parametros no nivel do mapa |
| 1788 | $this->mapa->setmetadata("wms_title","i3Geo"); | 1788 | $this->mapa->setmetadata("wms_title","i3Geo"); |
| 1789 | $this->mapa->setmetadata("wms_onlineresource","http://".$h.$nomeurl); | 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 | $this->mapa->setmetadata("wms_getcontext_enabled","1"); | 1792 | $this->mapa->setmetadata("wms_getcontext_enabled","1"); |
| 1792 | foreach ($this->layers as $layer) | 1793 | foreach ($this->layers as $layer) |
| 1793 | { | 1794 | { |
| @@ -2213,10 +2214,10 @@ class Mapa | @@ -2213,10 +2214,10 @@ class Mapa | ||
| 2213 | function converteInterfacePara($interface){ | 2214 | function converteInterfacePara($interface){ |
| 2214 | if($interface == "openlayers"){ | 2215 | if($interface == "openlayers"){ |
| 2215 | $prefixo = "ol"; | 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 | foreach($this->layers as $l){ | 2222 | foreach($this->layers as $l){ |
| 2222 | $opacidadeM = $l->getmetadata($prefixo."opacity"); | 2223 | $opacidadeM = $l->getmetadata($prefixo."opacity"); |
classesphp/classe_selecao.php
| @@ -124,7 +124,7 @@ $ext - extens&atilde;o geogr&aacute;fica do mapa | @@ -124,7 +124,7 @@ $ext - extens&atilde;o geogr&aacute;fica do mapa | ||
| 124 | } | 124 | } |
| 125 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 125 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
| 126 | $this->projO = $this->mapa->getProjection(); | 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,8 +789,11 @@ $dir_tmp - localiza&ccedil;&atilde;o do diret&oacute;rio tempor&aacute;rio | ||
| 789 | { | 789 | { |
| 790 | if(!$this->layer){return "erro";} | 790 | if(!$this->layer){return "erro";} |
| 791 | $this->layer->setfilter(""); | 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 | $novolayer = criaLayer($this->mapa,$this->layer->type,MS_DEFAULT,"Seleção de ".(pegaNome($this->layer))." (".$this->nome.")",$metaClasse="SIM"); | 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 | $novolayer->set("data",$nomeshp.".shp"); | 797 | $novolayer->set("data",$nomeshp.".shp"); |
| 795 | $novolayer->set("name",basename($nomeshp)); | 798 | $novolayer->set("name",basename($nomeshp)); |
| 796 | $down = "nao"; | 799 | $down = "nao"; |
classesphp/classe_shp.php
| @@ -257,7 +257,9 @@ $projecao - codigo epsg da proje&ccedil;&atilde;o das coordenadas | @@ -257,7 +257,9 @@ $projecao - codigo epsg da proje&ccedil;&atilde;o das coordenadas | ||
| 257 | $poPoint->setXY($xy[$i],$xy[$i+1]); | 257 | $poPoint->setXY($xy[$i],$xy[$i+1]); |
| 258 | if($projecao != "") | 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 | $projInObj = ms_newprojectionobj("init=epsg:".$projecao); | 263 | $projInObj = ms_newprojectionobj("init=epsg:".$projecao); |
| 262 | $poPoint->project($projInObj, $projOutObj); | 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,7 +425,7 @@ Calcula a extens&atilde;o geogr&aacute;fica de um tema e ajusta o mapa para essa | ||
| 425 | if(!$this->layer){return "erro";} | 425 | if(!$this->layer){return "erro";} |
| 426 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 426 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
| 427 | $projO = $this->mapa->getProjection(); | 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 | $prjMapa = ""; | 430 | $prjMapa = ""; |
| 431 | $prjTema = ""; | 431 | $prjTema = ""; |
| @@ -829,7 +829,7 @@ $wkt - boolean indicando se $xy e um WKT | @@ -829,7 +829,7 @@ $wkt - boolean indicando se $xy e um WKT | ||
| 829 | $c = $shp->getCentroid(); | 829 | $c = $shp->getCentroid(); |
| 830 | $c = $c->x; | 830 | $c = $c->x; |
| 831 | if($c > -181 && $c < 181){ | 831 | if($c > -181 && $c < 181){ |
| 832 | - $pinlayer->setprojection("proj=latlong,a=6378137,b=6378137"); | 832 | + $pinlayer->setprojection(pegaProjecaoDefault("proj4")); |
| 833 | } | 833 | } |
| 834 | else{ | 834 | else{ |
| 835 | $pinlayer->setprojection($this->mapa->getProjection()); | 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,7 +1080,8 @@ Calcula a extens&atilde;o geogr&aacute;fica dos elementos selecionados de um tem | ||
| 1080 | if(!$this->layer){return "erro";} | 1080 | if(!$this->layer){return "erro";} |
| 1081 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 1081 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
| 1082 | $projO = $this->mapa->getProjection(); | 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 | $extatual = $this->mapa->extent; | 1086 | $extatual = $this->mapa->extent; |
| 1086 | $prjMapa = $this->mapa->getProjection(); | 1087 | $prjMapa = $this->mapa->getProjection(); |
classesphp/funcoes_gerais.php
| @@ -716,7 +716,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") | @@ -716,7 +716,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") | ||
| 716 | $i = $interface; | 716 | $i = $interface; |
| 717 | } | 717 | } |
| 718 | if($i == "googlemaps"){ | 718 | if($i == "googlemaps"){ |
| 719 | - $objMapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | 719 | + $objMapa->setProjection(pegaProjecaoDefault("proj4")); |
| 720 | } | 720 | } |
| 721 | if($ext && $ext != ""){ | 721 | if($ext && $ext != ""){ |
| 722 | $e = explode(" ",$ext); | 722 | $e = explode(" ",$ext); |
| @@ -769,7 +769,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") | @@ -769,7 +769,7 @@ function retornaReferenciaDinamica($ext="",$w="",$h="") | ||
| 769 | $s = "var refimagem='".$nomer."';var refwidth=".$w.";var refheight=".$h.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; | 769 | $s = "var refimagem='".$nomer."';var refwidth=".$w.";var refheight=".$h.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; |
| 770 | $mapa = ms_newMapObj($map_file); | 770 | $mapa = ms_newMapObj($map_file); |
| 771 | if($i == "googlemaps"){ | 771 | if($i == "googlemaps"){ |
| 772 | - $mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | 772 | + $mapa->setProjection(pegaProjecaoDefault("proj4")); |
| 773 | } | 773 | } |
| 774 | $ref = $mapa->reference; | 774 | $ref = $mapa->reference; |
| 775 | $r = $ref->extent; | 775 | $r = $ref->extent; |
| @@ -1395,11 +1395,15 @@ $dir_tmp {string} - Diret&oacute;rio tempor&aacute;rio | @@ -1395,11 +1395,15 @@ $dir_tmp {string} - Diret&oacute;rio tempor&aacute;rio | ||
| 1395 | 1395 | ||
| 1396 | $nomeRand {boleano} - Gera um nome randomico para o shapefile (TRUE) ou utiliza o nome do tema (FALSE) | 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 | Retorno: | 1402 | Retorno: |
| 1399 | 1403 | ||
| 1400 | {string} - nome do arquivo criado ou false se ocorrer erro | 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 | $versao = versao(); | 1408 | $versao = versao(); |
| 1405 | $versao = $versao["principal"]; | 1409 | $versao = $versao["principal"]; |
| @@ -1412,24 +1416,42 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1412,24 +1416,42 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1412 | } | 1416 | } |
| 1413 | $map = @ms_newMapObj($map_file); | 1417 | $map = @ms_newMapObj($map_file); |
| 1414 | $layer = $map->getlayerbyname($tema); | 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 | $layer->set("template","none.htm"); | 1433 | $layer->set("template","none.htm"); |
| 1417 | $diretorio = dirname($dir_tmp); | 1434 | $diretorio = dirname($dir_tmp); |
| 1418 | $tipol = MS_SHP_POINT; | 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 | $novonomelayer = str_replace(".","-",$novonomelayer); | 1449 | $novonomelayer = str_replace(".","-",$novonomelayer); |
| 1429 | $nomeshp = $dir_tmp."/".$novonomelayer; | 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 | $novoshpf = ms_newShapefileObj($nomeshp, $tipol); | 1456 | $novoshpf = ms_newShapefileObj($nomeshp, $tipol); |
| 1435 | 1457 | ||
| @@ -1461,9 +1483,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1461,9 +1483,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1461 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); | 1483 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
| 1462 | $novoshpf->addShape($shape); | 1484 | $novoshpf->addShape($shape); |
| 1463 | $resultadoFinal = true; | 1485 | $resultadoFinal = true; |
| 1486 | + | ||
| 1464 | } | 1487 | } |
| 1465 | else{ | 1488 | else{ |
| 1466 | - $shapesSel = retornaShapesSelecionados($layer,$map_file,$map); | 1489 | + $shapesSel = retornaShapesSelecionados($layer,$map_file,$map,false); |
| 1467 | $items = pegaItens($layer); | 1490 | $items = pegaItens($layer); |
| 1468 | // cria o dbf | 1491 | // cria o dbf |
| 1469 | $def = array(); | 1492 | $def = array(); |
| @@ -1477,10 +1500,12 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1477,10 +1500,12 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1477 | $def[] = array($temp,"C","254"); | 1500 | $def[] = array($temp,"C","254"); |
| 1478 | $cni = $cni + 1; | 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 | $dbname = $nomeshp.".dbf"; | 1509 | $dbname = $nomeshp.".dbf"; |
| 1485 | $reg = array(); | 1510 | $reg = array(); |
| 1486 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); | 1511 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
| @@ -1489,8 +1514,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1489,8 +1514,10 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1489 | if ($res_count > 0){ | 1514 | if ($res_count > 0){ |
| 1490 | for ($i = 0; $i < $res_count; ++$i){ | 1515 | for ($i = 0; $i < $res_count; ++$i){ |
| 1491 | $shape = $shapesSel[$i]; | 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 | $vreg = $shape->values[$ni]; | 1521 | $vreg = $shape->values[$ni]; |
| 1495 | if(strlen($vreg) > 255){ | 1522 | if(strlen($vreg) > 255){ |
| 1496 | $vreg = substr($vreg,0,255); | 1523 | $vreg = substr($vreg,0,255); |
| @@ -1508,7 +1535,6 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1508,7 +1535,6 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1508 | xbase_close($db); | 1535 | xbase_close($db); |
| 1509 | else | 1536 | else |
| 1510 | dbase_close($db); | 1537 | dbase_close($db); |
| 1511 | - $layer->close(); | ||
| 1512 | // | 1538 | // |
| 1513 | //verifica a quantidade de registros no final | 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,16 +1559,34 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
| 1533 | {unlink($nomeshp.".shp");} | 1559 | {unlink($nomeshp.".shp");} |
| 1534 | if(file_exists($nomeshp.".shx")) | 1560 | if(file_exists($nomeshp.".shx")) |
| 1535 | {unlink($nomeshp.".shx");} | 1561 | {unlink($nomeshp.".shx");} |
| 1562 | + if(file_exists($nomeshp.".prj")) | ||
| 1563 | + {unlink($nomeshp.".prj");} | ||
| 1536 | $resultadoFinal = false; | 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 | Function: downloadTema (depreciado) | 1592 | Function: downloadTema (depreciado) |
| @@ -1595,7 +1639,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1595,7 +1639,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1595 | //cria o arquivo mapfile, caso ele não exista, que servirá de base para obtenção dos dados | 1639 | //cria o arquivo mapfile, caso ele não exista, que servirá de base para obtenção dos dados |
| 1596 | // | 1640 | // |
| 1597 | $nomeRand = true; | 1641 | $nomeRand = true; |
| 1598 | - //echo $versao;exit; | 1642 | + $projecao = pegaProjecaoDefault(); |
| 1599 | if (($map_file == "") || (!@ms_newMapObj($map_file))){ //a funcao foi chamada do aplicativo datadownload | 1643 | if (($map_file == "") || (!@ms_newMapObj($map_file))){ //a funcao foi chamada do aplicativo datadownload |
| 1600 | if($base == "" or !isset($base)){ | 1644 | if($base == "" or !isset($base)){ |
| 1601 | $base = ""; | 1645 | $base = ""; |
| @@ -1624,6 +1668,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1624,6 +1668,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1624 | } | 1668 | } |
| 1625 | $map_tmp = ms_newMapObj($base); | 1669 | $map_tmp = ms_newMapObj($base); |
| 1626 | $map_file = $dir_tmp."/".nomerandomico(20).".map"; | 1670 | $map_file = $dir_tmp."/".nomerandomico(20).".map"; |
| 1671 | + $map_tmp->setProjection($projecao["proj4"]); | ||
| 1627 | $map_tmp->save($map_file); | 1672 | $map_tmp->save($map_file); |
| 1628 | $nomeRand = false; | 1673 | $nomeRand = false; |
| 1629 | } | 1674 | } |
| @@ -1750,6 +1795,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1750,6 +1795,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1750 | unlink($nomeshp.".dbf"); | 1795 | unlink($nomeshp.".dbf"); |
| 1751 | unlink($nomeshp.".shp"); | 1796 | unlink($nomeshp.".shp"); |
| 1752 | unlink($nomeshp.".shx"); | 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,8 +1808,9 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1762 | // | 1808 | // |
| 1763 | $nomecopia = $dir_tmp."/".basename($meta); | 1809 | $nomecopia = $dir_tmp."/".basename($meta); |
| 1764 | if(file_exists($meta)){ | 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 | $resultado[] = basename($dir_tmp)."/".basename($nomecopia); | 1815 | $resultado[] = basename($dir_tmp)."/".basename($nomecopia); |
| 1769 | } | 1816 | } |
| @@ -1805,12 +1852,19 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -1805,12 +1852,19 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1805 | } | 1852 | } |
| 1806 | // | 1853 | // |
| 1807 | //se nao existir selecao seleciona por box | 1854 | //se nao existir selecao seleciona por box |
| 1855 | + //o box vem do mapfile original | ||
| 1808 | // | 1856 | // |
| 1809 | if(!file_exists($sel->qyfile) || $numSel < 1){ | 1857 | if(!file_exists($sel->qyfile) || $numSel < 1){ |
| 1810 | $box = $rectextent->minx." ".$rectextent->miny." ".$rectextent->maxx." ".$rectextent->maxy; | 1858 | $box = $rectextent->minx." ".$rectextent->miny." ".$rectextent->maxx." ".$rectextent->maxy; |
| 1811 | $sel->selecaoBOX("novo",$box); | 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 | if($nomeshp == false){ | 1868 | if($nomeshp == false){ |
| 1815 | return array("arquivos"=>"<span style=color:red >Ocorreu um erro, tente novamente","nreg"=>0); | 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,6 +1876,9 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1822 | 1876 | ||
| 1823 | $resultado[] = str_replace($radtmp."/","",$nomeshp).".dbf"; | 1877 | $resultado[] = str_replace($radtmp."/","",$nomeshp).".dbf"; |
| 1824 | $dataArquivos[] = date ("F d Y H:i:s.",filemtime($nomeshp.".dbf")); | 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,6 +1894,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 1837 | if($db){$nreg = xbase_numrecords($db);} | 1894 | if($db){$nreg = xbase_numrecords($db);} |
| 1838 | } | 1895 | } |
| 1839 | } | 1896 | } |
| 1897 | + | ||
| 1840 | // | 1898 | // |
| 1841 | //gera um mapfile para download | 1899 | //gera um mapfile para download |
| 1842 | // | 1900 | // |
| @@ -2475,17 +2533,17 @@ function retornaShapesMapext($objLayer,$objMapa){ | @@ -2475,17 +2533,17 @@ function retornaShapesMapext($objLayer,$objMapa){ | ||
| 2475 | function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false){ | 2533 | function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false){ |
| 2476 | $shapes = array(); | 2534 | $shapes = array(); |
| 2477 | $qyfile = dirname($map_file)."/".$objLayer->name.".php"; | 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 | $handle = fopen ($qyfile, "r"); | 2540 | $handle = fopen ($qyfile, "r"); |
| 2483 | $conteudo = fread ($handle, filesize ($qyfile)); | 2541 | $conteudo = fread ($handle, filesize ($qyfile)); |
| 2484 | fclose ($handle); | 2542 | fclose ($handle); |
| 2485 | $listaDeIndices = unserialize($conteudo); | 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 | $versao = versao(); | 2548 | $versao = versao(); |
| 2491 | $versao = $versao["principal"]; | 2549 | $versao = $versao["principal"]; |
| @@ -2496,14 +2554,11 @@ function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false) | @@ -2496,14 +2554,11 @@ function retornaShapesSelecionados($objLayer,$map_file,$objMapa,$indexado=false) | ||
| 2496 | 2554 | ||
| 2497 | $sopen = $objLayer->open(); | 2555 | $sopen = $objLayer->open(); |
| 2498 | if($sopen == MS_FAILURE){return "erro";} | 2556 | if($sopen == MS_FAILURE){return "erro";} |
| 2499 | - $objLayer->open(); | ||
| 2500 | $res_count = $objLayer->getNumresults(); | 2557 | $res_count = $objLayer->getNumresults(); |
| 2501 | $centroides = array(); | 2558 | $centroides = array(); |
| 2502 | $shapes = array(); | 2559 | $shapes = array(); |
| 2503 | //pega um shape especifico | 2560 | //pega um shape especifico |
| 2504 | - | ||
| 2505 | - for ($i = 0; $i < $res_count; ++$i) | ||
| 2506 | - { | 2561 | + for ($i = 0; $i < $res_count; ++$i){ |
| 2507 | if($versao >= 6){ | 2562 | if($versao >= 6){ |
| 2508 | $shape = $objLayer->getShape($objLayer->getResult($i)); | 2563 | $shape = $objLayer->getShape($objLayer->getResult($i)); |
| 2509 | $shp_index = $shape->index; | 2564 | $shp_index = $shape->index; |
| @@ -2839,4 +2894,39 @@ function pegaDadosAdminKey($sql,$subsEsquema){ | @@ -2839,4 +2894,39 @@ function pegaDadosAdminKey($sql,$subsEsquema){ | ||
| 2839 | return array(); | 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,22 +111,26 @@ function iniciaMapa() | ||
| 111 | include_once("funcoes_gerais.php"); | 111 | include_once("funcoes_gerais.php"); |
| 112 | } | 112 | } |
| 113 | validaAcessoTemas($map_file); | 113 | validaAcessoTemas($map_file); |
| 114 | - if(!isset($kmlurl)) | ||
| 115 | - {$kmlurl = "";} | 114 | + if(!isset($kmlurl)){ |
| 115 | + $kmlurl = ""; | ||
| 116 | + } | ||
| 116 | error_reporting(0); | 117 | error_reporting(0); |
| 117 | - if(!isset($interface)){$interface = "";} | 118 | + if(!isset($interface)){ |
| 119 | + $interface = ""; | ||
| 120 | + } | ||
| 118 | if($interface == "openlayers"){ | 121 | if($interface == "openlayers"){ |
| 119 | $m = ms_newMapObj($map_file); | 122 | $m = ms_newMapObj($map_file); |
| 120 | $e = $m->extent; | 123 | $e = $m->extent; |
| 121 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); | 124 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
| 122 | $c = $m->numlayers; | 125 | $c = $m->numlayers; |
| 123 | - for ($i=0;$i < $c;++$i) | ||
| 124 | - { | 126 | + for ($i=0;$i < $c;++$i){ |
| 125 | $layer = $m->getlayer($i); | 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 | $layer->setmetadata("olopacity",$layer->opacity); | 134 | $layer->setmetadata("olopacity",$layer->opacity); |
| 131 | } | 135 | } |
| 132 | $m->save($map_file); | 136 | $m->save($map_file); |
| @@ -137,7 +141,7 @@ function iniciaMapa() | @@ -137,7 +141,7 @@ function iniciaMapa() | ||
| 137 | $e = $m->extent; | 141 | $e = $m->extent; |
| 138 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); | 142 | $ext = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
| 139 | if($interface == "googlemaps"){ | 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 | $c = $m->numlayers; | 146 | $c = $m->numlayers; |
| 143 | for ($i=0;$i < $c;++$i) | 147 | for ($i=0;$i < $c;++$i) |
exemplos/index.html
| @@ -5,13 +5,13 @@ | @@ -5,13 +5,13 @@ | ||
| 5 | 5 | ||
| 6 | <link rel="stylesheet" type="text/css" href="../admin/html/admin.css"> | 6 | <link rel="stylesheet" type="text/css" href="../admin/html/admin.css"> |
| 7 | <style> | 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 | </style> | 16 | </style> |
| 17 | <script> | 17 | <script> |
| @@ -20,7 +20,7 @@ body,td { | @@ -20,7 +20,7 @@ body,td { | ||
| 20 | */ | 20 | */ |
| 21 | </script> | 21 | </script> |
| 22 | </head> | 22 | </head> |
| 23 | -<body class="yui-skin-sam fundoPonto"> | 23 | +<body class="yui-skin-sam"> |
| 24 | <center> | 24 | <center> |
| 25 | <div class="bordaSuperior"> </div> | 25 | <div class="bordaSuperior"> </div> |
| 26 | <div class="mascaraPrincipal" id="divGeral"> | 26 | <div class="mascaraPrincipal" id="divGeral"> |
ferramentas/buscarapida/gadget.php
| 1 | <?php | 1 | <?php |
| 2 | include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | 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 | <html xmlns="http://www.w3.org/1999/xhtml"> | 12 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 9 | <head> | 13 | <head> |
| @@ -22,7 +26,7 @@ i3GEObuscaRapida.idresultado | @@ -22,7 +26,7 @@ i3GEObuscaRapida.idresultado | ||
| 22 | var mapaLugar = function(wkt,layer,gid,nm) | 26 | var mapaLugar = function(wkt,layer,gid,nm) |
| 23 | { | 27 | { |
| 24 | var ext = i3GEO.util.wkt2ext(wkt,"polygon"); | 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 | url += "&url_wms=http://mapas.mma.gov.br/webservices/geonameswms.php?gid="+gid+"&"; | 30 | url += "&url_wms=http://mapas.mma.gov.br/webservices/geonameswms.php?gid="+gid+"&"; |
| 27 | url += "&layer_wms="+layer+"&style_wms=default" | 31 | url += "&layer_wms="+layer+"&style_wms=default" |
| 28 | url += "&nome_wms="+nm+" - "+layer | 32 | url += "&nome_wms="+nm+" - "+layer |
ferramentas/congelamapa/openlayers.php
| @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; | @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; | ||
| 17 | copy($map_file,$novo_mapfile); | 17 | copy($map_file,$novo_mapfile); |
| 18 | chmod($novo_mapfile,0777); | 18 | chmod($novo_mapfile,0777); |
| 19 | $mapa = ms_newMapObj($novo_mapfile); | 19 | $mapa = ms_newMapObj($novo_mapfile); |
| 20 | -$mapa->setProjection("+proj=longlat +ellps=GRS67 +no_defs"); | 20 | +$mapa->setProjection(pegaProjecaoDefault("proj4")); |
| 21 | $numlayers = $mapa->numlayers; | 21 | $numlayers = $mapa->numlayers; |
| 22 | $layers = array(); | 22 | $layers = array(); |
| 23 | for($i = 0;$i < $numlayers;++$i){ | 23 | for($i = 0;$i < $numlayers;++$i){ |
ferramentas/congelamapa/openlayers3.php
| @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; | @@ -17,7 +17,7 @@ $novo_mapfile = $dir."/".nomeRandomico(5).$base; | ||
| 17 | copy($map_file,$novo_mapfile); | 17 | copy($map_file,$novo_mapfile); |
| 18 | chmod($novo_mapfile,0777); | 18 | chmod($novo_mapfile,0777); |
| 19 | $mapa = ms_newMapObj($novo_mapfile); | 19 | $mapa = ms_newMapObj($novo_mapfile); |
| 20 | -$mapa->setProjection("+proj=longlat +ellps=GRS67 +no_defs"); | 20 | +$mapa->setProjection(pegaProjecaoDefault("proj4")); |
| 21 | $numlayers = $mapa->numlayers; | 21 | $numlayers = $mapa->numlayers; |
| 22 | $layers = array(); | 22 | $layers = array(); |
| 23 | for($i = 0;$i < $numlayers;++$i){ | 23 | for($i = 0;$i < $numlayers;++$i){ |
ferramentas/imprimir/a4lpaisagempdf.php
| @@ -42,9 +42,9 @@ $map->save($temp); | @@ -42,9 +42,9 @@ $map->save($temp); | ||
| 42 | substituiCon($temp,$postgis_mapa); | 42 | substituiCon($temp,$postgis_mapa); |
| 43 | $map = ms_newMapObj($temp); | 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 | $map->set("units",MS_METERS); | 48 | $map->set("units",MS_METERS); |
| 49 | $map->preparequery(); | 49 | $map->preparequery(); |
| 50 | $map->set("scaledenom",$map->scaledenom * 100000); | 50 | $map->set("scaledenom",$map->scaledenom * 100000); |
ferramentas/imprimir/aggpng.php
| @@ -72,7 +72,8 @@ $of->set("imagemode","RGB"); | @@ -72,7 +72,8 @@ $of->set("imagemode","RGB"); | ||
| 72 | $map = ms_newMapObj($temp); | 72 | $map = ms_newMapObj($temp); |
| 73 | if($map->getmetadata("interface") == "googlemaps") | 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 | $map->set("units",MS_METERS); | 77 | $map->set("units",MS_METERS); |
| 77 | $map->preparequery(); | 78 | $map->preparequery(); |
| 78 | $map->set("scaledenom",$map->scaledenom * 100000); | 79 | $map->set("scaledenom",$map->scaledenom * 100000); |
ferramentas/imprimir/geotif.php
| @@ -71,7 +71,8 @@ $of->set("imagemode","RGB"); | @@ -71,7 +71,8 @@ $of->set("imagemode","RGB"); | ||
| 71 | $map = ms_newMapObj($temp); | 71 | $map = ms_newMapObj($temp); |
| 72 | if($map->getmetadata("interface") == "googlemaps") | 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 | $map->set("units",MS_METERS); | 76 | $map->set("units",MS_METERS); |
| 76 | $map->preparequery(); | 77 | $map->preparequery(); |
| 77 | $map->set("scaledenom",$map->scaledenom * 100000); | 78 | $map->set("scaledenom",$map->scaledenom * 100000); |
ferramentas/imprimir/jpeg.php
| @@ -74,7 +74,8 @@ $of->set("mimetype","image/jpeg"); | @@ -74,7 +74,8 @@ $of->set("mimetype","image/jpeg"); | ||
| 74 | $of->set("extension","jpg"); | 74 | $of->set("extension","jpg"); |
| 75 | if($map->getmetadata("interface") == "googlemaps") | 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 | $map->set("units",MS_METERS); | 79 | $map->set("units",MS_METERS); |
| 79 | $map->preparequery(); | 80 | $map->preparequery(); |
| 80 | $map->set("scaledenom",$map->scaledenom * 100000); | 81 | $map->set("scaledenom",$map->scaledenom * 100000); |
ferramentas/imprimir/svg.php
| @@ -69,7 +69,8 @@ substituiCon($temp,$postgis_mapa); | @@ -69,7 +69,8 @@ substituiCon($temp,$postgis_mapa); | ||
| 69 | $map = ms_newMapObj($temp); | 69 | $map = ms_newMapObj($temp); |
| 70 | if($map->getmetadata("interface") == "googlemaps") | 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 | $map->set("units",MS_METERS); | 74 | $map->set("units",MS_METERS); |
| 74 | $map->preparequery(); | 75 | $map->preparequery(); |
| 75 | $map->set("scaledenom",$map->scaledenom * 100000); | 76 | $map->set("scaledenom",$map->scaledenom * 100000); |
ferramentas/parametrossql/ogc.php
| @@ -12,6 +12,8 @@ require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | @@ -12,6 +12,8 @@ require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | ||
| 12 | include(dirname(__FILE__)."/../../ms_configura.php"); | 12 | include(dirname(__FILE__)."/../../ms_configura.php"); |
| 13 | include(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | 13 | include(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); |
| 14 | include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | 14 | include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); |
| 15 | +$projDefault = pegaProjecaoDefault(); | ||
| 16 | + | ||
| 15 | $temas = $tema; | 17 | $temas = $tema; |
| 16 | if(isset($_GET["sld"]) || isset($_GET["filter"])){ | 18 | if(isset($_GET["sld"]) || isset($_GET["filter"])){ |
| 17 | $cache = false; | 19 | $cache = false; |
| @@ -40,7 +42,7 @@ if($_GET["SRS"] == "EPSG:900913"){ | @@ -40,7 +42,7 @@ if($_GET["SRS"] == "EPSG:900913"){ | ||
| 40 | $req = ms_newowsrequestobj(); | 42 | $req = ms_newowsrequestobj(); |
| 41 | $_GET = array_merge($_GET,$_POST); | 43 | $_GET = array_merge($_GET,$_POST); |
| 42 | if(!isset($_GET["srs"]) && !isset($_GET["SRS"])){ | 44 | if(!isset($_GET["srs"]) && !isset($_GET["SRS"])){ |
| 43 | - $_GET["srs"] = "EPSG:4326"; | 45 | + $_GET["srs"] = "EPSG:".$projDefault["epsg"]; |
| 44 | } | 46 | } |
| 45 | foreach ($_GET as $k=>$v){ | 47 | foreach ($_GET as $k=>$v){ |
| 46 | $req->setParameter(strtoupper($k), $v); | 48 | $req->setParameter(strtoupper($k), $v); |
| @@ -97,7 +99,7 @@ else{ | @@ -97,7 +99,7 @@ else{ | ||
| 97 | $oMap->setmetadata("ows_enable_request","*"); | 99 | $oMap->setmetadata("ows_enable_request","*"); |
| 98 | //parametro mandatario | 100 | //parametro mandatario |
| 99 | if($oMap->getmetadata("wms_srs") == ""){ | 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 | $e = $oMap->extent; | 105 | $e = $oMap->extent; |
| @@ -310,7 +312,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | @@ -310,7 +312,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | ||
| 310 | $x--; | 312 | $x--; |
| 311 | $y--; | 313 | $y--; |
| 312 | 314 | ||
| 313 | - $projInObj = ms_newprojectionobj("proj=latlong,a=6378137,b=6378137"); | 315 | + $projInObj = ms_newprojectionobj($projDefault["proj4"]); |
| 314 | $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"); | 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 | $poPoint1 = ms_newpointobj(); | 318 | $poPoint1 = ms_newpointobj(); |
| @@ -324,7 +326,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | @@ -324,7 +326,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | ||
| 324 | 326 | ||
| 325 | $oMap->getlayer(0)->set("status",MS_DEFAULT); | 327 | $oMap->getlayer(0)->set("status",MS_DEFAULT); |
| 326 | $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"); | 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 | //se o layer foi marcado para corte altera os parametros para ampliar o mapa | 331 | //se o layer foi marcado para corte altera os parametros para ampliar o mapa |
| 330 | //antes de gerar a imagem | 332 | //antes de gerar a imagem |
| @@ -401,7 +403,7 @@ if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ | @@ -401,7 +403,7 @@ if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ | ||
| 401 | $req->setParameter("TYPENAME",$l->name); | 403 | $req->setParameter("TYPENAME",$l->name); |
| 402 | } | 404 | } |
| 403 | if($l->getProjection() == "" ){ | 405 | if($l->getProjection() == "" ){ |
| 404 | - $l->setProjection("proj=latlong,a=6378137,b=6378137"); | 406 | + $l->setProjection($projDefault["proj4"]); |
| 405 | } | 407 | } |
| 406 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ | 408 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ |
| 407 | $req->setParameter("SRS","EPSG:3857"); | 409 | $req->setParameter("SRS","EPSG:3857"); |
ferramentas/telaremota/openlayers1.php
| @@ -119,7 +119,7 @@ function inicia(){ | @@ -119,7 +119,7 @@ function inicia(){ | ||
| 119 | OpenLayers.ImgPath = "../../pacotes/openlayers/img/" | 119 | OpenLayers.ImgPath = "../../pacotes/openlayers/img/" |
| 120 | OpenLayers.Lang.setCode("pt-BR"); | 120 | OpenLayers.Lang.setCode("pt-BR"); |
| 121 | var urlLayer = "../../classesphp/mapa_openlayers.php?DESLIGACACHE=sim&g_sid=<?php echo $g_sid;?>&telaR=<?php echo $telaR;?>"; | 121 | var urlLayer = "../../classesphp/mapa_openlayers.php?DESLIGACACHE=sim&g_sid=<?php echo $g_sid;?>&telaR=<?php echo $telaR;?>"; |
| 122 | - | 122 | + |
| 123 | var remoto = new OpenLayers.Layer.WMS( | 123 | var remoto = new OpenLayers.Layer.WMS( |
| 124 | "Remoto", | 124 | "Remoto", |
| 125 | urlLayer, | 125 | urlLayer, |
| @@ -168,7 +168,7 @@ function inicia(){ | @@ -168,7 +168,7 @@ function inicia(){ | ||
| 168 | "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", | 168 | "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", |
| 169 | { | 169 | { |
| 170 | layers : "baseraster", | 170 | layers : "baseraster", |
| 171 | - srs : "EPSG:4618", | 171 | + srs : "EPSG:4326", |
| 172 | format : "image/png", | 172 | format : "image/png", |
| 173 | isBaseLayer : false | 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,7 +45,7 @@ Insere elementos no mapa como um layer do tipo feature baseado em wkt | ||
| 45 | $c = $shp->getCentroid(); | 45 | $c = $shp->getCentroid(); |
| 46 | $c = $c->x; | 46 | $c = $c->x; |
| 47 | if($c > -181 && $c < 181){ | 47 | if($c > -181 && $c < 181){ |
| 48 | - $l->setprojection("proj=latlong,a=6378137,b=6378137"); | 48 | + $l->setprojection(pegaProjecaoDefault("proj4")); |
| 49 | } | 49 | } |
| 50 | else{ | 50 | else{ |
| 51 | $l->setprojection($this->mapa->getProjection()); | 51 | $l->setprojection($this->mapa->getProjection()); |
ms_criamapa.php
| @@ -297,14 +297,17 @@ if($_SERVER['SERVER_NAME'] != "localhost" && ($i3geomaster[0]["usuario"] == "adm | @@ -297,14 +297,17 @@ if($_SERVER['SERVER_NAME'] != "localhost" && ($i3geomaster[0]["usuario"] == "adm | ||
| 297 | /* | 297 | /* |
| 298 | Define o cookie para o idioma da interface | 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 | Cria os diretorios temporários que serão utilizados pelo i3geo para armazenar as imagens e outros dados. | 304 | Cria os diretorios temporários que serão utilizados pelo i3geo para armazenar as imagens e outros dados. |
| 304 | */ | 305 | */ |
| 305 | $diretorios = criaDirMapa($dir_tmp,$cachedir); | 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 | criaIndex($dir_tmp,$diretorios); | 311 | criaIndex($dir_tmp,$diretorios); |
| 309 | $tmpfname = $diretorios[0]; | 312 | $tmpfname = $diretorios[0]; |
| 310 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | 313 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| @@ -390,8 +393,10 @@ session_name("i3GeoPHP"); | @@ -390,8 +393,10 @@ session_name("i3GeoPHP"); | ||
| 390 | session_start(); | 393 | session_start(); |
| 391 | //echo $_SESSION["map_file"];exit; | 394 | //echo $_SESSION["map_file"];exit; |
| 392 | if (!isset($g_sid)){$g_sid="";} | 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 | Aguarde | 401 | Aguarde |
| 397 | 402 | ||
| @@ -470,8 +475,9 @@ if(!isset($base) || $base == ""){ | @@ -470,8 +475,9 @@ if(!isset($base) || $base == ""){ | ||
| 470 | if($base == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav'.$versao.'.map')){ | 475 | if($base == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav'.$versao.'.map')){ |
| 471 | $base = "/opt/www/html/i3geo/aplicmap/geral1v".$versao.".map"; | 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 | //if(!isset($estadosl)) | 483 | //if(!isset($estadosl)) |
| @@ -576,6 +582,11 @@ $w->set("imagepath",$atual.$diretorios[2]."/"); | @@ -576,6 +582,11 @@ $w->set("imagepath",$atual.$diretorios[2]."/"); | ||
| 576 | $atual = $w->imageurl; | 582 | $atual = $w->imageurl; |
| 577 | $w->set("imageurl",$atual.$diretorios[2]."/"); | 583 | $w->set("imageurl",$atual.$diretorios[2]."/"); |
| 578 | 584 | ||
| 585 | +$projecao = pegaProjecaoDefault("proj4"); | ||
| 586 | +if($projecao != ""){ | ||
| 587 | + $mapn->setProjection($projecao); | ||
| 588 | +} | ||
| 589 | + | ||
| 579 | $salvo = $mapn->save($tmpfname); | 590 | $salvo = $mapn->save($tmpfname); |
| 580 | 591 | ||
| 581 | $_SESSION["imgurl"] = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].$atual.$diretorios[2]."/"; | 592 | $_SESSION["imgurl"] = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].$atual.$diretorios[2]."/"; |
ogc.php
| @@ -212,7 +212,7 @@ if(!empty($restauramapa)){ | @@ -212,7 +212,7 @@ if(!empty($restauramapa)){ | ||
| 212 | //para operar como o Geoserver, abre o openlayers | 212 | //para operar como o Geoserver, abre o openlayers |
| 213 | // | 213 | // |
| 214 | if(isset($format) && strtolower($format) == "application/openlayers"){ | 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 | //echo $urln;exit; | 216 | //echo $urln;exit; |
| 217 | if(!headers_sent()){ | 217 | if(!headers_sent()){ |
| 218 | header("Location:".$urln); | 218 | header("Location:".$urln); |
| @@ -323,7 +323,8 @@ else{ | @@ -323,7 +323,8 @@ else{ | ||
| 323 | $oMap->setmetadata("ows_enable_request","*"); | 323 | $oMap->setmetadata("ows_enable_request","*"); |
| 324 | //parametro mandatario | 324 | //parametro mandatario |
| 325 | if($oMap->getmetadata("wms_srs") == ""){ | 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 | $e = $oMap->extent; | 329 | $e = $oMap->extent; |
| 329 | $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); | 330 | $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); |
| @@ -751,11 +752,11 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | @@ -751,11 +752,11 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | ||
| 751 | $x = $_GET["X"]; | 752 | $x = $_GET["X"]; |
| 752 | $y = $_GET["Y"]; | 753 | $y = $_GET["Y"]; |
| 753 | $z = $_GET["Z"]; | 754 | $z = $_GET["Z"]; |
| 754 | - | 755 | + $proj4 = pegaProjecaoDefault("proj4"); |
| 755 | if(file_exists($tema)){ | 756 | if(file_exists($tema)){ |
| 756 | $layer0 = $oMap->getlayer(0); | 757 | $layer0 = $oMap->getlayer(0); |
| 757 | $layer0->set("status",MS_DEFAULT); | 758 | $layer0->set("status",MS_DEFAULT); |
| 758 | - $layer0->setProjection("proj=latlong,a=6378137,b=6378137"); | 759 | + $layer0->setProjection($proj4); |
| 759 | } | 760 | } |
| 760 | else{ | 761 | else{ |
| 761 | //pode ter mais de um tema | 762 | //pode ter mais de um tema |
| @@ -763,7 +764,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | @@ -763,7 +764,7 @@ if(isset($_GET["Z"]) && isset($_GET["X"])){ | ||
| 763 | foreach($lista as $nomeLayer){ | 764 | foreach($lista as $nomeLayer){ |
| 764 | $layer0 = $oMap->getlayerbyname($nomeLayer); | 765 | $layer0 = $oMap->getlayerbyname($nomeLayer); |
| 765 | $layer0->set("status",MS_DEFAULT); | 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,7 +880,7 @@ if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ | ||
| 879 | $req->setParameter("TYPENAME",$l->name); | 880 | $req->setParameter("TYPENAME",$l->name); |
| 880 | } | 881 | } |
| 881 | if($l->getProjection() == "" ){ | 882 | if($l->getProjection() == "" ){ |
| 882 | - $l->setProjection("proj=latlong,a=6378137,b=6378137"); | 883 | + $l->setProjection(pegaProjecaoDefault("proj4")); |
| 883 | } | 884 | } |
| 884 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ | 885 | if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){ |
| 885 | $req->setParameter("SRS","EPSG:3857"); | 886 | $req->setParameter("SRS","EPSG:3857"); |
testainstal.php
| @@ -114,8 +114,16 @@ catch(ee) | @@ -114,8 +114,16 @@ catch(ee) | ||
| 114 | echo "<br>MapServer: <br>"; | 114 | echo "<br>MapServer: <br>"; |
| 115 | echo ms_GetVersion(); | 115 | echo ms_GetVersion(); |
| 116 | echo "<br><br>"; | 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 | var_dump (versao())."<br><br>"; | 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 | if(!function_exists("ms_GetVersion")) | 127 | if(!function_exists("ms_GetVersion")) |
| 120 | { | 128 | { |
| 121 | echo "<span style=color:red >PARECE QUE O MAPSERVER NAO ESTA INSTALADO!!!<br><br>"; | 129 | echo "<span style=color:red >PARECE QUE O MAPSERVER NAO ESTA INSTALADO!!!<br><br>"; |
| @@ -123,7 +131,7 @@ catch(ee) | @@ -123,7 +131,7 @@ catch(ee) | ||
| 123 | if (get_cfg_var("safe_mode") == 1){ | 131 | if (get_cfg_var("safe_mode") == 1){ |
| 124 | echo "<span style=color:red >Problema: safe_mode no php.ini deveria estar como 'Off'. O i3Geo não irá funcionar!!!<br></span>"; | 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 | echo "<br><br>çÇãâáÁóÓ"; | 135 | echo "<br><br>çÇãâáÁóÓ"; |
| 128 | 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)."; | 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 | //executa as opcoes linux definidas no formulario | 137 | //executa as opcoes linux definidas no formulario |