Commit 3607c02898a811f4873b142eaf89e8fc234d7830
1 parent
f5c2ca58
Exists in
master
and in
7 other branches
Inclusão de variavel para definicao de proxy no ms_configura.php e uso no plugin…
… de acesso a dados kml
Showing
4 changed files
with
26 additions
and
2 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_eventos.js
... | ... | @@ -379,7 +379,7 @@ i3GEO.eventos = { |
379 | 379 | var teladd,teladms, |
380 | 380 | container = "", |
381 | 381 | targ = "", |
382 | - pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r; | |
382 | + pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex; | |
383 | 383 | if (!e){ |
384 | 384 | e = window.event; |
385 | 385 | } | ... | ... |
classesphp/proxy.php
1 | -<?php | |
1 | +<?php | |
2 | +if(!isset($i3geo_proxy_server)){ | |
3 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
4 | +} | |
2 | 5 | $ch = curl_init(); |
3 | 6 | if(!$ch){ |
4 | 7 | echo "erro curl_init"; |
... | ... | @@ -7,6 +10,9 @@ if(!$ch){ |
7 | 10 | curl_setopt($ch, CURLOPT_URL, $_GET["url"]); |
8 | 11 | curl_setopt($ch, CURLOPT_HEADER, 0); |
9 | 12 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
13 | +if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ | |
14 | + curl_setopt($ch, CURLOPT_PROXY, $i3geo_proxy_server); | |
15 | +} | |
10 | 16 | $resultado = curl_exec($ch); |
11 | 17 | echo $resultado; |
12 | 18 | ?> |
13 | 19 | \ No newline at end of file | ... | ... |
ms_configura.php
... | ... | @@ -562,7 +562,25 @@ Tipo: |
562 | 562 | {string} |
563 | 563 | */ |
564 | 564 | $ogcwsmap = ""; |
565 | +/* | |
566 | + Variable: $i3geo_proxy_server | |
567 | + | |
568 | +String com a definicao do servidor de proxy. | |
569 | + | |
570 | +O programa classesphp/proxy.php utiliza essa variavel para definir o proxy utilizado pela libcurl | |
571 | + | |
572 | +Como no caso: localhost/i3geo/classesphp/proxy.php?url=http://dev.openlayers.org/examples/kml/sundials.kml | |
573 | + | |
574 | +Exemplo: | |
575 | + | |
576 | +$i3geo_proxy_server = 'proxy:80'; | |
577 | + | |
578 | +Tipo: | |
579 | +{string} | |
580 | +*/ | |
581 | +$i3geo_proxy_server = ""; | |
565 | 582 | |
583 | +//valores de variaveis especificas para o sistema operacional em uso | |
566 | 584 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
567 | 585 | { |
568 | 586 | $navegadoresLocais = array( | ... | ... |