Commit 567a939bf0626358a011623a1cedc7943d793608
1 parent
7d773bb2
Exists in
master
and in
7 other branches
Correção na geração dos arquivos xml do sistema de administração em servidor Windows
Showing
3 changed files
with
50 additions
and
26 deletions
Show diff stats
admin/php/xml.php
... | ... | @@ -316,8 +316,12 @@ RSS |
316 | 316 | function geraXmlWMSmetaestat($locaplic) |
317 | 317 | { |
318 | 318 | global $esquemaadmin; |
319 | - $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
320 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
319 | + $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
320 | + $c = "/admin/php/xml.php"; | |
321 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
322 | + $c = "\admin\php\xml.php"; | |
323 | + } | |
324 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
321 | 325 | $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"; |
322 | 326 | return geraXmlRSS($locaplic,$sql,"Web services WMS-TIME OGC"); |
323 | 327 | } |
... | ... | @@ -623,7 +627,11 @@ function geraXmlMapas($perfil,$locaplic,$editores) |
623 | 627 | $q = $dbh->query($q); |
624 | 628 | $editor = "nao";//$editor = "nao";//verificaEditores($editores); |
625 | 629 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
626 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
630 | + $c = "/admin/php/xml.php"; | |
631 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
632 | + $c = "\admin\php\xml.php"; | |
633 | + } | |
634 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
627 | 635 | foreach($q as $row) |
628 | 636 | { |
629 | 637 | $mostraMapa = false; |
... | ... | @@ -680,7 +688,11 @@ function geraRSSmapas($locaplic) |
680 | 688 | { |
681 | 689 | global $esquemaadmin; |
682 | 690 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
683 | - $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | |
691 | + $c = "/admin/php/xml.php"; | |
692 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
693 | + $c = "\admin\php\xml.php"; | |
694 | + } | |
695 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace($c,"",__FILE__))); | |
684 | 696 | $descricao = "'<![CDATA[Outros links<br>"; |
685 | 697 | $descricao .= "<a href=$url/mashups/openlayers.php?restauramapa='||id_mapa||'&fundo=e_wsm >Openlayers 1</a><br><br>"; |
686 | 698 | $descricao .= "<a href=$url/mashups/openlayers.php?restauramapa='||id_mapa||'&fundo= >Openlayers 2</a><br><br>"; | ... | ... |
ms_configura.php
... | ... | @@ -416,7 +416,7 @@ Tipo: |
416 | 416 | {array ou string} |
417 | 417 | */ |
418 | 418 | $postgis_mapa = array( |
419 | - "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", | |
419 | + "teste"=>"user=postgres password=postgres dbname=sissgeo host=localhost port=5432 options='-c client_encoding=LATIN1'", | |
420 | 420 | "postgres"=>"user=postgres password=postgres dbname=postgres host=localhost port=5432", |
421 | 421 | "i3geosaude"=>"user=postgres password=postgres dbname=i3geosaude host=localhost port=5432 options='-c client_encoding=LATIN1'" |
422 | 422 | ); | ... | ... |
temas/teste.map
1 | -MAP | |
2 | -SYMBOLSET ../symbols/simbolosv6.sym | |
3 | -FONTSET "../symbols/fontes.txt" | |
4 | -LAYER | |
5 | - NAME "teste" | |
6 | - TEMPLATE "none.htm" | |
7 | - TYPE line | |
8 | - DATA "" | |
9 | - METADATA | |
10 | - TEMA "Teste de localidades" | |
11 | - CLASSE "SIM" | |
12 | - END | |
13 | - CLASS | |
14 | - NAME "" | |
15 | - STYLE | |
16 | - COLOR 0 0 0 | |
17 | - SIZE 12 | |
18 | - END | |
19 | - END | |
20 | -END | |
21 | -END | |
1 | +MAP | |
2 | + FONTSET "../symbols/fontes.txt" | |
3 | + SYMBOLSET "../symbols/simbolosv6.sym" | |
4 | + LAYER | |
5 | + CONNECTION "user=postgres password=postgres dbname=sissgeo host=localhost port=5432 options='-c client_encoding=LATIN7'" | |
6 | + CONNECTIONTYPE POSTGIS | |
7 | + DATA "geom from (select geom,cod_bioma,ds_sintese,ds_bioma,nom_bioma,gid from fisico.biomas) as foo using unique gid using srid=4326" | |
8 | + METADATA | |
9 | + "METAESTAT_ID_MEDIDA_VARIAVEL" "" | |
10 | + "cache" "" | |
11 | + "CLASSE" "SIM" | |
12 | + "METAESTAT_CODIGO_TIPO_REGIAO" "" | |
13 | + "metaestat" "" | |
14 | + "TEMA" "Teste de localidades" | |
15 | + "convcaracter" "" | |
16 | + "cortepixels" "0" | |
17 | + END # METADATA | |
18 | + NAME "teste" | |
19 | + STATUS OFF | |
20 | + TEMPLATE "none.htm" | |
21 | + TYPE POLYGON | |
22 | + UNITS METERS | |
23 | + CLASS | |
24 | + NAME "" | |
25 | + STYLE | |
26 | + COLOR 0 0 0 | |
27 | + SIZE 12 | |
28 | + END # STYLE | |
29 | + END # CLASS | |
30 | + END # LAYER | |
31 | + | |
32 | +END # MAP | |
33 | + | ... | ... |