Commit 448320cc7f8c6146f58b49c48ec2608f09a19297
1 parent
09f64b1a
Exists in
master
and in
7 other branches
--no commit message
Showing
4 changed files
with
41 additions
and
12 deletions
Show diff stats
classesjs/classe_janela.js
... | ... | @@ -739,6 +739,22 @@ i3GEO.janela = { |
739 | 739 | } |
740 | 740 | }, |
741 | 741 | /* |
742 | + Janela de prompt para entrada de dados | |
743 | + | |
744 | + Parametros: | |
745 | + | |
746 | + pergunta {string} - texto da pegunta | |
747 | + | |
748 | + w {numeric} - largura da janela | |
749 | + | |
750 | + funcaoOk {function} - (opcional) funcao do botao 1 | |
751 | + | |
752 | + funcaoCancela {function} - (opcional) funcao do botao 2 | |
753 | + */ | |
754 | + prompt: function(pergunta,w,funcaoOk,funcaoCancela){ | |
755 | + i3GEO.janelaconfirma: function(pergunta,w,resposta1,resposta2,funcao1,funcao2) | |
756 | + }, | |
757 | + /* | |
742 | 758 | Function: mensagemSimples |
743 | 759 | |
744 | 760 | Mostra uma janela simples com uma mensagem | ... | ... |
classesphp/classe_menutemas.php
... | ... | @@ -65,8 +65,7 @@ $idioma - (opcional) pt|en|es|it |
65 | 65 | { |
66 | 66 | if($locaplic == "") |
67 | 67 | { |
68 | - if(file_exists("../ms_configura.php")) | |
69 | - {include("../ms_configura.php");} | |
68 | + include(__DIR__."/../ms_configura.php");} | |
70 | 69 | } |
71 | 70 | $perfil = str_replace(" ",",",$perfil); |
72 | 71 | $this->perfil = explode(",",$perfil); |
... | ... | @@ -149,7 +148,7 @@ array |
149 | 148 | { |
150 | 149 | if($menu["idmenu"] == $idmenu || $idmenu == "") |
151 | 150 | { |
152 | - include_once("../admin/php/classe_arvore.php"); | |
151 | + include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
153 | 152 | $arvore = new Arvore($this->locaplic,$this->idioma); |
154 | 153 | $grupos = $arvore->formataGruposMenu($idmenu,$this->perfil,$listasgrupos); |
155 | 154 | unset($arvore); |
... | ... | @@ -182,7 +181,7 @@ array |
182 | 181 | { |
183 | 182 | if($menu["idmenu"] == $idmenu || $idmenu == "") |
184 | 183 | { |
185 | - include_once("../admin/php/classe_arvore.php"); | |
184 | + include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
186 | 185 | $arvore = new Arvore($this->locaplic,$this->idioma); |
187 | 186 | $subGrupos = $arvore->formataSubgruposGrupo($idmenu,$codgrupo,$this->perfil); |
188 | 187 | unset($arvore); |
... | ... | @@ -209,7 +208,7 @@ array |
209 | 208 | */ |
210 | 209 | function pegaListaDeTemas($grupo,$subgrupo,$idmenu) |
211 | 210 | { |
212 | - include_once("../admin/php/classe_arvore.php"); | |
211 | + include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
213 | 212 | $arvore = new Arvore($this->locaplic,$this->idioma); |
214 | 213 | $temas = $arvore->formataTemasSubgrupo($subgrupo,$this->perfil); |
215 | 214 | unset($arvore); |
... | ... | @@ -371,7 +370,7 @@ $procurar - String que será procurada. |
371 | 370 | } |
372 | 371 | else |
373 | 372 | { |
374 | - include_once("../admin/php/classe_arvore.php"); | |
373 | + include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
375 | 374 | $arvore = new Arvore($this->locaplic,$this->idioma); |
376 | 375 | $temas = $arvore->procuraTemas($procurar,$this->perfil); |
377 | 376 | unset($arvore); |
... | ... | @@ -482,7 +481,7 @@ $procurar - String que será procurada. |
482 | 481 | */ |
483 | 482 | function procurartemas2($procurar) |
484 | 483 | { |
485 | - include_once("../admin/php/classe_arvore.php"); | |
484 | + include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
486 | 485 | $arvore = new Arvore($this->locaplic,$this->idioma); |
487 | 486 | $temas = $arvore->procuraTemas($procurar,$this->perfil); |
488 | 487 | unset($arvore); |
... | ... | @@ -501,7 +500,7 @@ $fatorestrela - valor para normalizar o total de acessos com o valor da estrela |
501 | 500 | */ |
502 | 501 | function procurartemasestrela($nivel,$fatorestrela) |
503 | 502 | { |
504 | - include_once("../admin/php/classe_arvore.php"); | |
503 | + include_once(__DIR_."/../admin/php/classe_arvore.php"); | |
505 | 504 | $arvore = new Arvore($this->locaplic,$this->idioma); |
506 | 505 | $temas = $arvore->procuraTemasEstrela($nivel,$fatorestrela,$this->perfil); |
507 | 506 | unset($arvore); | ... | ... |
guia_de_migracao.txt
... | ... | @@ -3,6 +3,12 @@ GUIA DE UPDATES |
3 | 3 | ------------------------------------------------------------------------------------------------- |
4 | 4 | Para a versão 4.7 |
5 | 5 | |
6 | +- para testar via javascript se a versão é a 4.7, utilize: | |
7 | + | |
8 | + if(i3GEO.eventos.cliquePerm){ | |
9 | + //seu codigo vai aqui | |
10 | + } | |
11 | + | |
6 | 12 | - Criada a pasta init que contém uma nova página de inicialização |
7 | 13 | - O banco de dados de administração foi alterado. Deve ser executado o programa de upgrade do banco, existente em i3geo/admin. |
8 | 14 | - Para permitir o upgrade é necessário ter um usuário master cadastrado em i3geo/ms_configura.php | ... | ... |
ogc.php
... | ... | @@ -505,18 +505,18 @@ function ogc_imprimeListaDeTemas(){ |
505 | 505 | foreach ($menus as $menu){ |
506 | 506 | $grupos = $m->pegaListaDeGrupos($menu["idmenu"],$listasistemas="nao",$listasgrupos="sim"); |
507 | 507 | foreach($grupos as $grupo){ |
508 | - if(strtolower($grupo["ogc"]) == "sim"){ | |
509 | - $imprimegrupo = "<i>".$grupo["nome"]."</i>"; | |
508 | + if(!empty($grupo["ogc"]) && strtolower($grupo["ogc"]) == "sim"){ | |
509 | + $imprimegrupo = "<i>".texto2iso($grupo["nome"])."</i>"; | |
510 | 510 | foreach($grupo["subgrupos"] as $sgrupo){ |
511 | 511 | if(strtolower($sgrupo["ogc"]) == "sim"){ |
512 | 512 | $imprimesubgrupo = $sgrupo["nome"]; |
513 | 513 | $temas = $m->pegaListaDeTemas($grupo["id_n1"],$sgrupo["id_n2"],$menu["idmenu"]); |
514 | 514 | foreach($temas as $tema){ |
515 | 515 | if(strtolower($tema["ogc"]) == "sim"){ |
516 | - $imprimir .= $imprimegrupo."->".$imprimesubgrupo."<br>"; | |
516 | + $imprimir .= texto2iso($imprimegrupo)."->".texto2iso($imprimesubgrupo)."<br>"; | |
517 | 517 | $imprimir .= " "; |
518 | 518 | $imprimir .= "<span style=color:red >".$tema["tid"]."</span>"; |
519 | - $imprimir .= " - ".$tema["nome"]." "; | |
519 | + $imprimir .= " - ".texto2iso($tema["nome"])." "; | |
520 | 520 | $imprimir .= " <a href='".$urli3geo."/ogc.php?tema=".$tema["tid"]."&service=wms&request=getcapabilities' >Getcapabilities</a>"; |
521 | 521 | $imprimir .= " <a href='".$urli3geo."/ogc.php?tema=".$tema["tid"]."&SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers=".$tema["tid"]."' >GetMap </a>"; |
522 | 522 | if($tema["link"] != " ") |
... | ... | @@ -599,4 +599,12 @@ function carregaCacheImagem($bbox,$layer,$w,$h,$cachedir=""){ |
599 | 599 | exit; |
600 | 600 | } |
601 | 601 | } |
602 | +function texto2iso($texto){ | |
603 | + if (function_exists("mb_convert_encoding")){ | |
604 | + if (mb_detect_encoding($texto,"UTF-8",true)){ | |
605 | + $texto = mb_convert_encoding($texto,"ISO-8859-1","UTF-8"); | |
606 | + } | |
607 | + } | |
608 | + return $texto; | |
609 | +} | |
602 | 610 | ?> |
603 | 611 | \ No newline at end of file | ... | ... |