From 8db59522e2ce1d7d12d8a3b90b8bfc41137c175d Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 4 Mar 2011 22:19:59 +0000 Subject: [PATCH] --- admin/admin.db | Bin 70656 -> 0 bytes admin/php/xml.php | 29 ++++++++++++++++------------- classesphp/classe_menutemas.php | 34 +++++++++++++++++----------------- classesphp/mapa_controle.php | 4 ++-- ferramentas/importarwmc/index.js.php | 2 +- temas/locali.map | 19 ++++++++++--------- 6 files changed, 46 insertions(+), 42 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index a1d2c7c..547dc29 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/php/xml.php b/admin/php/xml.php index 08a4e41..a42163b 100644 --- a/admin/php/xml.php +++ b/admin/php/xml.php @@ -424,8 +424,8 @@ function geraXmlRSS($locaplic,$sql,$descricao) $xml .= "".xmlTexto_prepara($row["link_ws"])."\n"; $xml .= "\n"; $xml .= "".xmlTexto_prepara($row["autor_ws"])."\n"; - $xml .= "".xmlTexto_prepara($row["nacessos"])."\n"; - $xml .= "".xmlTexto_prepara($row["nacessosok"])."\n"; + $xml .= "\n"; + $xml .= "\n"; $xml .= "".xmlTexto_prepara($row["id_ws"])."\n"; $xml .= "\n"; } @@ -596,7 +596,7 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic) // //pega os temas na raiz // - $q = "select nacessos,nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from i3geoadmin_raiz as r,i3geoadmin_temas as temas where r.id_nivel = 0 and r.id_tema = temas.id_tema and r.id_menu = $id_menu "; + $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from i3geoadmin_raiz as r,i3geoadmin_temas as temas where r.id_nivel = 0 and r.id_tema = temas.id_tema and r.id_menu = $id_menu "; $qtemasraiz = $dbh->query($q); geraXmlMenutemas_notema($qtemasraiz,&$xml,$perfil); $q = "select nome_grupo,desc_grupo,n1.id_grupo,n1.id_n1,n1.n1_perfil as perfil from i3geoadmin_n1 as n1,i3geoadmin_grupos as grupos where n1.id_menu = $id_menu and n1.id_grupo = grupos.id_grupo "; @@ -618,11 +618,11 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic) // //pega temas na raiz // - $q = "select nacessos,nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from i3geoadmin_raiz as r,i3geoadmin_temas as temas where r.nivel = 1 and r.id_nivel = ".$row["id_n1"]." and r.id_tema = temas.id_tema and r.id_menu = $id_menu "; + $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from i3geoadmin_raiz as r,i3geoadmin_temas as temas where r.nivel = 1 and r.id_nivel = ".$row["id_n1"]." and r.id_tema = temas.id_tema and r.id_menu = $id_menu "; $qtemasraiz = $dbh->query($q); - geraXmlMenutemas_notema($qtemasraiz,&$xml,$perfil); + $xml = geraXmlMenutemas_notema($qtemasraiz,$xml,$perfil); if(isset($tipo) && ($tipo == "subgrupos") || ($tipo == "")) - geraXmlMenutemas_pegasubgrupos($row["id_n1"],&$xml,$dbh,$tipo,$perfil); + $xml = geraXmlMenutemas_pegasubgrupos($row["id_n1"],$xml,$dbh,$tipo,$perfil); $xml .= " ".xmlTexto_prepara($row["desc_grupo"])."\n"; $xml .= " ".$row["perfil"]."\n"; $xml .= "\n"; @@ -653,23 +653,25 @@ function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil) $xml .= "".xmlTexto_prepara($row["nome_subgrupo"])."\n"; $xml .= "".xmlTexto_prepara($row["perfil"])."\n"; if(isset($tipo) && ($tipo == "temas") || ($tipo == "")) - geraXmlMenutemas_pegatemas($row["id_n2"],&$xml,$dbh,$perfil); + $xml = geraXmlMenutemas_pegatemas($row["id_n2"],$xml,$dbh,$perfil); $xml .= "\n"; } } + return $xml; } function geraXmlMenutemas_pegatemas($id_n2,$xml,$dbh,$perfil) { - $q = "select nacessos,nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,n3.n3_perfil as perfil from i3geoadmin_n3 as n3,i3geoadmin_temas as temas where n3.id_n2 = $id_n2 and n3.id_tema = temas.id_tema "; + $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,n3.n3_perfil as perfil from i3geoadmin_n3 as n3,i3geoadmin_temas as temas where n3.id_n2 = $id_n2 and n3.id_tema = temas.id_tema "; $qtemas = $dbh->query($q); - geraXmlMenutemas_notema($qtemas,&$xml,$perfil); + $xml = geraXmlMenutemas_notema($qtemas,$xml,$perfil); + return $xml; } function geraXmlMenutemas_notema($qtemas,$xml,$perfil) { foreach($qtemas as $row) { if($row["perfil"] == "") - $mostra = true; + {$mostra = true;} else { $perfilatual = explode(" ",str_replace(","," ",$row["perfil"])); @@ -687,14 +689,15 @@ function geraXmlMenutemas_notema($qtemas,$xml,$perfil) $xml .= "".xmlTexto_prepara($row["tags_tema"])."\n"; $xml .= "".$row["kml_tema"]."\n"; if($row["tipoa_tema"] == "WMS") - $xml .= "nao\n"; + {$xml .= "nao\n";} else - $xml .= "".$row["ogc_tema"]."\n"; + {$xml .= "".$row["ogc_tema"]."\n";} $xml .= "".$row["download_tema"]."\n"; - $xml .= "".$row["nacessos"]."\n"; + $xml .= "\n"; $xml .= "\n"; } } + return $xml; } function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh) { diff --git a/classesphp/classe_menutemas.php b/classesphp/classe_menutemas.php index 5d2d8e0..7b939e5 100644 --- a/classesphp/classe_menutemas.php +++ b/classesphp/classe_menutemas.php @@ -374,12 +374,11 @@ $procurar - String que será procurada. } else { - //$this->xml[] = simplexml_load_string(geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic)); - include_once("../admin/php/classe_arvore.php"); - $arvore = new Arvore($this->locaplic,$this->idioma); - $temas = $arvore->procuraTemas($procurar,$this->perfil); - unset($arvore); - return($temas); + include_once("../admin/php/classe_arvore.php"); + $arvore = new Arvore($this->locaplic,$this->idioma); + $temas = $arvore->procuraTemas($procurar,$this->perfil); + unset($arvore); + return($temas); } $resultado = array(); $texto = array(); @@ -542,23 +541,17 @@ nrss - (opcional) número de registros no rss que serão considerados $this->xml = array(); foreach($this->pegaListaDeMenus() as $menu) { - if(!isset($menu["url"])){$menu["url"] = "";} //para efeitos de compatibilidade entre versões do i3geo - $ondexml = $menu["arquivo"]; - if($menu["url"] != ""){$ondexml = $menu["url"];} - if($ondexml != "") - {$this->xml[] = simplexml_load_file($ondexml);} - else //pega o xml do sistema de administração - { - $this->xml[] = simplexml_load_string(geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic)); - } + $x = geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic); + $this->xml[] = $x; } - $resultado = array(); $noticias = array(); foreach ($this->xml as $xml) { + $xml = simplexml_load_string($xml); foreach($xml->GRUPO as $grupo) { + $incluigrupo = TRUE; $temp = $this->ixml($grupo,"PERFIL"); if ($temp != "") @@ -570,8 +563,10 @@ nrss - (opcional) número de registros no rss que serão considerados } if ($incluigrupo == TRUE) { + foreach($grupo->SGRUPO as $sgrupo) { + $incluisgrupo = TRUE; if ($this->perfil != "") { @@ -583,8 +578,10 @@ nrss - (opcional) número de registros no rss que serão considerados } if ($incluisgrupo == TRUE) { + foreach($sgrupo->TEMA as $tema) { + $inclui = TRUE; if ($this->perfil != "") { @@ -595,12 +592,15 @@ nrss - (opcional) número de registros no rss que serão considerados } if ($inclui == TRUE) { + $tid = $this->ixml($tema,"TID"); $tags = explode(" ",$this->ixml($tema,"TAGS")); foreach ($tags as $tag) { + if($tag != "") { + if(!isset($resultado[$tag])) { $resultado[$tag] = array($tid); @@ -636,9 +636,9 @@ nrss - (opcional) número de registros no rss que serão considerados } } ksort($resultado); + //var_dump($resultado); foreach(array_keys($resultado) as $k) { - if(isset($noticias[$k])) {$not = array($noticias[$k]);} else diff --git a/classesphp/mapa_controle.php b/classesphp/mapa_controle.php index ff7ad83..7405f74 100644 --- a/classesphp/mapa_controle.php +++ b/classesphp/mapa_controle.php @@ -3055,8 +3055,8 @@ function redesenhaMapa() $res["mapscale"] = ""; $res["pixelsize"] = ""; $res["mapimagem"] = ""; - $res["w"] = ""; - $res["h"] = ""; + $res["w"] = $m->mapa->width; + $res["h"] = $m->mapa->height; $res["mappath"] = ""; $res["mapurl"] = ""; } diff --git a/ferramentas/importarwmc/index.js.php b/ferramentas/importarwmc/index.js.php index 30b9ac5..726ef29 100644 --- a/ferramentas/importarwmc/index.js.php +++ b/ferramentas/importarwmc/index.js.php @@ -100,7 +100,7 @@ i3GEOF.importarwmc = { minimiza = function(){ i3GEO.janela.minimiza("i3GEOF.importarwmc"); }; - titulo = "Upload de arquivo importarwmc    "; + titulo = "Upload de WMC    "; janela = i3GEO.janela.cria( "320px", "280px", diff --git a/temas/locali.map b/temas/locali.map index df58ec9..52075e0 100644 --- a/temas/locali.map +++ b/temas/locali.map @@ -5,22 +5,23 @@ MAP CONNECTION "" DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\locali" METADATA - "cache" "" - "TIP" "TIPO,ANOCRIA,NOMELOC" "LTEMPOITEMIMAGEM" "" - "CLASSE" "SIM" + "TIP" "TIPO,ANOCRIA,NOMELOC" + "cache" "" "LTEMPOITEMDESCRICAO" "TIPO" - "LTEMPOITEMINICIO" "ANOCRIA" + "CLASSE" "SIM" "palletestep" "" + "LTEMPOITEMINICIO" "ANOCRIA" "LTEMPOITEMTIP" "ANOCRIA" - "iconetema" "" - "LTEMPOITEMTITULO" "NOMELOC" "description_template" "" + "LTEMPOITEMTITULO" "NOMELOC" + "iconetema" "" "LTEMPOITEMLINK" "" "palletefile" "" + "nomeoriginal" "locali" "LTEMPOFORMATODATA" "iso8601" - "permitecomentario" "" "LTEMPOITEMICONE" "" + "permitecomentario" "" "arquivodownload" "" "transitioneffect" "NAO" "TEMA" "Localidades" @@ -28,7 +29,7 @@ MAP "LTEMPOITEMFIM" "" END NAME "locali" - STATUS OFF + STATUS DEFAULT TEMPLATE "none.htm" TYPE POINT UNITS METERS @@ -37,7 +38,7 @@ MAP EXPRESSION ('[TIPO]'eq'Vila') STYLE ANGLE 360 - COLOR 209 36 9 + COLOR 250 193 4 SIZE 4 SYMBOL "ponto" WIDTH 1 -- libgit2 0.21.2