Commit 835d1872893fb53bace6466bbfb72175554b2570

Authored by Edmar Moretti
1 parent 822b8009

Correção no testamapfile que não estava fazendo o teste da tabela de atributos

Showing 2 changed files with 11 additions and 8 deletions   Show diff stats
temas/gridg.map 100644 → 100755
testamapfile.php
@@ -64,7 +64,6 @@ if(isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false){ @@ -64,7 +64,6 @@ if(isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false){
64 exit (); 64 exit ();
65 } 65 }
66 include("classesphp/funcoes_gerais.php"); 66 include("classesphp/funcoes_gerais.php");
67 -  
68 //$i3geoPermiteLoginIp vem de ms_configura.php 67 //$i3geoPermiteLoginIp vem de ms_configura.php
69 if(isset($i3geoPermiteLoginIp)){ 68 if(isset($i3geoPermiteLoginIp)){
70 checaLoginIp($i3geoPermiteLoginIp); 69 checaLoginIp($i3geoPermiteLoginIp);
@@ -96,8 +95,6 @@ if ($tipo == "") @@ -96,8 +95,6 @@ if ($tipo == "")
96 echo '<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">'; 95 echo '<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">';
97 echo '<script src="classesjs/i3geo.js"></script>'; 96 echo '<script src="classesjs/i3geo.js"></script>';
98 } 97 }
99 -$arqs = listaArquivos("temas");  
100 -sort($arqs["arquivos"]);  
101 98
102 if ($tipo == "") 99 if ($tipo == "")
103 { 100 {
@@ -111,7 +108,7 @@ if ($tipo == &quot;&quot;) @@ -111,7 +108,7 @@ if ($tipo == &quot;&quot;)
111 echo '</head>'; 108 echo '</head>';
112 echo '<body class=" yui-skin-sam" style="background: white;"><center>'; 109 echo '<body class=" yui-skin-sam" style="background: white;"><center>';
113 echo '<div class="bordaSuperior" >&nbsp;</div>'; 110 echo '<div class="bordaSuperior" >&nbsp;</div>';
114 - echo '<div class="mascaraPrincipal" id="divGeral" style=display:none; >'; 111 + echo '<div class="mascaraPrincipal" id="divGeral" style=display:block; >';
115 echo '<div id=cabecalhoPrincipal></div>'; 112 echo '<div id=cabecalhoPrincipal></div>';
116 echo '<h1 style="background-color: white; color: black;" >Administra&ccedil;&atilde;o do i3geo - teste de mapfiles </h1>'; 113 echo '<h1 style="background-color: white; color: black;" >Administra&ccedil;&atilde;o do i3geo - teste de mapfiles </h1>';
117 echo '<form action="testamapfile.php" method="post" id=f >'; 114 echo '<form action="testamapfile.php" method="post" id=f >';
@@ -133,8 +130,12 @@ $map = $_GET[&quot;map&quot;]; @@ -133,8 +130,12 @@ $map = $_GET[&quot;map&quot;];
133 130
134 if (isset($map) && $map != "") 131 if (isset($map) && $map != "")
135 { 132 {
136 - if(!isset($solegenda) || $solegenda == ""){$solegenda = "nao";} 133 + if(!isset($solegenda) || $solegenda == ""){
  134 + $solegenda = "nao";
  135 + }
137 if ($map == "todos"){ 136 if ($map == "todos"){
  137 + $arqs = listaArquivos("temas",true,array("map"));
  138 + sort($arqs["arquivos"]);
138 $tipo = "todos"; 139 $tipo = "todos";
139 $conta = 0; 140 $conta = 0;
140 echo "<br>N&uacute;mero de mapas = ".(count($arqs["arquivos"]))." Faltam= ".(count($arqs["arquivos"])-$iniciar-10)."<br>"; 141 echo "<br>N&uacute;mero de mapas = ".(count($arqs["arquivos"]))." Faltam= ".(count($arqs["arquivos"])-$iniciar-10)."<br>";
@@ -349,12 +350,14 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){ @@ -349,12 +350,14 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){
349 //pega simbolos locais e aplica no novo mapa 350 //pega simbolos locais e aplica no novo mapa
350 cloneInlineSymbol($layern,$nmapa,$mapa); 351 cloneInlineSymbol($layern,$nmapa,$mapa);
351 ms_newLayerObj($mapa, $layern); 352 ms_newLayerObj($mapa, $layern);
  353 + /*
352 if ($layern->data == ""){ 354 if ($layern->data == ""){
353 $dados = $layern->connection; 355 $dados = $layern->connection;
354 } 356 }
355 else{ 357 else{
356 $dados = $layern->data; 358 $dados = $layern->data;
357 } 359 }
  360 + */
358 $pegarext = $layern->name; 361 $pegarext = $layern->name;
359 } 362 }
360 zoomTema($pegarext,$mapa); 363 zoomTema($pegarext,$mapa);
@@ -397,10 +400,10 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){ @@ -397,10 +400,10 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){
397 400
398 $mapa->save($destino); 401 $mapa->save($destino);
399 validaAcessoTemas($destino,true); 402 validaAcessoTemas($destino,true);
400 -  
401 //testa a tabela de atributos 403 //testa a tabela de atributos
402 - if(isset($tabela)){ 404 + if(isset($_GET["tabela"])){
403 include("classesphp/classe_atributos.php"); 405 include("classesphp/classe_atributos.php");
  406 +
404 $t = new Atributos($destino,$map); 407 $t = new Atributos($destino,$map);
405 restauraCon($destino,$postgis_mapa); 408 restauraCon($destino,$postgis_mapa);
406 $r = $t->itensTexto(); 409 $r = $t->itensTexto();
@@ -485,7 +488,7 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){ @@ -485,7 +488,7 @@ function verifica($map,$solegenda,$tabela,$cache=&quot;sim&quot;){
485 {echo "<img src=".$nomer." /><br>";} 488 {echo "<img src=".$nomer." /><br>";}
486 echo "<img src=".$nomerl." />"; 489 echo "<img src=".$nomerl." />";
487 if($tipo == "todos"){ 490 if($tipo == "todos"){
488 - echo "<br>".$dados."<br>"; 491 + //echo "<br>".$dados."<br>";
489 } 492 }
490 if($map != "todos"){ 493 if($map != "todos"){
491 echo "<br><b>Tempo (s): "; 494 echo "<br><b>Tempo (s): ";