Commit d51bcc6c23bf1f1e794539db30608d3d1df55f9c
1 parent
38bc83d6
Exists in
master
and in
7 other branches
$1
Showing
3 changed files
with
67 additions
and
52 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/menu.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <meta http-equiv="Category" | 4 | <meta http-equiv="Category" |
| 5 | content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | 5 | content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> |
| 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| 7 | - | 7 | + |
| 8 | <link rel="stylesheet" type="text/css" href="html/admin.css"> | 8 | <link rel="stylesheet" type="text/css" href="html/admin.css"> |
| 9 | <script type="text/javascript" src="../classesjs/i3geo.js"></script> | 9 | <script type="text/javascript" src="../classesjs/i3geo.js"></script> |
| 10 | <style> | 10 | <style> |
| @@ -12,13 +12,13 @@ | @@ -12,13 +12,13 @@ | ||
| 12 | border: 0 none; | 12 | border: 0 none; |
| 13 | padding: 0 3px 5px 0; | 13 | padding: 0 3px 5px 0; |
| 14 | text-align: left; | 14 | text-align: left; |
| 15 | - } | ||
| 16 | - | 15 | + } |
| 16 | + | ||
| 17 | </style> | 17 | </style> |
| 18 | </head> | 18 | </head> |
| 19 | <body class=" yui-skin-sam" style="background-color:white;text-align:left;"> | 19 | <body class=" yui-skin-sam" style="background-color:white;text-align:left;"> |
| 20 | <div class="bordaSuperior"> </div> | 20 | <div class="bordaSuperior"> </div> |
| 21 | - | 21 | + |
| 22 | <div style="margin-left:10px;" id=arvore ></div> | 22 | <div style="margin-left:10px;" id=arvore ></div> |
| 23 | </body> | 23 | </body> |
| 24 | <script> | 24 | <script> |
| @@ -110,6 +110,11 @@ | @@ -110,6 +110,11 @@ | ||
| 110 | type: "text", | 110 | type: "text", |
| 111 | href: "html/estat_editor.html", | 111 | href: "html/estat_editor.html", |
| 112 | target: "principal" | 112 | target: "principal" |
| 113 | + },{ | ||
| 114 | + label: "Ver xml com a lista de serviços WMS originados do sistema de metadados estatísticos", | ||
| 115 | + type: "text", | ||
| 116 | + href: "xmlmetaestatogc.php", | ||
| 117 | + target: "principal" | ||
| 113 | } | 118 | } |
| 114 | ]},{ | 119 | ]},{ |
| 115 | label: "Enviar arquivo para o servidor", | 120 | label: "Enviar arquivo para o servidor", |
| @@ -147,6 +152,16 @@ | @@ -147,6 +152,16 @@ | ||
| 147 | type: "text", | 152 | type: "text", |
| 148 | href: "html/arvore.html", | 153 | href: "html/arvore.html", |
| 149 | target: "principal" | 154 | target: "principal" |
| 155 | + },{ | ||
| 156 | + label: "Ver RSS com os grupos, subgrupos e temas", | ||
| 157 | + type: "text", | ||
| 158 | + href: "rssgrupos.php", | ||
| 159 | + target: "principal" | ||
| 160 | + },{ | ||
| 161 | + label: "Ver RSS com os comentários sobre os temas", | ||
| 162 | + type: "text", | ||
| 163 | + href: "rsscomentariostemas.php", | ||
| 164 | + target: "principal" | ||
| 150 | } | 165 | } |
| 151 | ]},{ | 166 | ]},{ |
| 152 | label: "Links para mapas", | 167 | label: "Links para mapas", |
| @@ -158,6 +173,11 @@ | @@ -158,6 +173,11 @@ | ||
| 158 | type: "text", | 173 | type: "text", |
| 159 | href: "html/mapas.html", | 174 | href: "html/mapas.html", |
| 160 | target: "principal" | 175 | target: "principal" |
| 176 | + },{ | ||
| 177 | + label: "XML com a lista de mapas", | ||
| 178 | + type: "text", | ||
| 179 | + href: "xmlmapas.php", | ||
| 180 | + target: "principal" | ||
| 161 | } | 181 | } |
| 162 | ]},{ | 182 | ]},{ |
| 163 | label: "Edição dos menus de adição de temas", | 183 | label: "Edição dos menus de adição de temas", |
| @@ -212,6 +232,21 @@ | @@ -212,6 +232,21 @@ | ||
| 212 | type: "text", | 232 | type: "text", |
| 213 | href: "html/webservices.html", | 233 | href: "html/webservices.html", |
| 214 | target: "principal" | 234 | target: "principal" |
| 235 | + },{ | ||
| 236 | + label: "Ver xml com a lista de serviços WS (webservices convencionais)", | ||
| 237 | + type: "text", | ||
| 238 | + href: "xmlservicosws.php", | ||
| 239 | + target: "principal" | ||
| 240 | + },{ | ||
| 241 | + label: "Ver xml com a lista de serviços WMS", | ||
| 242 | + type: "text", | ||
| 243 | + href: "xmlservicoswms.php", | ||
| 244 | + target: "principal" | ||
| 245 | + },{ | ||
| 246 | + label: "Ver xml com a lista de serviços Geo RSS", | ||
| 247 | + type: "text", | ||
| 248 | + href: "xmlgeorss.php", | ||
| 249 | + target: "principal" | ||
| 215 | } | 250 | } |
| 216 | ]},{ | 251 | ]},{ |
| 217 | label: "Sistemas especiais de identificação", | 252 | label: "Sistemas especiais de identificação", |
| @@ -234,6 +269,11 @@ | @@ -234,6 +269,11 @@ | ||
| 234 | type: "text", | 269 | type: "text", |
| 235 | href: "html/sistemas.html", | 270 | href: "html/sistemas.html", |
| 236 | target: "principal" | 271 | target: "principal" |
| 272 | + },{ | ||
| 273 | + label: "Ver xml com a lista de sistemas que adicionam temas especiais", | ||
| 274 | + type: "text", | ||
| 275 | + href: "xmlsistemas.php", | ||
| 276 | + target: "principal" | ||
| 237 | } | 277 | } |
| 238 | ]},{ | 278 | ]},{ |
| 239 | label: "Configuração dos serviços OGC", | 279 | label: "Configuração dos serviços OGC", |
| @@ -277,41 +317,6 @@ | @@ -277,41 +317,6 @@ | ||
| 277 | href: "../geraminiatura.php", | 317 | href: "../geraminiatura.php", |
| 278 | target: "principal" | 318 | target: "principal" |
| 279 | },{ | 319 | },{ |
| 280 | - label: "Ver xml com a lista de serviços Geo RSS", | ||
| 281 | - type: "text", | ||
| 282 | - href: "xmlgeorss.php", | ||
| 283 | - target: "principal" | ||
| 284 | - },{ | ||
| 285 | - label: "Ver xml com a lista de serviços WMS", | ||
| 286 | - type: "text", | ||
| 287 | - href: "xmlservicoswms.php", | ||
| 288 | - target: "principal" | ||
| 289 | - },{ | ||
| 290 | - label: "Ver xml com a lista de serviços WS (webservices convencionais)", | ||
| 291 | - type: "text", | ||
| 292 | - href: "xmlservicosws.php", | ||
| 293 | - target: "principal" | ||
| 294 | - },{ | ||
| 295 | - label: "Ver xml com a lista de serviços WMS originados do sistema de metadados estatísticos", | ||
| 296 | - type: "text", | ||
| 297 | - href: "xmlmetaestatogc.php", | ||
| 298 | - target: "principal" | ||
| 299 | - },{ | ||
| 300 | - label: "Ver xml com a lista de sistemas que adicionam temas especiais", | ||
| 301 | - type: "text", | ||
| 302 | - href: "xmlsistemas.php", | ||
| 303 | - target: "principal" | ||
| 304 | - },{ | ||
| 305 | - label: "Ver RSS com os grupos, subgrupos e temas", | ||
| 306 | - type: "text", | ||
| 307 | - href: "rssgrupos.php", | ||
| 308 | - target: "principal" | ||
| 309 | - },{ | ||
| 310 | - label: "Ver RSS com os comentários sobre os temas", | ||
| 311 | - type: "text", | ||
| 312 | - href: "rsscomentariostemas.php", | ||
| 313 | - target: "principal" | ||
| 314 | - },{ | ||
| 315 | label: "Ver XML para árvorehiperbólica", | 320 | label: "Ver XML para árvorehiperbólica", |
| 316 | type: "text", | 321 | type: "text", |
| 317 | href: "hiperbolica.php", | 322 | href: "hiperbolica.php", |
| @@ -322,4 +327,4 @@ | @@ -322,4 +327,4 @@ | ||
| 322 | tree.render(); | 327 | tree.render(); |
| 323 | </script> | 328 | </script> |
| 324 | </html> | 329 | </html> |
| 325 | - | 330 | + |
admin/php/xml.php
| @@ -299,7 +299,7 @@ function geraXmlWMS($locaplic) | @@ -299,7 +299,7 @@ function geraXmlWMS($locaplic) | ||
| 299 | return geraXmlRSS($locaplic,$sql,"Web services WMS-OGC"); | 299 | return geraXmlRSS($locaplic,$sql,"Web services WMS-OGC"); |
| 300 | } | 300 | } |
| 301 | /* | 301 | /* |
| 302 | - Function: geraXmlWMSmetaestat | 302 | +Function: geraXmlWMSmetaestat |
| 303 | 303 | ||
| 304 | RSS com a lista de WMS das variaveis cadastradas no sistema de metadados estatisticos | 304 | RSS com a lista de WMS das variaveis cadastradas no sistema de metadados estatisticos |
| 305 | 305 | ||
| @@ -619,6 +619,8 @@ function geraXmlMapas($perfil,$locaplic,$editores) | @@ -619,6 +619,8 @@ function geraXmlMapas($perfil,$locaplic,$editores) | ||
| 619 | $q = "select * from ".$esquemaadmin."i3geoadmin_mapas"; | 619 | $q = "select * from ".$esquemaadmin."i3geoadmin_mapas"; |
| 620 | $q = $dbh->query($q); | 620 | $q = $dbh->query($q); |
| 621 | $editor = "nao";//$editor = "nao";//verificaEditores($editores); | 621 | $editor = "nao";//$editor = "nao";//verificaEditores($editores); |
| 622 | + $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | ||
| 623 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST']."/".(basename(str_replace("/admin/php/xml.php","",__FILE__))); | ||
| 622 | foreach($q as $row) | 624 | foreach($q as $row) |
| 623 | { | 625 | { |
| 624 | $mostraMapa = false; | 626 | $mostraMapa = false; |
| @@ -637,15 +639,23 @@ function geraXmlMapas($perfil,$locaplic,$editores) | @@ -637,15 +639,23 @@ function geraXmlMapas($perfil,$locaplic,$editores) | ||
| 637 | if($mostraMapa) | 639 | if($mostraMapa) |
| 638 | { | 640 | { |
| 639 | $xml .= "<MAPA>\n"; | 641 | $xml .= "<MAPA>\n"; |
| 640 | - $xml .= " <PERFIL>".$row["perfil_mapa"]."</PERFIL>\n"; | 642 | + $perfil = $row["perfil_mapa"]; |
| 643 | + $xml .= " <PERFIL>".$perfil."</PERFIL>\n"; | ||
| 641 | $xml .= " <NOME>".xmlTexto_prepara($row["nome_mapa"])."</NOME>\n"; | 644 | $xml .= " <NOME>".xmlTexto_prepara($row["nome_mapa"])."</NOME>\n"; |
| 642 | $xml .= " <DESCRICAO>".xmlTexto_prepara($row["desc_mapa"])."</DESCRICAO>\n"; | 645 | $xml .= " <DESCRICAO>".xmlTexto_prepara($row["desc_mapa"])."</DESCRICAO>\n"; |
| 643 | $xml .= " <IMAGEM>".xmlTexto_prepara($row["imagem_mapa"])."</IMAGEM>\n"; | 646 | $xml .= " <IMAGEM>".xmlTexto_prepara($row["imagem_mapa"])."</IMAGEM>\n"; |
| 644 | $xml .= " <TEMAS>".$row["temas_mapa"]."</TEMAS>\n"; | 647 | $xml .= " <TEMAS>".$row["temas_mapa"]."</TEMAS>\n"; |
| 645 | $xml .= " <LIGADOS>".$row["ligados_mapa"]."</LIGADOS>\n"; | 648 | $xml .= " <LIGADOS>".$row["ligados_mapa"]."</LIGADOS>\n"; |
| 646 | - $xml .= " <EXTENSAO>".$row["ext_mapa"]."</EXTENSAO>\n"; | ||
| 647 | - $xml .= " <OUTROS>".xmlTexto_prepara($row["outros_mapa"])."</OUTROS>\n"; | ||
| 648 | - $xml .= " <LINKDIRETO>".xmlTexto_prepara($row["linkdireto_mapa"])."</LINKDIRETO>\n"; | 649 | + $extensao = $row["ext_mapa"]; |
| 650 | + $xml .= " <EXTENSAO>".$extensao."</EXTENSAO>\n"; | ||
| 651 | + $outros = xmlTexto_prepara($row["outros_mapa"]); | ||
| 652 | + $xml .= " <OUTROS>".$outros."</OUTROS>\n"; | ||
| 653 | + $linkdireto = xmlTexto_prepara($row["linkdireto_mapa"]); | ||
| 654 | + if(empty($linkdireto)){ | ||
| 655 | + $linkdireto = $url."/ms_criamapa.php?mapext=".$extensao."&perfil=".$perfil."&temasa=".$temas."&layers=".$ligados.$row["outros_mapa"]; | ||
| 656 | + $linkdireto = xmlTexto_prepara($linkdireto); | ||
| 657 | + } | ||
| 658 | + $xml .= " <LINKDIRETO>".$linkdireto."</LINKDIRETO>\n"; | ||
| 649 | $xml .= " <PUBLICADO>".$row["publicado_mapa"]."</PUBLICADO>\n"; | 659 | $xml .= " <PUBLICADO>".$row["publicado_mapa"]."</PUBLICADO>\n"; |
| 650 | if($row["mapfile"] != ""){ | 660 | if($row["mapfile"] != ""){ |
| 651 | $xml .= " <CONTEMMAPFILE>sim</CONTEMMAPFILE>\n"; | 661 | $xml .= " <CONTEMMAPFILE>sim</CONTEMMAPFILE>\n"; |
| @@ -861,13 +871,13 @@ function geraXmlSistemas_pegafuncoes($perfil,$xml,$id_sistema,$dbh) | @@ -861,13 +871,13 @@ function geraXmlSistemas_pegafuncoes($perfil,$xml,$id_sistema,$dbh) | ||
| 861 | } | 871 | } |
| 862 | function array_in_array($needle, $haystack) | 872 | function array_in_array($needle, $haystack) |
| 863 | { | 873 | { |
| 864 | - //Make sure $needle is an array for foreach | ||
| 865 | - if(!is_array($needle)) $needle = array($needle); | ||
| 866 | - //For each value in $needle, return TRUE if in $haystack | ||
| 867 | - foreach($needle as $pin) | ||
| 868 | - if(in_array($pin, $haystack)) return TRUE; | ||
| 869 | - //Return FALSE if none of the values from $needle are found in $haystack | ||
| 870 | - return FALSE; | 874 | + //Make sure $needle is an array for foreach |
| 875 | + if(!is_array($needle)) $needle = array($needle); | ||
| 876 | + //For each value in $needle, return TRUE if in $haystack | ||
| 877 | + foreach($needle as $pin) | ||
| 878 | + if(in_array($pin, $haystack)) return TRUE; | ||
| 879 | + //Return FALSE if none of the values from $needle are found in $haystack | ||
| 880 | + return FALSE; | ||
| 871 | } | 881 | } |
| 872 | function xmlTexto_prepara($texto) | 882 | function xmlTexto_prepara($texto) |
| 873 | { | 883 | { |