Commit 7135ef67bc7e694be4027fdb09fc8620f584a72a
1 parent
f9cac83b
Exists in
master
and in
7 other branches
Criação de programa para geração de RSS contento a lista de temas disponíveis em kml
Showing
3 changed files
with
55 additions
and
0 deletions
Show diff stats
admin/php/xml.php
| @@ -103,6 +103,27 @@ function geraRSStemasDownload($locaplic) | @@ -103,6 +103,27 @@ function geraRSStemasDownload($locaplic) | ||
| 103 | //echo $sql;exit; | 103 | //echo $sql;exit; |
| 104 | return geraXmlRSS($locaplic,$sql,"Temas para download"); | 104 | return geraXmlRSS($locaplic,$sql,"Temas para download"); |
| 105 | } | 105 | } |
| 106 | +function geraRSStemasKml($locaplic) | ||
| 107 | +{ | ||
| 108 | + $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | ||
| 109 | + $url = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].(str_replace("/admin/rsstemasdownload.php","",$_SERVER['PHP_SELF'])); | ||
| 110 | + $sql = "select '".$url."/pacotes/kmlmapserver/kmlservice.php?request=kml&map='||codigo_tema||'&typename='||codigo_tema as link_ws, g.nome_grupo||' -> '||sg.nome_subgrupo||' -> '||nome_tema as nome_ws, desc_tema as desc_ws, link_tema as autor_ws "; | ||
| 111 | + $sql .= " | ||
| 112 | + from i3geoadmin_temas as t,i3geoadmin_n3 as n3, i3geoadmin_n2 as n2, i3geoadmin_n1 as n1, i3geoadmin_grupos as g, i3geoadmin_subgrupos as sg | ||
| 113 | + where | ||
| 114 | + t.id_tema = n3.id_tema | ||
| 115 | + and n3.id_n2 = n2.id_n2 | ||
| 116 | + and n2.id_subgrupo = sg.id_subgrupo | ||
| 117 | + and n2.id_n1 = n1.id_n1 | ||
| 118 | + and n1.id_grupo = g.id_grupo | ||
| 119 | + and (t.kml_tema = 'sim' or t.kml_tema != 'SIM') | ||
| 120 | + and n3.n3_perfil = '' | ||
| 121 | + and n2.n2_perfil = '' | ||
| 122 | + and n1.n1_perfil = '' | ||
| 123 | + "; | ||
| 124 | + //echo $sql;exit; | ||
| 125 | + return geraXmlRSS($locaplic,$sql,"Temas em KML"); | ||
| 126 | +} | ||
| 106 | 127 | ||
| 107 | function geraXmlRSS($locaplic,$sql,$descricao) | 128 | function geraXmlRSS($locaplic,$sql,$descricao) |
| 108 | { | 129 | { |
| @@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
| 1 | +<?php | ||
| 2 | +error_reporting(0); | ||
| 3 | +if(!isset($locaplic)) | ||
| 4 | +{ | ||
| 5 | + $locaplic = ""; | ||
| 6 | + if(file_exists("../../../ms_configura.php")) | ||
| 7 | + {include_once("../../../ms_configura.php");} | ||
| 8 | + else | ||
| 9 | + { | ||
| 10 | + if(file_exists("../../ms_configura.php")) | ||
| 11 | + {include_once("../../ms_configura.php");} | ||
| 12 | + else | ||
| 13 | + { | ||
| 14 | + if(file_exists("../ms_configura.php")) | ||
| 15 | + {include_once("../ms_configura.php");} | ||
| 16 | + else | ||
| 17 | + include_once("ms_configura.php"); | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | +} | ||
| 21 | +include_once($locaplic."/classesphp/pega_variaveis.php"); | ||
| 22 | +include_once($locaplic."/admin/php/xml.php"); | ||
| 23 | +echo header("Content-type: application/xml"); | ||
| 24 | +echo geraRSStemasKml($locaplic); | ||
| 25 | +?> | ||
| 0 | \ No newline at end of file | 26 | \ No newline at end of file |
principal.htm
| @@ -292,6 +292,15 @@ Aplicativos disponíveis com o i3geo e documentação. | @@ -292,6 +292,15 @@ Aplicativos disponíveis com o i3geo e documentação. | ||
| 292 | <tr> | 292 | <tr> |
| 293 | <td></td> | 293 | <td></td> |
| 294 | <td> | 294 | <td> |
| 295 | + <a href="admin/rsstemaskml.php" target="_blank" > | ||
| 296 | + RSS com a lista de dados disponíveis emkml. | ||
| 297 | + </a> | ||
| 298 | + Mostra os temas com kml_tema = 'SIM' no sistema de administração. | ||
| 299 | + </td> | ||
| 300 | +</tr> | ||
| 301 | +<tr> | ||
| 302 | + <td></td> | ||
| 303 | + <td> | ||
| 295 | <a href="admin/rssgrupos.php" target="_blank" >Grupos </a> | 304 | <a href="admin/rssgrupos.php" target="_blank" >Grupos </a> |
| 296 | <a href="admin/rsssubgrupos.php" target="_blank" >Sub-grupos </a> | 305 | <a href="admin/rsssubgrupos.php" target="_blank" >Sub-grupos </a> |
| 297 | <a href="admin/rsstemas.php" target="_blank" >Temas </a> | 306 | <a href="admin/rsstemas.php" target="_blank" >Temas </a> |