Commit f48203fc134cfa642d65b86b17db7fa10d28923b
1 parent
d1297596
Exists in
master
Correção na listagem de mapas
Showing
1 changed file
with
18 additions
and
4 deletions
Show diff stats
admin/php/xml.php
... | ... | @@ -314,8 +314,13 @@ RSS |
314 | 314 | function geraXmlWMSmetaestat($locaplic) |
315 | 315 | { |
316 | 316 | global $esquemaadmin; |
317 | - $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
318 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
317 | + $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
318 | + $c = "/admin/php/xml.php"; | |
319 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
320 | + $c = "\admin\php\xml.php"; | |
321 | + } | |
322 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
323 | + | |
319 | 324 | $sql = "select DISTINCT b.id_medida_variavel as id_ws, 'WMSMETAESTAT' as tipo_ws,'".$url."/ogc.php?id_medida_variavel='||b.id_medida_variavel as link_ws,a.nome||' -> '||b.nomemedida as nome_ws,a.descricao as desc_ws, '' as autor_ws from i3geoestat_variavel as a ,i3geoestat_medida_variavel as b WHERE a.codigo_variavel = b.codigo_variavel ORDER BY a.nome"; |
320 | 325 | return geraXmlRSS($locaplic,$sql,"Web services WMS-TIME OGC"); |
321 | 326 | } |
... | ... | @@ -620,7 +625,11 @@ function geraXmlMapas($perfil,$locaplic,$editores) |
620 | 625 | $q = $dbh->query($q); |
621 | 626 | $editor = "nao";//$editor = "nao";//verificaEditores($editores); |
622 | 627 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
623 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
628 | + $c = "/admin/php/xml.php"; | |
629 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
630 | + $c = "\admin\php\xml.php"; | |
631 | + } | |
632 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
624 | 633 | foreach($q as $row) |
625 | 634 | { |
626 | 635 | $mostraMapa = false; |
... | ... | @@ -677,7 +686,12 @@ function geraRSSmapas($locaplic) |
677 | 686 | { |
678 | 687 | global $esquemaadmin; |
679 | 688 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
680 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
689 | + $c = "/admin/php/xml.php"; | |
690 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
691 | + $c = "\admin\php\xml.php"; | |
692 | + } | |
693 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
694 | + | |
681 | 695 | $descricao = "'<![CDATA[Outros links<br>"; |
682 | 696 | $descricao .= "<a href=$url/mashups/openlayers.php?restauramapa='||id_mapa||'&fundo=e_wsm >Openlayers 1</a><br><br>"; |
683 | 697 | $descricao .= "<a href=$url/mashups/openlayers.php?restauramapa='||id_mapa||'&fundo= >Openlayers 2</a><br><br>"; | ... | ... |