Commit 6e5346051aec9ce7ebd61c83a874a81bfc042ae5

Authored by Edmar Moretti
1 parent f67e7d89

Incluida opção de localização de um lugar.

mobile/adicionatema.php
@@ -55,6 +55,11 @@ input @@ -55,6 +55,11 @@ input
55 cursor:pointer; 55 cursor:pointer;
56 background-color:white; 56 background-color:white;
57 } 57 }
  58 +h1
  59 +{
  60 + font:16pt arial,helvetica,clean,sans-serif;
  61 + color:brown;
  62 +}
58 </style> 63 </style>
59 <body> 64 <body>
60 <form id='f' action='adicionatema.php?' method='get'> 65 <form id='f' action='adicionatema.php?' method='get'>
@@ -70,7 +75,7 @@ if ($tipo == &quot;listatemas&quot;) @@ -70,7 +75,7 @@ if ($tipo == &quot;listatemas&quot;)
70 { 75 {
71 $m = new Menutemas($tmpfname,"","nao"); 76 $m = new Menutemas($tmpfname,"","nao");
72 $r = $m->pegaListaDeTemas($grupo,$subgrupo,""); 77 $r = $m->pegaListaDeTemas($grupo,$subgrupo,"");
73 - echo "Escolha o tema:<br><br>"; 78 + echo "<h1>Escolha o tema:</h1>";
74 foreach($r as $l) 79 foreach($r as $l)
75 { 80 {
76 echo "<input type='radio' onclick='adicionatema(\"".$l["tid"]."\")' />".$l["nome"]."<br>"; 81 echo "<input type='radio' onclick='adicionatema(\"".$l["tid"]."\")' />".$l["nome"]."<br>";
@@ -89,7 +94,7 @@ if ($tipo == &quot;adicionar&quot;) @@ -89,7 +94,7 @@ if ($tipo == &quot;adicionar&quot;)
89 { 94 {
90 $m = new Menutemas($tmpfname,"",$locsistemas); 95 $m = new Menutemas($tmpfname,"",$locsistemas);
91 $r = $m->pegaListaDeGrupos("","nao"); 96 $r = $m->pegaListaDeGrupos("","nao");
92 - echo "Escolha o sub-grupo:<br><br>"; 97 + echo "<h1>Escolha o sub-grupo:</h1>";
93 for($rid=0;$rid<count($r);$rid++) 98 for($rid=0;$rid<count($r);$rid++)
94 { 99 {
95 $g = $r[$rid]; 100 $g = $r[$rid];
mobile/desligar.php
@@ -54,6 +54,11 @@ input @@ -54,6 +54,11 @@ input
54 cursor:pointer; 54 cursor:pointer;
55 background-color:white; 55 background-color:white;
56 } 56 }
  57 +h1
  58 +{
  59 + font:16pt arial,helvetica,clean,sans-serif;
  60 + color:brown;
  61 +}
57 </style> 62 </style>
58 <body> 63 <body>
59 <form id='f' action='desligar.php?' method='get'> 64 <form id='f' action='desligar.php?' method='get'>
@@ -73,7 +78,7 @@ $par = $m-&gt;parametrosTemas(); @@ -73,7 +78,7 @@ $par = $m-&gt;parametrosTemas();
73 $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8"); 78 $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8");
74 $par = explode("'",$par); 79 $par = explode("'",$par);
75 $par = explode(";",$par[1]); 80 $par = explode(";",$par[1]);
76 -echo "Escolha o tema que vc não quer ver no mapa:<br><br>"; 81 +echo "<h1>Escolha o tema que vc não quer ver no mapa:</h1>";
77 $existe = false; 82 $existe = false;
78 foreach($par as $p) 83 foreach($par as $p)
79 { 84 {
mobile/escala.php
@@ -52,6 +52,11 @@ input @@ -52,6 +52,11 @@ input
52 cursor:pointer; 52 cursor:pointer;
53 background-color:white; 53 background-color:white;
54 } 54 }
  55 +h1
  56 +{
  57 + font:16pt arial,helvetica,clean,sans-serif;
  58 + color:brown;
  59 +}
55 </style> 60 </style>
56 <body> 61 <body>
57 <form id='f' action='mobile.php?' method='get'> 62 <form id='f' action='mobile.php?' method='get'>
mobile/index.php
@@ -16,6 +16,11 @@ input @@ -16,6 +16,11 @@ input
16 color:blue; 16 color:blue;
17 cursor:pointer; 17 cursor:pointer;
18 } 18 }
  19 +h1
  20 +{
  21 + font:16pt arial,helvetica,clean,sans-serif;
  22 + color:brown;
  23 +}
19 </style> 24 </style>
20 <body> 25 <body>
21 <img src='../imagens/i3geo1.jpg' /><br> 26 <img src='../imagens/i3geo1.jpg' /><br>
@@ -54,7 +59,6 @@ Free Software Foundation, Inc., no endereço @@ -54,7 +59,6 @@ Free Software Foundation, Inc., no endereço
54 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 59 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
55 60
56 */ 61 */
57 -  
58 include_once("../classesphp/pega_variaveis.php"); 62 include_once("../classesphp/pega_variaveis.php");
59 require_once("../classesphp/funcoes_gerais.php"); 63 require_once("../classesphp/funcoes_gerais.php");
60 include("../classesphp/classe_menutemas.php"); 64 include("../classesphp/classe_menutemas.php");
@@ -62,15 +66,20 @@ include(&quot;../classesphp/carrega_ext.php&quot;); @@ -62,15 +66,20 @@ include(&quot;../classesphp/carrega_ext.php&quot;);
62 include("../ms_configura.php"); 66 include("../ms_configura.php");
63 $m = new Menutemas($tmpfname,""); 67 $m = new Menutemas($tmpfname,"");
64 $mapas = $m->pegaListaDeMapas($locmapas); 68 $mapas = $m->pegaListaDeMapas($locmapas);
  69 +echo "<h1>Escolha um dos mapas:</h1>";
65 foreach($mapas["mapas"] as $obj) 70 foreach($mapas["mapas"] as $obj)
66 { 71 {
67 echo "<input type=radio onclick='ligar(\"".$obj["TEMAS"]."\")' />".$obj["NOME"]."<br><br>"; 72 echo "<input type=radio onclick='ligar(\"".$obj["TEMAS"]."\")' />".$obj["NOME"]."<br><br>";
68 } 73 }
  74 +echo "<h1>ou uma das op&ccedil;&otilde;es:</h1>";
  75 +echo "<input type=radio onclick='localizar()' />Procurar lugar<br><br>";
69 ?> 76 ?>
70 <form id=f action='inicia.php' method='get' > 77 <form id=f action='inicia.php' method='get' >
71 <input id='wmobile' type=hidden name='wmobile' value='' /> 78 <input id='wmobile' type=hidden name='wmobile' value='' />
72 <input id='hmobile' type=hidden name='hmobile' value='' /> 79 <input id='hmobile' type=hidden name='hmobile' value='' />
73 -<input type=hidden id=temasa name=temasa value='' /> 80 +<input type='hidden' id='temasa' name='temasa' value='' />
  81 +<input type='hidden' id='layers' name='layers' value='' />
  82 +<input type='hidden' id='tipo' name='tipo' value='inicia' />
74 </form> 83 </form>
75 <hr> 84 <hr>
76 <p>O i3Geo &eacute; um software livre desenvolvido pelo Minist&eacute;rio do Meio Ambiente. Veja: 85 <p>O i3Geo &eacute; um software livre desenvolvido pelo Minist&eacute;rio do Meio Ambiente. Veja:
@@ -97,5 +106,18 @@ function ligar(temas) @@ -97,5 +106,18 @@ function ligar(temas)
97 document.getElementById('temasa').value = temas; 106 document.getElementById('temasa').value = temas;
98 document.getElementById('f').submit(); 107 document.getElementById('f').submit();
99 } 108 }
  109 +/*
  110 +Function: localizar
  111 +
  112 +Inicia a busca por um lugar
  113 +
  114 +*/
  115 +function localizar(temas)
  116 +{
  117 + document.getElementById('temasa').value = "estadosl";
  118 + document.getElementById('layers').value = "baserasterwms";
  119 + document.getElementById('tipo').value = "localizar";
  120 + document.getElementById('f').submit();
  121 +}
100 </script> 122 </script>
101 </html> 123 </html>
102 \ No newline at end of file 124 \ No newline at end of file
mobile/inicia.php
@@ -32,8 +32,10 @@ Free Software Foundation, Inc., no endereço @@ -32,8 +32,10 @@ Free Software Foundation, Inc., no endereço
32 32
33 include_once("../classesphp/pega_variaveis.php"); 33 include_once("../classesphp/pega_variaveis.php");
34 $caminho = "../"; 34 $caminho = "../";
  35 +if(!isset($layers))
35 $layers = $temasa; 36 $layers = $temasa;
36 $executa = "iniciamobile"; 37 $executa = "iniciamobile";
  38 +if(!isset($tipo)){$tipo = "inicia";}
37 include("../ms_criamapa.php"); 39 include("../ms_criamapa.php");
38 /* 40 /*
39 Function: iniciamobile 41 Function: iniciamobile
@@ -48,11 +50,11 @@ A variável tmpfname é definida no processo de criação do mapa, feito pelo ms_cri @@ -48,11 +50,11 @@ A variável tmpfname é definida no processo de criação do mapa, feito pelo ms_cri
48 */ 50 */
49 function iniciamobile() 51 function iniciamobile()
50 { 52 {
51 - global $wmobile,$hmobile,$tmpfname; 53 + global $wmobile,$hmobile,$tmpfname,$tipo;
52 $mapa = ms_newMapObj($tmpfname); 54 $mapa = ms_newMapObj($tmpfname);
53 $mapa->setsize($wmobile,$hmobile); 55 $mapa->setsize($wmobile,$hmobile);
54 $mapa->save($tmpfname); 56 $mapa->save($tmpfname);
55 - $tipo = "inicia"; 57 + //$tipo = "inicia";
56 include("mobile.php"); 58 include("mobile.php");
57 exit; 59 exit;
58 } 60 }
mobile/legenda.php
@@ -53,6 +53,11 @@ input @@ -53,6 +53,11 @@ input
53 cursor:pointer; 53 cursor:pointer;
54 background-color:white; 54 background-color:white;
55 } 55 }
  56 +h1
  57 +{
  58 + font:16pt arial,helvetica,clean,sans-serif;
  59 + color:brown;
  60 +}
