diff --git a/testamapfile.php b/testamapfile.php index 1f438b1..f20f057 100644 --- a/testamapfile.php +++ b/testamapfile.php @@ -152,12 +152,12 @@ function verifica($map,$solegenda){ if (file_exists('temas/'.$map.'.gvp')) {$tema = 'temas/'.$map.".gvp";} } - if(($tipo == "") || ($tipo == "todos")){ - echo "
"; - } if(!file_exists($tema)){ $tema = $locaplic."/".$tema; } + if(($tipo == "") || ($tipo == "todos")){ + echo "
Testando: $tema"; + } if(!file_exists($tema)){ echo "Arquivo ".$map." não encontrado."; exit; @@ -234,7 +234,16 @@ function verifica($map,$solegenda){ } else{ if(@ms_newMapObj($locaplic."/".$tema)){ - $nmapa = ms_newMapObj($locaplic."/".$tema); + if(!function_exists("validaAcessoTemas")){ + include($locaplic."/classesphp/funcoes_gerais.php"); + } + if(validaAcessoTemas($locaplic."/".$tema,false) == false){ + $nmapa = ms_newMapObj($locaplic."/".$tema); + } + else{ + echo "tema restrito
"; + exit; + } } else{ echo "erro no arquivo $map
"; @@ -250,7 +259,7 @@ function verifica($map,$solegenda){ $numlayers = $nmapa->numlayers; $dados = ""; for ($i=0;$i < $numlayers;$i++){ - $layern = $mapa->getlayer($i); + $layern = $nmapa->getlayer($i); $layern->set("status",MS_DEFAULT); if (!empty($postgis_mapa)){ if ($layern->connectiontype == MS_POSTGIS){ -- libgit2 0.21.2