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