56 </style> 61 </style>
57 <body> 62 <body>
58 <form id='f' action='mobile.php?' method='get'> 63 <form id='f' action='mobile.php?' method='get'>
@@ -65,7 +70,7 @@ input @@ -65,7 +70,7 @@ input
65 $m = new Legenda($tmpfname,$locaplic,"",$template); 70 $m = new Legenda($tmpfname,$locaplic,"",$template);
66 $r = $m->criaLegenda(); 71 $r = $m->criaLegenda();
67 if(!$r){$r = "erro. Legenda nao disponivel";} 72 if(!$r){$r = "erro. Legenda nao disponivel";}
68 -$r = mb_convert_encoding($r,"ISO-8859-1","UTF-8"); 73 +$r = mb_convert_encoding($r["legenda"],"ISO-8859-1","UTF-8");
69 echo $r; 74 echo $r;
70 ?> 75 ?>
71 </body> 76 </body>
mobile/ligar.php
@@ -53,6 +53,11 @@ input @@ -53,6 +53,11 @@ input
53 cursor:pointer; 53 cursor:pointer;
54 background-color:white; 54 background-color:white;
55 } 55 }
  56 +h1
  57 +{
  58 + font:16pt arial,helvetica,clean,sans-serif;
  59 + color:brown;
  60 +}
