Commit 8db59522e2ce1d7d12d8a3b90b8bfc41137c175d
1 parent
103b4faa
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
46 additions
and
42 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/xml.php
@@ -424,8 +424,8 @@ function geraXmlRSS($locaplic,$sql,$descricao) | @@ -424,8 +424,8 @@ function geraXmlRSS($locaplic,$sql,$descricao) | ||
424 | $xml .= "<link>".xmlTexto_prepara($row["link_ws"])."</link>\n"; | 424 | $xml .= "<link>".xmlTexto_prepara($row["link_ws"])."</link>\n"; |
425 | $xml .= "<pubDate/>\n"; | 425 | $xml .= "<pubDate/>\n"; |
426 | $xml .= "<author>".xmlTexto_prepara($row["autor_ws"])."</author>\n"; | 426 | $xml .= "<author>".xmlTexto_prepara($row["autor_ws"])."</author>\n"; |
427 | - $xml .= "<nacessos>".xmlTexto_prepara($row["nacessos"])."</nacessos>\n"; | ||
428 | - $xml .= "<nacessosok>".xmlTexto_prepara($row["nacessosok"])."</nacessosok>\n"; | 427 | + $xml .= "<nacessos></nacessos>\n"; |
428 | + $xml .= "<nacessosok></nacessosok>\n"; | ||
429 | $xml .= "<id>".xmlTexto_prepara($row["id_ws"])."</id>\n"; | 429 | $xml .= "<id>".xmlTexto_prepara($row["id_ws"])."</id>\n"; |
430 | $xml .= "</item>\n"; | 430 | $xml .= "</item>\n"; |
431 | } | 431 | } |
@@ -596,7 +596,7 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic) | @@ -596,7 +596,7 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic) | ||
596 | // | 596 | // |
597 | //pega os temas na raiz | 597 | //pega os temas na raiz |
598 | // | 598 | // |
599 | - $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 "; | 599 | + $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 "; |
600 | $qtemasraiz = $dbh->query($q); | 600 | $qtemasraiz = $dbh->query($q); |
601 | geraXmlMenutemas_notema($qtemasraiz,&$xml,$perfil); | 601 | geraXmlMenutemas_notema($qtemasraiz,&$xml,$perfil); |
602 | $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 "; | 602 | $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) | @@ -618,11 +618,11 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic) | ||
618 | // | 618 | // |
619 | //pega temas na raiz | 619 | //pega temas na raiz |
620 | // | 620 | // |
621 | - $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 "; | 621 | + $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 "; |
622 | $qtemasraiz = $dbh->query($q); | 622 | $qtemasraiz = $dbh->query($q); |
623 | - geraXmlMenutemas_notema($qtemasraiz,&$xml,$perfil); | 623 | + $xml = geraXmlMenutemas_notema($qtemasraiz,$xml,$perfil); |
624 | if(isset($tipo) && ($tipo == "subgrupos") || ($tipo == "")) | 624 | if(isset($tipo) && ($tipo == "subgrupos") || ($tipo == "")) |
625 | - geraXmlMenutemas_pegasubgrupos($row["id_n1"],&$xml,$dbh,$tipo,$perfil); | 625 | + $xml = geraXmlMenutemas_pegasubgrupos($row["id_n1"],$xml,$dbh,$tipo,$perfil); |
626 | $xml .= " <DTIPO>".xmlTexto_prepara($row["desc_grupo"])."</DTIPO>\n"; | 626 | $xml .= " <DTIPO>".xmlTexto_prepara($row["desc_grupo"])."</DTIPO>\n"; |
627 | $xml .= " <PERFIL>".$row["perfil"]."</PERFIL>\n"; | 627 | $xml .= " <PERFIL>".$row["perfil"]."</PERFIL>\n"; |
628 | $xml .= "</GRUPO>\n"; | 628 | $xml .= "</GRUPO>\n"; |
@@ -653,23 +653,25 @@ function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil) | @@ -653,23 +653,25 @@ function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil) | ||
653 | $xml .= "<SDTIPO>".xmlTexto_prepara($row["nome_subgrupo"])."</SDTIPO>\n"; | 653 | $xml .= "<SDTIPO>".xmlTexto_prepara($row["nome_subgrupo"])."</SDTIPO>\n"; |
654 | $xml .= "<PERFIL>".xmlTexto_prepara($row["perfil"])."</PERFIL>\n"; | 654 | $xml .= "<PERFIL>".xmlTexto_prepara($row["perfil"])."</PERFIL>\n"; |
655 | if(isset($tipo) && ($tipo == "temas") || ($tipo == "")) | 655 | if(isset($tipo) && ($tipo == "temas") || ($tipo == "")) |
656 | - geraXmlMenutemas_pegatemas($row["id_n2"],&$xml,$dbh,$perfil); | 656 | + $xml = geraXmlMenutemas_pegatemas($row["id_n2"],$xml,$dbh,$perfil); |
657 | $xml .= "</SGRUPO>\n"; | 657 | $xml .= "</SGRUPO>\n"; |
658 | } | 658 | } |
659 | } | 659 | } |
660 | + return $xml; | ||
660 | } | 661 | } |
661 | function geraXmlMenutemas_pegatemas($id_n2,$xml,$dbh,$perfil) | 662 | function geraXmlMenutemas_pegatemas($id_n2,$xml,$dbh,$perfil) |
662 | { | 663 | { |
663 | - $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 "; | 664 | + $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 "; |
664 | $qtemas = $dbh->query($q); | 665 | $qtemas = $dbh->query($q); |
665 | - geraXmlMenutemas_notema($qtemas,&$xml,$perfil); | 666 | + $xml = geraXmlMenutemas_notema($qtemas,$xml,$perfil); |
667 | + return $xml; | ||
666 | } | 668 | } |
667 | function geraXmlMenutemas_notema($qtemas,$xml,$perfil) | 669 | function geraXmlMenutemas_notema($qtemas,$xml,$perfil) |
668 | { | 670 | { |
669 | foreach($qtemas as $row) | 671 | foreach($qtemas as $row) |
670 | { | 672 | { |
671 | if($row["perfil"] == "") | 673 | if($row["perfil"] == "") |
672 | - $mostra = true; | 674 | + {$mostra = true;} |
673 | else | 675 | else |
674 | { | 676 | { |
675 | $perfilatual = explode(" ",str_replace(","," ",$row["perfil"])); | 677 | $perfilatual = explode(" ",str_replace(","," ",$row["perfil"])); |
@@ -687,14 +689,15 @@ function geraXmlMenutemas_notema($qtemas,$xml,$perfil) | @@ -687,14 +689,15 @@ function geraXmlMenutemas_notema($qtemas,$xml,$perfil) | ||
687 | $xml .= "<TAGS>".xmlTexto_prepara($row["tags_tema"])."</TAGS>\n"; | 689 | $xml .= "<TAGS>".xmlTexto_prepara($row["tags_tema"])."</TAGS>\n"; |
688 | $xml .= "<KML>".$row["kml_tema"]."</KML>\n"; | 690 | $xml .= "<KML>".$row["kml_tema"]."</KML>\n"; |
689 | if($row["tipoa_tema"] == "WMS") | 691 | if($row["tipoa_tema"] == "WMS") |
690 | - $xml .= "<OGC>nao</OGC>\n"; | 692 | + {$xml .= "<OGC>nao</OGC>\n";} |
691 | else | 693 | else |
692 | - $xml .= "<OGC>".$row["ogc_tema"]."</OGC>\n"; | 694 | + {$xml .= "<OGC>".$row["ogc_tema"]."</OGC>\n";} |
693 | $xml .= "<DOWNLOAD>".$row["download_tema"]."</DOWNLOAD>\n"; | 695 | $xml .= "<DOWNLOAD>".$row["download_tema"]."</DOWNLOAD>\n"; |
694 | - $xml .= "<NACESSOS>".$row["nacessos"]."</NACESSOS>\n"; | 696 | + $xml .= "<NACESSOS></NACESSOS>\n"; |
695 | $xml .= "</TEMA>\n"; | 697 | $xml .= "</TEMA>\n"; |
696 | } | 698 | } |
697 | } | 699 | } |
700 | + return $xml; | ||
698 | } | 701 | } |
699 | function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh) | 702 | function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh) |
700 | { | 703 | { |
classesphp/classe_menutemas.php
@@ -374,12 +374,11 @@ $procurar - String que será procurada. | @@ -374,12 +374,11 @@ $procurar - String que será procurada. | ||
374 | } | 374 | } |
375 | else | 375 | else |
376 | { | 376 | { |
377 | - //$this->xml[] = simplexml_load_string(geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic)); | ||
378 | - include_once("../admin/php/classe_arvore.php"); | ||
379 | - $arvore = new Arvore($this->locaplic,$this->idioma); | ||
380 | - $temas = $arvore->procuraTemas($procurar,$this->perfil); | ||
381 | - unset($arvore); | ||
382 | - return($temas); | 377 | + include_once("../admin/php/classe_arvore.php"); |
378 | + $arvore = new Arvore($this->locaplic,$this->idioma); | ||
379 | + $temas = $arvore->procuraTemas($procurar,$this->perfil); | ||
380 | + unset($arvore); | ||
381 | + return($temas); | ||
383 | } | 382 | } |
384 | $resultado = array(); | 383 | $resultado = array(); |
385 | $texto = array(); | 384 | $texto = array(); |
@@ -542,23 +541,17 @@ nrss - (opcional) número de registros no rss que serão considerados | @@ -542,23 +541,17 @@ nrss - (opcional) número de registros no rss que serão considerados | ||
542 | $this->xml = array(); | 541 | $this->xml = array(); |
543 | foreach($this->pegaListaDeMenus() as $menu) | 542 | foreach($this->pegaListaDeMenus() as $menu) |
544 | { | 543 | { |
545 | - if(!isset($menu["url"])){$menu["url"] = "";} //para efeitos de compatibilidade entre versões do i3geo | ||
546 | - $ondexml = $menu["arquivo"]; | ||
547 | - if($menu["url"] != ""){$ondexml = $menu["url"];} | ||
548 | - if($ondexml != "") | ||
549 | - {$this->xml[] = simplexml_load_file($ondexml);} | ||
550 | - else //pega o xml do sistema de administração | ||
551 | - { | ||
552 | - $this->xml[] = simplexml_load_string(geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic)); | ||
553 | - } | 544 | + $x = geraXmlMenutemas(implode(" ",$this->perfil),$menu["idmenu"],$tipo,$this->locaplic); |
545 | + $this->xml[] = $x; | ||
554 | } | 546 | } |
555 | - | ||
556 | $resultado = array(); | 547 | $resultado = array(); |
557 | $noticias = array(); | 548 | $noticias = array(); |
558 | foreach ($this->xml as $xml) | 549 | foreach ($this->xml as $xml) |
559 | { | 550 | { |
551 | + $xml = simplexml_load_string($xml); | ||
560 | foreach($xml->GRUPO as $grupo) | 552 | foreach($xml->GRUPO as $grupo) |
561 | { | 553 | { |
554 | + | ||
562 | $incluigrupo = TRUE; | 555 | $incluigrupo = TRUE; |
563 | $temp = $this->ixml($grupo,"PERFIL"); | 556 | $temp = $this->ixml($grupo,"PERFIL"); |
564 | if ($temp != "") | 557 | if ($temp != "") |
@@ -570,8 +563,10 @@ nrss - (opcional) número de registros no rss que serão considerados | @@ -570,8 +563,10 @@ nrss - (opcional) número de registros no rss que serão considerados | ||
570 | } | 563 | } |
571 | if ($incluigrupo == TRUE) | 564 | if ($incluigrupo == TRUE) |
572 | { | 565 | { |
566 | + | ||
573 | foreach($grupo->SGRUPO as $sgrupo) | 567 | foreach($grupo->SGRUPO as $sgrupo) |
574 | { | 568 | { |
569 | + | ||
575 | $incluisgrupo = TRUE; | 570 | $incluisgrupo = TRUE; |
576 | if ($this->perfil != "") | 571 | if ($this->perfil != "") |
577 | { | 572 | { |
@@ -583,8 +578,10 @@ nrss - (opcional) número de registros no rss que serão considerados | @@ -583,8 +578,10 @@ nrss - (opcional) número de registros no rss que serão considerados | ||
583 | } | 578 | } |
584 | if ($incluisgrupo == TRUE) | 579 | if ($incluisgrupo == TRUE) |
585 | { | 580 | { |
581 | + | ||
586 | foreach($sgrupo->TEMA as $tema) | 582 | foreach($sgrupo->TEMA as $tema) |
587 | { | 583 | { |
584 | + | ||
588 | $inclui = TRUE; | 585 | $inclui = TRUE; |
589 | if ($this->perfil != "") | 586 | if ($this->perfil != "") |
590 | { | 587 | { |
@@ -595,12 +592,15 @@ nrss - (opcional) número de registros no rss que serão considerados | @@ -595,12 +592,15 @@ nrss - (opcional) número de registros no rss que serão considerados | ||
595 | } | 592 | } |
596 | if ($inclui == TRUE) | 593 | if ($inclui == TRUE) |
597 | { | 594 | { |
595 | + | ||
598 | $tid = $this->ixml($tema,"TID"); | 596 | $tid = $this->ixml($tema,"TID"); |
599 | $tags = explode(" ",$this->ixml($tema,"TAGS")); | 597 | $tags = explode(" ",$this->ixml($tema,"TAGS")); |
600 | foreach ($tags as $tag) | 598 | foreach ($tags as $tag) |
601 | { | 599 | { |
600 | + | ||
602 | if($tag != "") | 601 | if($tag != "") |
603 | { | 602 | { |
603 | + | ||
604 | if(!isset($resultado[$tag])) | 604 | if(!isset($resultado[$tag])) |
605 | { | 605 | { |
606 | $resultado[$tag] = array($tid); | 606 | $resultado[$tag] = array($tid); |
@@ -636,9 +636,9 @@ nrss - (opcional) número de registros no rss que serão considerados | @@ -636,9 +636,9 @@ nrss - (opcional) número de registros no rss que serão considerados | ||
636 | } | 636 | } |
637 | } | 637 | } |
638 | ksort($resultado); | 638 | ksort($resultado); |
639 | + //var_dump($resultado); | ||
639 | foreach(array_keys($resultado) as $k) | 640 | foreach(array_keys($resultado) as $k) |
640 | { | 641 | { |
641 | - | ||
642 | if(isset($noticias[$k])) | 642 | if(isset($noticias[$k])) |
643 | {$not = array($noticias[$k]);} | 643 | {$not = array($noticias[$k]);} |
644 | else | 644 | else |
classesphp/mapa_controle.php
@@ -3055,8 +3055,8 @@ function redesenhaMapa() | @@ -3055,8 +3055,8 @@ function redesenhaMapa() | ||
3055 | $res["mapscale"] = ""; | 3055 | $res["mapscale"] = ""; |
3056 | $res["pixelsize"] = ""; | 3056 | $res["pixelsize"] = ""; |
3057 | $res["mapimagem"] = ""; | 3057 | $res["mapimagem"] = ""; |
3058 | - $res["w"] = ""; | ||
3059 | - $res["h"] = ""; | 3058 | + $res["w"] = $m->mapa->width; |
3059 | + $res["h"] = $m->mapa->height; | ||
3060 | $res["mappath"] = ""; | 3060 | $res["mappath"] = ""; |
3061 | $res["mapurl"] = ""; | 3061 | $res["mapurl"] = ""; |
3062 | } | 3062 | } |
ferramentas/importarwmc/index.js.php
@@ -100,7 +100,7 @@ i3GEOF.importarwmc = { | @@ -100,7 +100,7 @@ i3GEOF.importarwmc = { | ||
100 | minimiza = function(){ | 100 | minimiza = function(){ |
101 | i3GEO.janela.minimiza("i3GEOF.importarwmc"); | 101 | i3GEO.janela.minimiza("i3GEOF.importarwmc"); |
102 | }; | 102 | }; |
103 | - titulo = "Upload de arquivo importarwmc <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=4&idajuda=27' > </a>"; | 103 | + titulo = "Upload de WMC <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=4&idajuda=27' > </a>"; |
104 | janela = i3GEO.janela.cria( | 104 | janela = i3GEO.janela.cria( |
105 | "320px", | 105 | "320px", |
106 | "280px", | 106 | "280px", |
temas/locali.map
@@ -5,22 +5,23 @@ MAP | @@ -5,22 +5,23 @@ MAP | ||
5 | CONNECTION "" | 5 | CONNECTION "" |
6 | DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\locali" | 6 | DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\locali" |
7 | METADATA | 7 | METADATA |
8 | - "cache" "" | ||
9 | - "TIP" "TIPO,ANOCRIA,NOMELOC" | ||
10 | "LTEMPOITEMIMAGEM" "" | 8 | "LTEMPOITEMIMAGEM" "" |
11 | - "CLASSE" "SIM" | 9 | + "TIP" "TIPO,ANOCRIA,NOMELOC" |
10 | + "cache" "" | ||
12 | "LTEMPOITEMDESCRICAO" "TIPO" | 11 | "LTEMPOITEMDESCRICAO" "TIPO" |
13 | - "LTEMPOITEMINICIO" "ANOCRIA" | 12 | + "CLASSE" "SIM" |
14 | "palletestep" "" | 13 | "palletestep" "" |
14 | + "LTEMPOITEMINICIO" "ANOCRIA" | ||
15 | "LTEMPOITEMTIP" "ANOCRIA" | 15 | "LTEMPOITEMTIP" "ANOCRIA" |
16 | - "iconetema" "" | ||
17 | - "LTEMPOITEMTITULO" "NOMELOC" | ||
18 | "description_template" "" | 16 | "description_template" "" |
17 | + "LTEMPOITEMTITULO" "NOMELOC" | ||
18 | + "iconetema" "" | ||
19 | "LTEMPOITEMLINK" "" | 19 | "LTEMPOITEMLINK" "" |
20 | "palletefile" "" | 20 | "palletefile" "" |
21 | + "nomeoriginal" "locali" | ||
21 | "LTEMPOFORMATODATA" "iso8601" | 22 | "LTEMPOFORMATODATA" "iso8601" |
22 | - "permitecomentario" "" | ||
23 | "LTEMPOITEMICONE" "" | 23 | "LTEMPOITEMICONE" "" |
24 | + "permitecomentario" "" | ||
24 | "arquivodownload" "" | 25 | "arquivodownload" "" |
25 | "transitioneffect" "NAO" | 26 | "transitioneffect" "NAO" |
26 | "TEMA" "Localidades" | 27 | "TEMA" "Localidades" |
@@ -28,7 +29,7 @@ MAP | @@ -28,7 +29,7 @@ MAP | ||
28 | "LTEMPOITEMFIM" "" | 29 | "LTEMPOITEMFIM" "" |
29 | END | 30 | END |
30 | NAME "locali" | 31 | NAME "locali" |
31 | - STATUS OFF | 32 | + STATUS DEFAULT |
32 | TEMPLATE "none.htm" | 33 | TEMPLATE "none.htm" |
33 | TYPE POINT | 34 | TYPE POINT |
34 | UNITS METERS | 35 | UNITS METERS |
@@ -37,7 +38,7 @@ MAP | @@ -37,7 +38,7 @@ MAP | ||
37 | EXPRESSION ('[TIPO]'eq'Vila') | 38 | EXPRESSION ('[TIPO]'eq'Vila') |
38 | STYLE | 39 | STYLE |
39 | ANGLE 360 | 40 | ANGLE 360 |
40 | - COLOR 209 36 9 | 41 | + COLOR 250 193 4 |
41 | SIZE 4 | 42 | SIZE 4 |
42 | SYMBOL "ponto" | 43 | SYMBOL "ponto" |
43 | WIDTH 1 | 44 | WIDTH 1 |