Commit 8db59522e2ce1d7d12d8a3b90b8bfc41137c175d

Authored by Edmar Moretti
1 parent 103b4faa

--no commit message

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