56 </style> 61 </style>
57 <body> 62 <body>
58 <form id='f' action='ligar.php?' method='get'> 63 <form id='f' action='ligar.php?' method='get'>
@@ -72,7 +77,7 @@ $par = $m-&gt;parametrosTemas(); @@ -72,7 +77,7 @@ $par = $m-&gt;parametrosTemas();
72 $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8"); 77 $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8");
73 $par = explode("'",$par); 78 $par = explode("'",$par);
74 $par = explode(";",$par[1]); 79 $par = explode(";",$par[1]);
75 -echo "Escolha o tema que vc quer ver no mapa:<br><br>"; 80 +echo "<h1>Escolha o tema que vc quer ver no mapa:</h1>";
76 $existe = false; 81 $existe = false;
77 foreach($par as $p) 82 foreach($par as $p)
78 { 83 {
mobile/localizar.php
@@ -59,6 +59,11 @@ input @@ -59,6 +59,11 @@ input
59 cursor:pointer; 59 cursor:pointer;
60 background-color:white; 60 background-color:white;
61 } 61 }
  62 +h1
  63 +{
  64 + font:16pt arial,helvetica,clean,sans-serif;
  65 + color:brown;
  66 +}
62 </style> 67 </style>
63 <body> 68 <body>
64 <input type='button' value='retorna' style='cursor:pointer;' onclick='retorno()' /><br><br> 69 <input type='button' value='retorna' style='cursor:pointer;' onclick='retorno()' /><br><br>
@@ -81,7 +86,7 @@ if ($tipo == &#39;executa&#39;) @@ -81,7 +86,7 @@ if ($tipo == &#39;executa&#39;)
81 foreach($r["geonames"] as $linha) 86 foreach($r["geonames"] as $linha)
82 { 87 {
83 $lugares = $linha["lugares"]; 88 $lugares = $linha["lugares"];
84 - echo $linha["tema"]."<br>"; 89 + echo "<h1>".$linha["tema"]."</h1>";
85 $layer = $linha["layer"]; 90 $layer = $linha["layer"];
86 foreach ($lugares as $lugar) 91 foreach ($lugares as $lugar)
87 { 92 {
mobile/mobile.php
@@ -107,6 +107,11 @@ if ($tipo==&quot;oeste&quot;) @@ -107,6 +107,11 @@ if ($tipo==&quot;oeste&quot;)
107 $m->pan($x,$y,"",""); 107 $m->pan($x,$y,"","");
108 $m->salva(); 108 $m->salva();
109 } 109 }
  110 +if ($tipo=="localizar")
  111 +{
  112 + include("localizar.php");
  113 + exit;
  114 +}
110 $mapa = ms_newMapObj($tmpfname); 115 $mapa = ms_newMapObj($tmpfname);
111 $w = $mapa->width; 116 $w = $mapa->width;
112 $h = $mapa->height; 117 $h = $mapa->height;
@@ -129,6 +134,7 @@ else @@ -129,6 +134,7 @@ else
129 <input type='button' value='L' onclick='leste()' /> 134 <input type='button' value='L' onclick='leste()' />
130 <select id='op' name='op' onchange='op(this.value)'> 135 <select id='op' name='op' onchange='op(this.value)'>
131 <option value=''>Op&ccedil;&otilde;es</option> 136 <option value=''>Op&ccedil;&otilde;es</option>
  137 + <option value='reiniciar'>reiniciar</option>
132 <option value='ligar'>ligar</option> 138 <option value='ligar'>ligar</option>
133 <option value='desligar'>desligar</option> 139 <option value='desligar'>desligar</option>
134 <option value='legenda'>legenda</option> 140 <option value='legenda'>legenda</option>
@@ -192,6 +198,8 @@ function op(valor) @@ -192,6 +198,8 @@ function op(valor)
192 {document.getElementById('f').action = "localizar.php?"} 198 {document.getElementById('f').action = "localizar.php?"}
193 if (valor=="adicionar") 199 if (valor=="adicionar")
194 {document.getElementById('f').action = "adicionatema.php?"} 200 {document.getElementById('f').action = "adicionatema.php?"}
  201 + if (valor=="reiniciar")
  202 + {document.getElementById('f').action = "index.php?"}
195 document.getElementById('f').submit(); 203 document.getElementById('f').submit();
196 } 204 }
197 </script> 205 </script>