Commit f64c213956e336c17490f586b635e0977862f403
1 parent
c7f79e84
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
95 additions
and
5 deletions
Show diff stats
pacotes/arvorehiper/index.php
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | include("../../ms_configura.php"); |
| 3 | 3 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 4 | 4 | $url = $protocolo[0]."://".$_SERVER['HTTP_HOST']."/".basename($locaplic)."/admin/hiperbolica.php"; |
| 5 | +$i3geo = $protocolo[0]."://".$_SERVER['HTTP_HOST']."/".basename($locaplic); | |
| 5 | 6 | ?> |
| 6 | 7 | <html> |
| 7 | 8 | <head> |
| ... | ... | @@ -33,9 +34,10 @@ div#divArvore { |
| 33 | 34 | overflow:auto; |
| 34 | 35 | } |
| 35 | 36 | </STYLE> |
| 36 | -<body leftmargin="0" topmargin="0"> | |
| 37 | - <div id="divArvore"> | |
| 38 | - <applet code="tree.HTApplet.class" archive="tree4.jar" width="100%" height="100%" MAYSCRIPT="true"> | |
| 37 | +<script type="text/javascript" src="../../admin/js/core.js"></script> | |
| 38 | + | |
| 39 | +<body leftmargin="0" topmargin="0" class=" yui-skin-sam"> | |
| 40 | + <applet style=z-index:0;" code="tree.HTApplet.class" archive="tree4.jar" width="100%" height="100%" MAYSCRIPT="true"> | |
| 39 | 41 | <param name="htfile" value=""> |
| 40 | 42 | <param name="xmlfile" value="<?php echo $url;?>"> |
| 41 | 43 | <param name="xmltipo" value="verbete"> |
| ... | ... | @@ -54,7 +56,95 @@ div#divArvore { |
| 54 | 56 | <param name="htopenwindow" value="self"> |
| 55 | 57 | <param name="funcaoJS" value="SelecionaTema"> |
| 56 | 58 | </applet> |
| 57 | - </div> | |
| 58 | -</body> | |
| 59 | +<script> | |
| 60 | +YAHOO.namespace("example.container"); | |
| 61 | +function SelecionaTema(id) { | |
| 62 | + var myString = new String(id); | |
| 63 | + var myarray = myString.split(','); | |
| 64 | + | |
| 65 | + if(myarray[0] == "tema") | |
| 66 | + { | |
| 67 | + core_montaEditor("","320px","500px") | |
| 68 | + var imagemsrc = "<?php echo $i3geo;?>/testamapfile.php?map="+myarray[1]+".map&tipo=grande" | |
| 69 | + var ins = "<img src='"+imagemsrc+"' /><br><br>" | |
| 70 | + ins += '<input type=button id=fechar value="Fechar" style="left:-5px;" />' | |
| 71 | + ins += '<input type=button id=i3geo value="i3Geo" style="left:-5px;" />' | |
| 72 | + ins += '<input type=button id=mais value="Mais..." style="left:-5px;" />' | |
| 73 | + | |
| 74 | + $i("editor_bd").innerHTML = ins | |
| 75 | + var fechar = function() | |
| 76 | + { | |
| 77 | + YAHOO.example.container.panelEditor.destroy(); | |
| 78 | + YAHOO.example.container.panelEditor = null; | |
| 79 | + } | |
| 80 | + var i3geo = function() | |
| 81 | + { | |
| 82 | + window.open("<?php echo $i3geo;?>/ms_criamapa.php?temasa="+myarray[1]+"&layers="+myarray[1]) | |
| 83 | + } | |
| 84 | + var mais = function() | |
| 85 | + { | |
| 86 | + window.open("<?php echo $i3geo;?>/admin/abrefontemapfile.php?tema="+myarray[1]) | |
| 87 | + } | |
| 88 | + var adiciona = new YAHOO.widget.Button("fechar",{ onclick: { fn: fechar } }); | |
| 89 | + var adiciona = new YAHOO.widget.Button("i3geo",{ onclick: { fn: i3geo } }); | |
| 90 | + var adiciona = new YAHOO.widget.Button("mais",{ onclick: { fn: mais } }); | |
| 91 | + $i("janela_editor_c").style.paddingRight = "18px" | |
| 92 | + $i("janela_editor_c").style.overflow = "auto" | |
| 93 | + var temp = function(e) | |
| 94 | + {e.style.display="none";} | |
| 95 | + YAHOO.util.Dom.getElementsByClassName("container-close","span","janela_editor_c",temp) | |
| 96 | + } | |
| 97 | + if(myarray[0] == "tag") | |
| 98 | + { | |
| 99 | + var sUrl = "<?php echo $i3geo;?>/admin/php/menutemas.php?funcao=pegaTagsPorMapfile&tag="+removeAcentos(myarray[1]) | |
| 100 | + core_pegaDados("",sUrl,"listaTemasPorTag") | |
| 101 | + } | |
| 102 | +} | |
| 103 | +function listaTemasPorTag(dados) | |
| 104 | +{ | |
| 105 | + var ins = "Os seguintes temas contém o TAG clicado:<br><br>"; | |
| 106 | + ins += '<input type=button id=fechar value="Fechar" style="left:-5px;" /><br>' | |
| 107 | + | |
| 108 | + for (i=0;i < dados.length; i++) | |
| 109 | + { | |
| 110 | + ins += "<p>"+dados[i].nome | |
| 111 | + var url = "<?php echo $i3geo;?>/ms_criamapa.php?temasa="+dados[i].codigoMap+"&layers="+dados[i].codigoMap | |
| 112 | + ins += "<a href='"+url+"' target=_blank > mapa </a>" | |
| 113 | + if(dados[i].link != "") | |
| 114 | + ins += "<a href='"+dados[i].link+"' target=_blank > fonte </a>" | |
| 115 | + ins += "</p>" | |
| 116 | + } | |
| 117 | + core_montaEditor("","350px","500px") | |
| 118 | + $i("janela_editor_c").style.paddingRight = "18px" | |
| 119 | + $i("janela_editor_c").style.overflow = "auto" | |
| 120 | + $i("editor_bd").innerHTML = ins | |
| 121 | + var fechar = function() | |
| 122 | + { | |
| 123 | + YAHOO.example.container.panelEditor.destroy(); | |
| 124 | + YAHOO.example.container.panelEditor = null; | |
| 125 | + } | |
| 126 | + var adiciona = new YAHOO.widget.Button("fechar",{ onclick: { fn: fechar } }); | |
| 127 | + var temp = function(e) | |
| 128 | + {e.style.display="none";} | |
| 129 | + YAHOO.util.Dom.getElementsByClassName("container-close","span","janela_editor_c",temp) | |
| 130 | +} | |
| 131 | +function removeAcentos(palavra) | |
| 132 | +{ | |
| 133 | + var re = /ã|á|à|â/gi; | |
| 134 | + palavra = palavra.replace(re,"a"); | |
| 135 | + var re = /é/gi; | |
| 136 | + palavra = palavra.replace(re,"e"); | |
| 137 | + var re = /í/gi; | |
| 138 | + palavra = palavra.replace(re,"i"); | |
| 139 | + var re = /ó|õ/gi; | |
| 140 | + palavra = palavra.replace(re,"o"); | |
| 141 | + var re = /ç/gi; | |
| 142 | + palavra = palavra.replace(re,"c"); | |
| 143 | + var re = /ú/gi; | |
| 144 | + palavra = palavra.replace(re,"u"); | |
| 145 | + return(palavra); | |
| 146 | +} | |
| 147 | + | |
| 148 | +</script> | |
| 59 | 149 | </body> |
| 60 | 150 | </html> | ... | ... |