Commit 8c88baee6c534c2c5f3a58685a3e506009fcb88b
1 parent
3e44d78d
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
660 additions
and
1 deletions
Show diff stats
aplicmap/geral.htm
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | No modo não compactado o código está adaptado para uso com o Firebug do Firefox. |
| 14 | 14 | --> |
| 15 | 15 | <script type="text/javascript" src="../classesjs/i3geo.js"></script> |
| 16 | + | |
| 16 | 17 | <style> |
| 17 | 18 | .yui-log .i3geo {background-color:yellow;} /* customize a color */ |
| 18 | 19 | .yui-log .redesenho {background-color:yellow;} /* customize a color */ |
| ... | ... | @@ -347,6 +348,6 @@ i3GEO.php.ligatemas(temp,"","biomashp","sim"); |
| 347 | 348 | if($i("escala") && i3GEO.parametros.w < 500) |
| 348 | 349 | {$i("escala").style.display="none";} |
| 349 | 350 | </script> |
| 350 | - | |
| 351 | 351 | </body> |
| 352 | + | |
| 352 | 353 | </html> |
| 353 | 354 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,658 @@ |
| 1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | |
| 2 | +/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: true */ | |
| 3 | + | |
| 4 | +/* | |
| 5 | +About: Licença | |
| 6 | + | |
| 7 | +I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 8 | + | |
| 9 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
| 10 | +Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
| 11 | + | |
| 12 | +Este programa é software livre; você pode redistribuí-lo | |
| 13 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
| 14 | +GNU conforme publicada pela Free Software Foundation; | |
| 15 | +tanto a versão 2 da Licença. | |
| 16 | +Este programa é distribuído na expectativa de que seja útil, | |
| 17 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
| 18 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
| 19 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
| 20 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
| 21 | +GNU junto com este programa; se não, escreva para a | |
| 22 | +Free Software Foundation, Inc., no endereço | |
| 23 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
| 24 | +*/ | |
| 25 | +if(typeof(i3GEOF) === 'undefined'){ | |
| 26 | + i3GEOF = []; | |
| 27 | +} | |
| 28 | +/* | |
| 29 | +Class: i3GEOF.graficointerativo | |
| 30 | + | |
| 31 | +Representação gráfica de dados | |
| 32 | +*/ | |
| 33 | +i3GEOF.graficointerativo = { | |
| 34 | + /* | |
| 35 | + Variavel: aguarde | |
| 36 | + | |
| 37 | + Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
| 38 | + */ | |
| 39 | + aguarde: "", | |
| 40 | + /* | |
| 41 | + Variavel: tipo | |
| 42 | + | |
| 43 | + Tipo de gráfico escolhido pelo usuário. | |
| 44 | + */ | |
| 45 | + tipo: "", | |
| 46 | + /* | |
| 47 | + Function: inicia | |
| 48 | + | |
| 49 | + Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
| 50 | + | |
| 51 | + Parametro: | |
| 52 | + | |
| 53 | + iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
| 54 | + */ | |
| 55 | + inicia: function(iddiv){ | |
| 56 | + try{ | |
| 57 | + $i(iddiv).innerHTML += i3GEOF.graficointerativo.html(); | |
| 58 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | |
| 59 | + //eventos das guias | |
| 60 | + $i("i3GEOgraficointerativoguia1").onclick = function(){ | |
| 61 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | |
| 62 | + }; | |
| 63 | + $i("i3GEOgraficointerativoguia2").onclick = function(){ | |
| 64 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia2","i3GEOgraficointerativoguia"); | |
| 65 | + i3GEOF.graficointerativo.configuraDados(); | |
| 66 | + }; | |
| 67 | + $i("i3GEOgraficointerativoguia4").onclick = function(){ | |
| 68 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia4","i3GEOgraficointerativoguia"); | |
| 69 | + var so = new SWFObject(i3GEO.configura.locaplic+"/pacotes/openflashchart/open-flash-chart.swf", "i3GEOgraficointerativoGrafico1", "95%", "88%", "9", "#ffffff"); | |
| 70 | + so.addVariable("get-data", "i3GEOF.graficointerativo.tabela2dados"); | |
| 71 | + so.write("i3GEOgraficointerativoGrafico"); | |
| 72 | + }; | |
| 73 | + i3GEOF.graficointerativo.ativaFoco(); | |
| 74 | + i3GEO.util.comboTemas( | |
| 75 | + "i3GEOgraficointerativoComboTemasId", | |
| 76 | + function(retorno){ | |
| 77 | + $i("i3GEOgraficointerativoComboTemas").innerHTML = retorno.dados; | |
| 78 | + $i("i3GEOgraficointerativoComboTemas").style.display = "block"; | |
| 79 | + if ($i("i3GEOgraficointerativoComboTemasId")){ | |
| 80 | + $i("i3GEOgraficointerativoComboTemasId").onchange = function(){ | |
| 81 | + i3GEO.mapa.ativaTema($i("i3GEOgraficointerativoComboTemasId").value); | |
| 82 | + i3GEOF.graficointerativo.comboItensSel(); | |
| 83 | + }; | |
| 84 | + } | |
| 85 | + if(i3GEO.temaAtivo !== ""){ | |
| 86 | + $i("i3GEOgraficointerativoComboTemasId").value = i3GEO.temaAtivo; | |
| 87 | + $i("i3GEOgraficointerativoComboTemasId").onchange.call(); | |
| 88 | + } | |
| 89 | + }, | |
| 90 | + "i3GEOgraficointerativoComboTemas", | |
| 91 | + "", | |
| 92 | + false, | |
| 93 | + "ligados" | |
| 94 | + ); | |
| 95 | + new YAHOO.widget.Button( | |
| 96 | + "i3GEOgraficointerativobotao1", | |
| 97 | + {onclick:{fn: i3GEOF.graficointerativo.obterDados}} | |
| 98 | + ); | |
| 99 | + } | |
| 100 | + catch(erro){alert(erro);} | |
| 101 | + }, | |
| 102 | + /* | |
| 103 | + Function: html | |
| 104 | + | |
| 105 | + Gera o código html para apresentação das opções da ferramenta | |
| 106 | + | |
| 107 | + Retorno: | |
| 108 | + | |
| 109 | + String com o código html | |
| 110 | + */ | |
| 111 | + html:function(){ | |
| 112 | + var ins = '' + | |
| 113 | + '<div id=i3GEOgraficointerativoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">' + | |
| 114 | + ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">' + | |
| 115 | + ' <li><a href="#ancora"><em><div id="i3GEOgraficointerativoguia1" style="text-align:center;left:0px;" >Tipo</div></em></a></li>' + | |
| 116 | + ' <li><a href="#ancora"><em><div id="i3GEOgraficointerativoguia2" style="text-align:center;left:0px;" >Dados</div></em></a></li>' + | |
| 117 | + ' <li><a href="#ancora"><em><div id="i3GEOgraficointerativoguia3" style="text-align:center;left:0px;" >Propriedades</div></em></a></li>' + | |
| 118 | + ' <li><a href="#ancora"><em><div id="i3GEOgraficointerativoguia4" style="text-align:center;left:0px;" >Gráfico</div></em></a></li>' + | |
| 119 | + ' </ul>' + | |
| 120 | + '</div><br>' + | |
| 121 | + '<div class=guiaobj id="i3GEOgraficointerativoguia1obj" style="left:1px;display:none;">' + | |
| 122 | + ' <p class=paragrafo >Escolha o tipo de gráfico: </p>' + | |
| 123 | + ' <table class=lista6 >' + | |
| 124 | + ' <tr><td><input type=radio onclick="javascript:i3GEOF.graficointerativo.tipo=\'pizza2d\';" value="pizza2d" name="tipoGrafico" style=cursor:pointer > </td><td>pizza 2d</td></tr>' + | |
| 125 | + ' </table>' + | |
| 126 | + '</div> ' + | |
| 127 | + '<div class=guiaobj id="i3GEOgraficointerativoguia2obj" style="left:1px;display:none;top:-5px">' + | |
| 128 | + ' <p class=paragrafo >Escolha os dados que comporão o gráfico: </p>' + | |
| 129 | + ' <div class=paragrafo id=i3GEOgraficointerativoAjudaPizza >Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.</div>' + | |
| 130 | + ' <p class=paragrafo >Tema:</p>' + | |
| 131 | + ' <div class=paragrafo id=i3GEOgraficointerativoComboTemas ></div>' + | |
| 132 | + ' <div class=paragrafo id=i3GEOgraficointerativoComboXlinha >' + | |
| 133 | + ' <p class=paragrafo >Item com as classes ou eixo X:</p>' + | |
| 134 | + ' <div class=paragrafo id=i3GEOgraficointerativoComboX ></div>' + | |
| 135 | + ' </div>'+ | |
| 136 | + ' <div id=i3GEOgraficointerativoComboYlinha >'+ | |
| 137 | + ' <p class=paragrafo >Item com os valores ou eixo Y: </p>'+ | |
| 138 | + ' <div class=paragrafo id=i3GEOgraficointerativoComboY ></div>' + | |
| 139 | + ' </div>' + | |
| 140 | + ' <p class=paragrafo >Excluir o seguinte valor: ' + | |
| 141 | + $inputText("","","i3GEOgraficointerativoexcluir","",3,"") + | |
| 142 | + ' <p class=paragrafo ><input id=i3GEOgraficointerativobotao1 type="buttom" value="Obter dados" /></p>'+ | |
| 143 | + ' <div id=i3GEOgraficointerativoDados ></div>'+ | |
| 144 | + '</div>' + | |
| 145 | + '<div class=guiaobj id="i3GEOgraficointerativoguia3obj" style="left:1px;display:none;top:-5px">' + | |
| 146 | + '</div>'+ | |
| 147 | + '<div class=guiaobj id="i3GEOgraficointerativoguia4obj" style="left:1px;display:none;top:-5px">' + | |
| 148 | + ' <div id="i3GEOgraficointerativoGrafico">gráfico</div>' + | |
| 149 | + '</div>'; | |
| 150 | + return ins; | |
| 151 | + }, | |
| 152 | + /* | |
| 153 | + Function: criaJanelaFlutuante | |
| 154 | + | |
| 155 | + Cria a janela flutuante para controle da ferramenta. | |
| 156 | + */ | |
| 157 | + criaJanelaFlutuante: function(){ | |
| 158 | + var minimiza,cabecalho,janela,divid,temp,titulo; | |
| 159 | + //cria a janela flutuante | |
| 160 | + cabecalho = function(){ | |
| 161 | + i3GEOF.graficointerativo.ativaFoco(); | |
| 162 | + }; | |
| 163 | + minimiza = function(){ | |
| 164 | + i3GEO.janela.minimiza("i3GEOF.graficointerativo"); | |
| 165 | + }; | |
| 166 | + titulo = "Gráficos interativos <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=48a' > </a>"; | |
| 167 | + janela = i3GEO.janela.cria( | |
| 168 | + "380px", | |
| 169 | + "240px", | |
| 170 | + "", | |
| 171 | + "", | |
| 172 | + "", | |
| 173 | + titulo, | |
| 174 | + "i3GEOF.graficointerativo", | |
| 175 | + false, | |
| 176 | + "hd", | |
| 177 | + cabecalho, | |
| 178 | + minimiza | |
| 179 | + ); | |
| 180 | + divid = janela[2].id; | |
| 181 | + i3GEOF.graficointerativo.aguarde = $i("i3GEOF.graficointerativo_imagemCabecalho").style; | |
| 182 | + $i("i3GEOF.graficointerativo_corpo").style.backgroundColor = "white"; | |
| 183 | + i3GEOF.graficointerativo.inicia(divid); | |
| 184 | + }, | |
| 185 | + /* | |
| 186 | + Function: ativaFoco | |
| 187 | + | |
| 188 | + Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
| 189 | + */ | |
| 190 | + ativaFoco: function(){ | |
| 191 | + i3GEO.barraDeBotoes.ativaIcone("graficointerativo"); | |
| 192 | + var i = $i("i3GEOF.graficointerativo_c").style; | |
| 193 | + i3GEO.janela.ULTIMOZINDEX++; | |
| 194 | + i.zIndex = 10000 + i3GEO.janela.ULTIMOZINDEX; | |
| 195 | + }, | |
| 196 | + /* | |
| 197 | + Function: configuraDados | |
| 198 | + | |
| 199 | + Configura o formulário para obtenção dos dados para cada tipo de gráfico | |
| 200 | + */ | |
| 201 | + configuraDados: function(){ | |
| 202 | + var radios = $i("i3GEOgraficointerativoguia1obj").getElementsByTagName("input"), | |
| 203 | + nradios = radios.length, | |
| 204 | + i, | |
| 205 | + ativa = function(comboxlinha,comboylinha,ajudapizza){ | |
| 206 | + $i("i3GEOgraficointerativoComboXlinha").style.display = comboxlinha; | |
| 207 | + $i("i3GEOgraficointerativoComboYlinha").style.display = comboylinha; | |
| 208 | + $i("i3GEOgraficointerativoAjudaPizza").style.display = ajudapizza; | |
| 209 | + }; | |
| 210 | + if (i3GEOF.graficointerativo.tipo === ""){ | |
| 211 | + alert("Escolha um tipo de grafico"); | |
| 212 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | |
| 213 | + return; | |
| 214 | + } | |
| 215 | + if(i3GEOF.graficointerativo.tipo === "pizza2d"){ | |
| 216 | + ativa.call("block","block","block"); | |
| 217 | + } | |
| 218 | + }, | |
| 219 | + /* | |
| 220 | + Function: comboItensSel | |
| 221 | + | |
| 222 | + Cria um combo para selecionar os itens do tema escolhido | |
| 223 | + */ | |
| 224 | + comboItensSel: function(){ | |
| 225 | + var tema = $i("i3GEOgraficointerativoComboTemasId").value; | |
| 226 | + i3GEO.util.comboItens( | |
| 227 | + "i3GEOgraficointerativoComboXid", | |
| 228 | + tema, | |
| 229 | + function(retorno){ | |
| 230 | + var combo = retorno.dados; | |
| 231 | + if(retorno.tipo === "erro"){ | |
| 232 | + $i("i3GEOgraficointerativoComboX").innerHTML = "<br><br><span style='color:red'>erro ao ler os itens do tema de origem</span><br><br>"; | |
| 233 | + $i("i3GEOgraficointerativoComboY").innerHTML = "<br><br><span style='color:red'>erro ao ler os itens do tema de origem</span><br><br>"; | |
| 234 | + } | |
| 235 | + else{ | |
| 236 | + $i("i3GEOgraficointerativoComboY").innerHTML = retorno.dados; | |
| 237 | + $i("i3GEOgraficointerativoComboXid").id = "i3GEOgraficointerativoComboYid"; | |
| 238 | + $i("i3GEOgraficointerativoComboX").innerHTML = retorno.dados; | |
| 239 | + } | |
| 240 | + }, | |
| 241 | + "i3GEOgraficointerativoComboX", | |
| 242 | + "" | |
| 243 | + ); | |
| 244 | + }, | |
| 245 | + /* | |
| 246 | + Function: obterDados | |
| 247 | + | |
| 248 | + Obtém os dados que serão utilizados no gráfico | |
| 249 | + */ | |
| 250 | + obterDados: function(){ | |
| 251 | + if(i3GEOF.graficointerativo.aguarde.visibility === "visible") | |
| 252 | + {return;} | |
| 253 | + | |
| 254 | + var tema = $i("i3GEOgraficointerativoComboTemasId").value, | |
| 255 | + x = $i("i3GEOgraficointerativoComboXid").value, | |
| 256 | + y = $i("i3GEOgraficointerativoComboYid").value, | |
| 257 | + excluir = $i("i3GEOgraficointerativoexcluir").value, | |
| 258 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoSelecao&tema="+tema+"&itemclasses="+x+"&itemvalores="+y+"&excluir="+excluir, | |
| 259 | + cp = new cpaint(), | |
| 260 | + tipo = "soma", | |
| 261 | + monta; | |
| 262 | + if(x === y) | |
| 263 | + {tipo = "conta";} | |
| 264 | + if(tema === "") | |
| 265 | + {alert("Escolha um tema");return;} | |
| 266 | + if(x === "") | |
| 267 | + {alert("Escolha um item para X");return;} | |
| 268 | + if(y === "") | |
| 269 | + {alert("Escolha um item para Y");return;} | |
| 270 | + monta = function(retorno){ | |
| 271 | + i3GEOF.graficointerativo.aguarde.visibility = "hidden"; | |
| 272 | + var dados = retorno.data.dados, | |
| 273 | + n = dados.length, | |
| 274 | + v, | |
| 275 | + ins = [], | |
| 276 | + i, | |
| 277 | + id; | |
| 278 | + ins.push("<p class=paragrafo >Tabela de dados para o gráfico. Os valores podem ser editados</p><table class=lista4 id=i3GEOgraficointerativotabeladados ><tr><td style=background-color:yellow >nome</td><td style=background-color:yellow >valor</td><td style=background-color:yellow >cor</td></tr>"); | |
| 279 | + for (i=1;i<n; i++){ | |
| 280 | + v = dados[i].split(";"); | |
| 281 | + v[0] = v[0].replace("'",""); | |
| 282 | + v[0] = v[0].replace("'",""); | |
| 283 | + //ins += v[0]+" "+v[1]; | |
| 284 | + id = "i3GEOgraficointerativoDados"+i; //layer+indice da classe | |
| 285 | + ins.push("<tr><td>"); | |
| 286 | + ins.push($inputText("","",id+"_nome","digite o novo nome",20,v[0],"nome")); | |
| 287 | + ins.push("</td><td>"); | |
| 288 | + ins.push($inputText("","",id+"_valor","digite o novo valor",12,v[1],"valor")); | |
| 289 | + ins.push("</td><td>"); | |
| 290 | + ins.push($inputText("","",id+"_cor","r,g,b",12,"250,250,250","cor")); | |
| 291 | + ins.push("</td></tr>"); | |
| 292 | + } | |
| 293 | + ins.push("</table><br>"); | |
| 294 | + $i("i3GEOgraficointerativoDados").innerHTML = ins.join(""); | |
| 295 | + }; | |
| 296 | + i3GEOF.graficointerativo.aguarde.visibility = "visible"; | |
| 297 | + cp.set_response_type("JSON"); | |
| 298 | + cp.call(p+"&tipo="+tipo,"graficoSelecao",monta); | |
| 299 | + }, | |
| 300 | + /* | |
| 301 | + Function: tabela2dados | |
| 302 | + | |
| 303 | + Obtém os dados da tabela para compor o gráfico | |
| 304 | + */ | |
| 305 | + tabela2dados: function(){ | |
| 306 | + var inputs = $i("i3GEOgraficointerativoDados").getElementsByTagName("input"), | |
| 307 | + ninputs = inputs.length, | |
| 308 | + i, | |
| 309 | + parametros, | |
| 310 | + valores = [], | |
| 311 | + nomes = [], | |
| 312 | + cores = [], | |
| 313 | + indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex, | |
| 314 | + titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text, | |
| 315 | + par = []; | |
| 316 | + for(i=0;i<ninputs;i = i + 3){ | |
| 317 | + valores.push(inputs[i+1].value * 1); | |
| 318 | + nomes.push(inputs[i].value+" "); | |
| 319 | + cores.push("#d01f3c"); | |
| 320 | + par.push({"value":inputs[i+1].value * 1,"label":inputs[i].value+" "}); | |
| 321 | + } | |
| 322 | + if(i3GEOF.graficointerativo.tipo === "pizza2d"){ | |
| 323 | + parametros = JSON1.stringify({ | |
| 324 | + "elements":[{ | |
| 325 | + "type": "pie", | |
| 326 | + "start-angle": 180, | |
| 327 | + "colours": cores, | |
| 328 | + "alpha": 0.6, | |
| 329 | + "stroke": 2, | |
| 330 | + "animate": 1, | |
| 331 | + "values" : par, | |
| 332 | + "tip": "#val# de #total#<br>#percent# de 100%", | |
| 333 | + "gradient-fill": true, | |
| 334 | + }], | |
| 335 | + "title":{ | |
| 336 | + "text": titulo, | |
| 337 | + "style": "{font-size: 15px; color:#000000; text-align: center;}" | |
| 338 | + }, | |
| 339 | + "num_decimals": 2, | |
| 340 | + "is_fixed_num_decimals_forced": true, | |
| 341 | + "is_decimal_separator_comma": true, | |
| 342 | + "is_thousand_separator_disabled": true, | |
| 343 | + "x_axis": null | |
| 344 | + }); | |
| 345 | + } | |
| 346 | + return parametros; | |
| 347 | + } | |
| 348 | +}; | |
| 349 | +//pacotes/openflahchart/json2.js | |
| 350 | +if (!this.JSON1) { | |
| 351 | + JSON1 = function () { | |
| 352 | + | |
| 353 | + function f(n) { // Format integers to have at least two digits. | |
| 354 | + return n < 10 ? '0' + n : n; | |
| 355 | + } | |
| 356 | + | |
| 357 | + Date.prototype.toJSON = function () { | |
| 358 | + return this.getUTCFullYear() + '-' + | |
| 359 | + f(this.getUTCMonth() + 1) + '-' + | |
| 360 | + f(this.getUTCDate()) + 'T' + | |
| 361 | + f(this.getUTCHours()) + ':' + | |
| 362 | + f(this.getUTCMinutes()) + ':' + | |
| 363 | + f(this.getUTCSeconds()) + 'Z'; | |
| 364 | + }; | |
| 365 | + var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g, | |
| 366 | + gap, | |
| 367 | + indent, | |
| 368 | + meta = { // table of character substitutions | |
| 369 | + '\b': '\\b', | |
| 370 | + '\t': '\\t', | |
| 371 | + '\n': '\\n', | |
| 372 | + '\f': '\\f', | |
| 373 | + '\r': '\\r', | |
| 374 | + '"' : '\\"', | |
| 375 | + '\\': '\\\\' | |
| 376 | + }, | |
| 377 | + rep; | |
| 378 | + function quote(string) { | |
| 379 | + return escapeable.test(string) ? | |
| 380 | + '"' + string.replace(escapeable, function (a) { | |
| 381 | + var c = meta[a]; | |
| 382 | + if (typeof c === 'string') { | |
| 383 | + return c; | |
| 384 | + } | |
| 385 | + c = a.charCodeAt(); | |
| 386 | + return '\\u00' + Math.floor(c / 16).toString(16) + | |
| 387 | + (c % 16).toString(16); | |
| 388 | + }) + '"' : | |
| 389 | + '"' + string + '"'; | |
| 390 | + } | |
| 391 | + function str(key, holder) { | |
| 392 | + var i, // The loop counter. | |
| 393 | + k, // The member key. | |
| 394 | + v, // The member value. | |
| 395 | + length, | |
| 396 | + mind = gap, | |
| 397 | + partial, | |
| 398 | + value = holder[key]; | |
| 399 | + if (value && typeof value === 'object' && | |
| 400 | + typeof value.toJSON === 'function') { | |
| 401 | + value = value.toJSON(key); | |
| 402 | + } | |
| 403 | + if (typeof rep === 'function') { | |
| 404 | + value = rep.call(holder, key, value); | |
| 405 | + } | |
| 406 | + switch (typeof value) { | |
| 407 | + case 'string': | |
| 408 | + return quote(value); | |
| 409 | + | |
| 410 | + case 'number': | |
| 411 | + return isFinite(value) ? String(value) : 'null'; | |
| 412 | + | |
| 413 | + case 'boolean': | |
| 414 | + case 'null': | |
| 415 | + return String(value); | |
| 416 | + case 'object': | |
| 417 | + if (!value) { | |
| 418 | + return 'null'; | |
| 419 | + } | |
| 420 | + gap += indent; | |
| 421 | + partial = []; | |
| 422 | + if (typeof value.length === 'number' && | |
| 423 | + !(value.propertyIsEnumerable('length'))) { | |
| 424 | + length = value.length; | |
| 425 | + for (i = 0; i < length; i += 1) { | |
| 426 | + partial[i] = str(i, value) || 'null'; | |
| 427 | + } | |
| 428 | + v = partial.length === 0 ? '[]' : | |
| 429 | + gap ? '[\n' + gap + partial.join(',\n' + gap) + | |
| 430 | + '\n' + mind + ']' : | |
| 431 | + '[' + partial.join(',') + ']'; | |
| 432 | + gap = mind; | |
| 433 | + return v; | |
| 434 | + } | |
| 435 | + if (typeof rep === 'object') { | |
| 436 | + length = rep.length; | |
| 437 | + for (i = 0; i < length; i += 1) { | |
| 438 | + k = rep[i]; | |
| 439 | + if (typeof k === 'string') { | |
| 440 | + v = str(k, value, rep); | |
| 441 | + if (v) { | |
| 442 | + partial.push(quote(k) + (gap ? ': ' : ':') + v); | |
| 443 | + } | |
| 444 | + } | |
| 445 | + } | |
| 446 | + } else { | |
| 447 | + for (k in value) { | |
| 448 | + v = str(k, value, rep); | |
| 449 | + if (v) { | |
| 450 | + partial.push(quote(k) + (gap ? ': ' : ':') + v); | |
| 451 | + } | |
| 452 | + } | |
| 453 | + } | |
| 454 | + v = partial.length === 0 ? '{}' : | |
| 455 | + gap ? '{\n' + gap + partial.join(',\n' + gap) + | |
| 456 | + '\n' + mind + '}' : | |
| 457 | + '{' + partial.join(',') + '}'; | |
| 458 | + gap = mind; | |
| 459 | + return v; | |
| 460 | + } | |
| 461 | + } | |
| 462 | + return { | |
| 463 | + stringify: function (value, replacer, space) { | |
| 464 | + var i; | |
| 465 | + gap = ''; | |
| 466 | + indent = ''; | |
| 467 | + if (space) { | |
| 468 | + if (typeof space === 'number') { | |
| 469 | + for (i = 0; i < space; i += 1) { | |
| 470 | + indent += ' '; | |
| 471 | + } | |
| 472 | + } else if (typeof space === 'string') { | |
| 473 | + indent = space; | |
| 474 | + } | |
| 475 | + } | |
| 476 | + if (!replacer) { | |
| 477 | + rep = function (key, value) { | |
| 478 | + if (!Object.hasOwnProperty.call(this, key)) { | |
| 479 | + return undefined; | |
| 480 | + } | |
| 481 | + return value; | |
| 482 | + }; | |
| 483 | + } else if (typeof replacer === 'function' || | |
| 484 | + (typeof replacer === 'object' && | |
| 485 | + typeof replacer.length === 'number')) { | |
| 486 | + rep = replacer; | |
| 487 | + } else { | |
| 488 | + throw new Error('JSON.stringify'); | |
| 489 | + } | |
| 490 | + return str('', {'': value}); | |
| 491 | + }, | |
| 492 | + parse: function (text, reviver) { | |
| 493 | + var j; | |
| 494 | + | |
| 495 | + function walk(holder, key) { | |
| 496 | + var k, v, value = holder[key]; | |
| 497 | + if (value && typeof value === 'object') { | |
| 498 | + for (k in value) { | |
| 499 | + if (Object.hasOwnProperty.call(value, k)) { | |
| 500 | + v = walk(value, k); | |
| 501 | + if (v !== undefined) { | |
| 502 | + value[k] = v; | |
| 503 | + } else { | |
| 504 | + delete value[k]; | |
| 505 | + } | |
| 506 | + } | |
| 507 | + } | |
| 508 | + } | |
| 509 | + return reviver.call(holder, key, value); | |
| 510 | + } | |
| 511 | + if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@'). | |
| 512 | +replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). | |
| 513 | +replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { | |
| 514 | + j = eval('(' + text + ')'); | |
| 515 | + return typeof reviver === 'function' ? | |
| 516 | + walk({'': j}, '') : j; | |
| 517 | + } | |
| 518 | + throw new SyntaxError('JSON.parse'); | |
| 519 | + }, | |
| 520 | + quote: quote | |
| 521 | + }; | |
| 522 | + }(); | |
| 523 | +} | |
| 524 | +/** | |
| 525 | + * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ | |
| 526 | + * | |
| 527 | + * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: | |
| 528 | + * http://www.opensource.org/licenses/mit-license.php | |
| 529 | + * | |
| 530 | + * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for | |
| 531 | + * legal reasons. | |
| 532 | + */ | |
| 533 | +if(typeof deconcept=="undefined"){var deconcept=new Object();} | |
| 534 | +if(typeof deconcept.util=="undefined"){deconcept.util=new Object();} | |
| 535 | +if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();} | |
| 536 | +deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){ | |
| 537 | +if(!document.createElement||!document.getElementById){return;} | |
| 538 | +this.DETECT_KEY=_b?_b:"detectflash"; | |
| 539 | +this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); | |
| 540 | +this.params=new Object(); | |
| 541 | +this.variables=new Object(); | |
| 542 | +this.attributes=new Array(); | |
| 543 | +if(_1){this.setAttribute("swf",_1);} | |
| 544 | +if(id){this.setAttribute("id",id);} | |
| 545 | +if(w){this.setAttribute("width",w);} | |
| 546 | +if(h){this.setAttribute("height",h);} | |
| 547 | +if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));} | |
| 548 | +this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7); | |
| 549 | +if(c){this.addParam("bgcolor",c);} | |
| 550 | +var q=_8?_8:"high"; | |
| 551 | +this.addParam("quality",q); | |
| 552 | +this.setAttribute("useExpressInstall",_7); | |
| 553 | +this.setAttribute("doExpressInstall",false); | |
| 554 | +var _d=(_9)?_9:window.location; | |
| 555 | +this.setAttribute("xiRedirectUrl",_d); | |
| 556 | +this.setAttribute("redirectUrl",""); | |
| 557 | +if(_a){this.setAttribute("redirectUrl",_a);}}; | |
| 558 | +deconcept.SWFObject.prototype={setAttribute:function(_e,_f){ | |
| 559 | +this.attributes[_e]=_f; | |
| 560 | +},getAttribute:function(_10){ | |
| 561 | +return this.attributes[_10]; | |
| 562 | +},addParam:function(_11,_12){ | |
| 563 | +this.params[_11]=_12; | |
| 564 | +},getParams:function(){ | |
| 565 | +return this.params; | |
| 566 | +},addVariable:function(_13,_14){ | |
| 567 | +this.variables[_13]=_14; | |
| 568 | +},getVariable:function(_15){ | |
| 569 | +return this.variables[_15]; | |
| 570 | +},getVariables:function(){ | |
| 571 | +return this.variables; | |
| 572 | +},getVariablePairs:function(){ | |
| 573 | +var _16=new Array(); | |
| 574 | +var key; | |
| 575 | +var _18=this.getVariables(); | |
| 576 | +for(key in _18){ | |
| 577 | +_16.push(key+"="+_18[key]);} | |
| 578 | +return _16; | |
| 579 | +},getSWFHTML:function(){ | |
| 580 | +var _19=""; | |
| 581 | +if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){ | |
| 582 | +if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");} | |
| 583 | +_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\""; | |
| 584 | +_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" "; | |
| 585 | +var _1a=this.getParams(); | |
| 586 | +for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";} | |
| 587 | +var _1c=this.getVariablePairs().join("&"); | |
| 588 | +if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";} | |
| 589 | +_19+="/>"; | |
| 590 | +}else{ | |
| 591 | +if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} | |
| 592 | +_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">"; | |
| 593 | +_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />"; | |
| 594 | +var _1d=this.getParams(); | |
| 595 | +for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";} | |
| 596 | +var _1f=this.getVariablePairs().join("&"); | |
| 597 | +if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";} | |
| 598 | +_19+="</object>";} | |
| 599 | +return _19; | |
| 600 | +},write:function(_20){ | |
| 601 | +if(this.getAttribute("useExpressInstall")){ | |
| 602 | +var _21=new deconcept.PlayerVersion([6,0,65]); | |
| 603 | +if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ | |
| 604 | +this.setAttribute("doExpressInstall",true); | |
| 605 | +this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); | |
| 606 | +document.title=document.title.slice(0,47)+" - Flash Player Installation"; | |
| 607 | +this.addVariable("MMdoctitle",document.title);}} | |
| 608 | +if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ | |
| 609 | +var n=(typeof _20=="string")?document.getElementById(_20):_20; | |
| 610 | +n.innerHTML=this.getSWFHTML(); | |
| 611 | +return true; | |
| 612 | +}else{ | |
| 613 | +if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} | |
| 614 | +return false;}}; | |
| 615 | +deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){ | |
| 616 | +var _25=new deconcept.PlayerVersion([0,0,0]); | |
| 617 | +if(navigator.plugins&&navigator.mimeTypes.length){ | |
| 618 | +var x=navigator.plugins["Shockwave Flash"]; | |
| 619 | +if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} | |
| 620 | +}else{try{ | |
| 621 | +var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); | |
| 622 | +for(var i=3;axo!=null;i++){ | |
| 623 | +axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); | |
| 624 | +_25=new deconcept.PlayerVersion([i,0,0]);}} | |
| 625 | +catch(e){} | |
| 626 | +if(_23&&_25.major>_23.major){return _25;} | |
| 627 | +if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){ | |
| 628 | +try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));} | |
| 629 | +catch(e){}}} | |
| 630 | +return _25;}; | |
| 631 | +deconcept.PlayerVersion=function(_29){ | |
| 632 | +this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0; | |
| 633 | +this.minor=parseInt(_29[1])||0; | |
| 634 | +this.rev=parseInt(_29[2])||0;}; | |
| 635 | +deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ | |
| 636 | +if(this.major<fv.major){return false;} | |
| 637 | +if(this.major>fv.major){return true;} | |
| 638 | +if(this.minor<fv.minor){return false;} | |
| 639 | +if(this.minor>fv.minor){return true;} | |
| 640 | +if(this.rev<fv.rev){return false;}return true;}; | |
| 641 | +deconcept.util={getRequestParameter:function(_2b){ | |
| 642 | +var q=document.location.search||document.location.hash; | |
| 643 | +if(q){ | |
| 644 | +var _2d=q.indexOf(_2b+"="); | |
| 645 | +var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length; | |
| 646 | +if(q.length>1&&_2d>-1){ | |
| 647 | +return q.substring(q.indexOf("=",_2d)+1,_2e); | |
| 648 | +}}return "";}}; | |
| 649 | +if(Array.prototype.push==null){ | |
| 650 | +Array.prototype.push=function(_2f){ | |
| 651 | +this[this.length]=_2f; | |
| 652 | +return this.length;};} | |
| 653 | +var getQueryParamValue=deconcept.util.getRequestParameter; | |
| 654 | +var FlashObject=deconcept.SWFObject; // for backwards compatibility | |
| 655 | +var SWFObject=deconcept.SWFObject; | |
| 656 | + | |
| 657 | + | |
| 658 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | |
| 0 | 659 | \ No newline at end of file | ... | ... |