Commit 81829a3fb7b3df06f90052921aab14295bcc807d

Authored by Edmar Moretti
1 parent 1056d29f

Atualização da árvore hiperbólica

admin/hiperbolica.php
@@ -10,15 +10,17 @@ else$xml = "<"."\x3F"."xml version='1.0' encoding='ISO-8859-1' "."\x3F".">"; @@ -10,15 +10,17 @@ else$xml = "<"."\x3F"."xml version='1.0' encoding='ISO-8859-1' "."\x3F".">";
10 10
11 $xml .= "<capa>"; 11 $xml .= "<capa>";
12 $menus = pegaDados("SELECT * from i3geoadmin_menus order by nome_menu ",$locaplic); 12 $menus = pegaDados("SELECT * from i3geoadmin_menus order by nome_menu ",$locaplic);
13 -$xml .= '<termo id="00" nome="Dados geo">'; 13 +$xml .= '<termo cor="#FFFFFF" id="00" nome="Dados geo">';
14 $contador = 0; 14 $contador = 0;
15 -$xml .= '<item id="'.$contador.'" tipo="TE1" nome="Menus" familia="1" /> '."\n"; 15 +$xml .= '<item cor="#FFFFCC" id="'.$contador.'" tipo="TE1" nome="Menus" familia="1" /> '."\n";
16 foreach ($menus as $menu) 16 foreach ($menus as $menu)
17 { 17 {
  18 + if(strtolower($menu["publicado_menu"]) == "nao")
  19 + {continue;}
18 $id = $menu["id_menu"]; 20 $id = $menu["id_menu"];
19 $nome = html_entity_decode($menu["nome_menu"]); 21 $nome = html_entity_decode($menu["nome_menu"]);
20 //menu 22 //menu
21 - $xml .= '<item id="'.$contador.'" tipo="TE2" nome="'.$nome.'" familia="'.$id.'" /> '."\n"; 23 + $xml .= '<item cor="#FFFF99" id="'.$contador.'" tipo="TE2" nome="'.$nome.'" familia="'.$id.'" /> '."\n";
22 $grupos = pegaDados("select i3geoadmin_grupos.nome_grupo,id_n1,id_menu from i3geoadmin_n1 LEFT JOIN i3geoadmin_grupos ON i3geoadmin_n1.id_grupo = i3geoadmin_grupos.id_grupo where id_menu='$id' order by ordem",$locaplic); 24 $grupos = pegaDados("select i3geoadmin_grupos.nome_grupo,id_n1,id_menu from i3geoadmin_n1 LEFT JOIN i3geoadmin_grupos ON i3geoadmin_n1.id_grupo = i3geoadmin_grupos.id_grupo where id_menu='$id' order by ordem",$locaplic);
23 for($i=0;$i < count($grupos);++$i) 25 for($i=0;$i < count($grupos);++$i)
24 { 26 {
@@ -26,9 +28,9 @@ foreach ($menus as $menu) @@ -26,9 +28,9 @@ foreach ($menus as $menu)
26 $nome = html_entity_decode($grupos[$i]["nome_grupo"]); 28 $nome = html_entity_decode($grupos[$i]["nome_grupo"]);
27 $idgrupo = $grupos[$i]["id_n1"]; 29 $idgrupo = $grupos[$i]["id_n1"];
28 //grupo 30 //grupo
29 - $xml .= '<item cor="#4148A4" id="'.$contador.'" tipo="TE3" nome="'.$nome.'" familia="'.$id.'" /> '."\n"; 31 + $xml .= '<item cor="#FFCC99" id="'.$contador.'" tipo="TE3" nome="'.$nome.'" familia="'.$id.'" /> '."\n";
30 $contador++; 32 $contador++;
31 - $xml .= '<item id="'.$contador.'" tipo="TE4" nome="SUBGRUPOS" familia="'.$id.'" /> '."\n"; 33 + $xml .= '<item cor="#FF9966" id="'.$contador.'" tipo="TE4" nome="SUBGRUPOS" familia="'.$id.'" /> '."\n";
32 34
33 $subgrupos = pegaDados("select i3geoadmin_subgrupos.nome_subgrupo,i3geoadmin_n2.id_n2 from i3geoadmin_n2 LEFT JOIN i3geoadmin_subgrupos ON i3geoadmin_n2.id_subgrupo = i3geoadmin_subgrupos.id_subgrupo where i3geoadmin_n2.id_n1='$idgrupo' order by ordem",$locaplic); 35 $subgrupos = pegaDados("select i3geoadmin_subgrupos.nome_subgrupo,i3geoadmin_n2.id_n2 from i3geoadmin_n2 LEFT JOIN i3geoadmin_subgrupos ON i3geoadmin_n2.id_subgrupo = i3geoadmin_subgrupos.id_subgrupo where i3geoadmin_n2.id_n1='$idgrupo' order by ordem",$locaplic);
34 for($j=0;$j < count($subgrupos);++$j) 36 for($j=0;$j < count($subgrupos);++$j)
@@ -36,9 +38,9 @@ foreach ($menus as $menu) @@ -36,9 +38,9 @@ foreach ($menus as $menu)
36 $contador++; 38 $contador++;
37 $nome = html_entity_decode($subgrupos[$j]["nome_subgrupo"]); 39 $nome = html_entity_decode($subgrupos[$j]["nome_subgrupo"]);
38 //subgrupo 40 //subgrupo
39 - $xml .= '<item id="'.$contador.'" tipo="TE5" nome="'.$nome.'" familia="'.$id.'" /> '."\n"; 41 + $xml .= '<item cor="#FF9900" id="'.$contador.'" tipo="TE5" nome="'.$nome.'" familia="'.$id.'" /> '."\n";
40 $contador++; 42 $contador++;
41 - $xml .= '<item id="'.$contador.'" tipo="TE6" nome="TEMAS" familia="'.$id.'" /> '."\n"; 43 + $xml .= '<item cor="#FF6633" id="'.$contador.'" tipo="TE6" nome="TEMAS" familia="'.$id.'" /> '."\n";
42 $id_n2 = $subgrupos[$j]["id_n2"]; 44 $id_n2 = $subgrupos[$j]["id_n2"];
43 $temas = pegaDados("select i3geoadmin_temas.tags_tema,i3geoadmin_temas.nome_tema,i3geoadmin_temas.codigo_tema,i3geoadmin_n3.id_n3 from i3geoadmin_n3 LEFT JOIN i3geoadmin_temas ON i3geoadmin_n3.id_tema = i3geoadmin_temas.id_tema where i3geoadmin_n3.id_n2='$id_n2' order by ordem",$locaplic); 45 $temas = pegaDados("select i3geoadmin_temas.tags_tema,i3geoadmin_temas.nome_tema,i3geoadmin_temas.codigo_tema,i3geoadmin_n3.id_n3 from i3geoadmin_n3 LEFT JOIN i3geoadmin_temas ON i3geoadmin_n3.id_tema = i3geoadmin_temas.id_tema where i3geoadmin_n3.id_n2='$id_n2' order by ordem",$locaplic);
44 for($k=0;$k < count($temas);++$k) 46 for($k=0;$k < count($temas);++$k)
@@ -49,19 +51,19 @@ foreach ($menus as $menu) @@ -49,19 +51,19 @@ foreach ($menus as $menu)
49 if($nome != "") 51 if($nome != "")
50 { 52 {
51 //tema 53 //tema
52 - $xml .= '<item id="'.$contador.'" tipo="TE7" nome="'.$nome.'" familia="'.$nid.'" /> '."\n"; 54 + $xml .= '<item cor="#33CCFF" id="'.$contador.'" tipo="TE7" nome="'.$nome.'" familia="'.$nid.'" /> '."\n";
53 $contador++; 55 $contador++;
54 $tags = explode(" ",$temas[$k]["tags_tema"]); 56 $tags = explode(" ",$temas[$k]["tags_tema"]);
55 if(count($tags) > 0) 57 if(count($tags) > 0)
56 { 58 {
57 //tags 59 //tags
58 - $xml .= '<item id="'.$contador.'" tipo="TE8" nome="TAGs" familia="'.$id.'" /> '."\n"; 60 + $xml .= '<item cor="#CC6633" id="'.$contador.'" tipo="TE8" nome="TAGs" familia="'.$id.'" /> '."\n";
59 foreach($tags as $tag) 61 foreach($tags as $tag)
60 { 62 {
61 $contador++; 63 $contador++;
62 $tag = html_entity_decode($tag); 64 $tag = html_entity_decode($tag);
63 if($tag != "") 65 if($tag != "")
64 - $xml .= '<item id="'.$contador.'" tipo="TE9" nome="'.$tag.'" familia="tag,'.$tag.'" /> '."\n"; 66 + $xml .= '<item cor="#33CCFF" id="'.$contador.'" tipo="TE9" nome="'.$tag.'" familia="tag,'.$tag.'" /> '."\n";
65 } 67 }
66 } 68 }
67 } 69 }
@@ -71,14 +73,14 @@ foreach ($menus as $menu) @@ -71,14 +73,14 @@ foreach ($menus as $menu)
71 } 73 }
72 $contador++; 74 $contador++;
73 $id = $contador; 75 $id = $contador;
74 -$xml .= '<item id="'.$contador.'" tipo="TE1" nome="GRUPOS" familia="2" /> '."\n"; 76 +$xml .= '<item cor="#FFFFCC" id="'.$contador.'" tipo="TE1" nome="GRUPOS" familia="2" /> '."\n";
75 $grupos = pegaDados("select i3geoadmin_grupos.nome_grupo,id_n1,id_menu from i3geoadmin_n1 LEFT JOIN i3geoadmin_grupos ON i3geoadmin_n1.id_grupo = i3geoadmin_grupos.id_grupo order by ordem",$locaplic); 77 $grupos = pegaDados("select i3geoadmin_grupos.nome_grupo,id_n1,id_menu from i3geoadmin_n1 LEFT JOIN i3geoadmin_grupos ON i3geoadmin_n1.id_grupo = i3geoadmin_grupos.id_grupo order by ordem",$locaplic);
76 for($i=0;$i < count($grupos);++$i) 78 for($i=0;$i < count($grupos);++$i)
77 { 79 {
78 $contador++; 80 $contador++;
79 $nome = html_entity_decode($grupos[$i]["nome_grupo"]); 81 $nome = html_entity_decode($grupos[$i]["nome_grupo"]);
80 $idgrupo = $grupos[$i]["id_n1"]; 82 $idgrupo = $grupos[$i]["id_n1"];
81 - $xml .= '<item id="'.$contador.'" tipo="TE2" nome="'.$nome.'" familia="'.$id.'" /> '."\n"; 83 + $xml .= '<item cor="#FFFF99" id="'.$contador.'" tipo="TE2" nome="'.$nome.'" familia="'.$id.'" /> '."\n";
82 $temastag = pegaDados("select d.tags_tema as tags,d.id_tema as tema from i3geoadmin_n2 as b,i3geoadmin_n1 as a,i3geoadmin_n3 as c,i3geoadmin_temas as d where a.id_grupo = '$idgrupo' and a.id_n1 = b.id_n1 and c.id_n2 = b.id_n2 and c.id_tema = d.id_tema group by tema,d.tags_tema",$locaplic); 84 $temastag = pegaDados("select d.tags_tema as tags,d.id_tema as tema from i3geoadmin_n2 as b,i3geoadmin_n1 as a,i3geoadmin_n3 as c,i3geoadmin_temas as d where a.id_grupo = '$idgrupo' and a.id_n1 = b.id_n1 and c.id_n2 = b.id_n2 and c.id_tema = d.id_tema group by tema,d.tags_tema",$locaplic);
83 $arrayTag = array(); 85 $arrayTag = array();
84 foreach($temastag as $tematag) 86 foreach($temastag as $tematag)
@@ -90,30 +92,31 @@ for($i=0;$i &lt; count($grupos);++$i) @@ -90,30 +92,31 @@ for($i=0;$i &lt; count($grupos);++$i)
90 if(count($arrayTag > 0)) 92 if(count($arrayTag > 0))
91 { 93 {
92 $contador++; 94 $contador++;
93 - $xml .= '<item id="'.$contador.'" tipo="TE4" nome="TAGs" familia="'.$id.'" /> '."\n"; 95 + $xml .= '<item cor="#FFCC99" id="'.$contador.'" tipo="TE3" nome="TAGs" familia="'.$id.'" /> '."\n";
94 foreach($arrayTag as $tag) 96 foreach($arrayTag as $tag)
95 { 97 {
96 $tag = html_entity_decode($tag); 98 $tag = html_entity_decode($tag);
97 $contador++; 99 $contador++;
98 if($tag != "") 100 if($tag != "")
99 - $xml .= '<item id="'.$contador.'" tipo="TE5" nome="'.$tag.'" familia="tag,'.$tag.'" /> '."\n"; 101 + $xml .= '<item cor="#33CCFF" id="'.$contador.'" tipo="TE4" nome="'.$tag.'" familia="tag,'.$tag.'" /> '."\n";
100 } 102 }
101 } 103 }
102 } 104 }
103 $id = $contador; 105 $id = $contador;
104 -$xml .= '<item id="'.$contador.'" tipo="TE1" nome="Web Services" familia="3" /> '."\n"; 106 +$xml .= '<item cor="#FFFFCC" id="'.$contador.'" tipo="TE1" nome="Web Services" familia="3" /> '."\n";
105 $tipos = pegaDados("select tipo_ws from i3geoadmin_ws group by tipo_ws",$locaplic); 107 $tipos = pegaDados("select tipo_ws from i3geoadmin_ws group by tipo_ws",$locaplic);
106 foreach ($tipos as $tipo) 108 foreach ($tipos as $tipo)
107 { 109 {
108 $contador++; 110 $contador++;
109 - $xml .= '<item id="'.$contador.'" tipo="TE2" nome="'.$tipo["tipo_ws"].'" familia="'.$id.'" /> '."\n";  
110 - $ws = pegaDados("select nome_ws from i3geoadmin_ws where tipo_ws = '".$tipo["tipo_ws"]."'",$locaplic); 111 + $xml .= '<item cor="#FFFF99" id="'.$contador.'" tipo="TE2" nome="'.$tipo["tipo_ws"].'" familia="'.$id.'" /> '."\n";
  112 + $ws = pegaDados("select link_ws,nome_ws from i3geoadmin_ws where tipo_ws = '".$tipo["tipo_ws"]."'",$locaplic);
111 foreach($ws as $w) 113 foreach($ws as $w)
112 { 114 {
113 $contador++; 115 $contador++;
114 $nome = html_entity_decode($w["nome_ws"]); 116 $nome = html_entity_decode($w["nome_ws"]);
  117 + $link = str_replace("&","&amp;",$w["link_ws"]);
115 if($nome != "") 118 if($nome != "")
116 - $xml .= '<item id="'.$contador.'" tipo="TE3" nome="'.$nome.'" familia="'.$tipo["tipo_ws"].'" /> '."\n"; 119 + $xml .= '<item cor="#33CCFF" id="'.$contador.'" tipo="TE3" nome="'.$nome.'" familia="'.$tipo["tipo_ws"].",".$link.'" /> '."\n";
117 } 120 }
118 } 121 }
119 122
pacotes/arvorehiper/index.php
@@ -99,6 +99,11 @@ function SelecionaTema(id) { @@ -99,6 +99,11 @@ function SelecionaTema(id) {
99 var sUrl = "<?php echo $i3geo;?>/admin/php/menutemas.php?funcao=pegaTagsPorMapfile&tag="+removeAcentos(myarray[1]) 99 var sUrl = "<?php echo $i3geo;?>/admin/php/menutemas.php?funcao=pegaTagsPorMapfile&tag="+removeAcentos(myarray[1])
100 core_pegaDados("",sUrl,"listaTemasPorTag") 100 core_pegaDados("",sUrl,"listaTemasPorTag")
101 } 101 }
  102 + if(myarray[0] == "GEORSS" || myarray[0] == "DOWNLOAD" || myarray[0] == "WS")
  103 + {window.open(myarray[1])}
  104 + if(myarray[0] == "WMS")
  105 + {window.open(myarray[1]+"&service=wms&request=getcapabilities")}
  106 +
102 } 107 }
103 function listaTemasPorTag(dados) 108 function listaTemasPorTag(dados)
104 { 109 {
pacotes/arvorehiper/tree4.jar 0 → 100644
No preview for this file type