Commit 722c5220c6853b139c211c02a997218f6707ded3
1 parent
f2262db5
Exists in
master
and in
7 other branches
Incluido o parametro locaplic na construção das classes, possibilitando o includ…
…e em diretórios diferentes.
Showing
12 changed files
with
111 additions
and
23 deletions
Show diff stats
classesphp/atlas_controle.php
| ... | ... | @@ -54,15 +54,13 @@ File: i3geo/classesphp/atlas_controle.php |
| 54 | 54 | error_reporting(0); |
| 55 | 55 | $tempo = microtime(1); |
| 56 | 56 | // |
| 57 | -//pega as variaveis passadas com get ou post | |
| 57 | +// quando as funções abaixo forem utilizadas, é necessário definir $map_file para que o programa continue. | |
| 58 | 58 | // |
| 59 | -include_once("pega_variaveis.php"); | |
| 60 | 59 | // |
| 61 | -// quando as funções abaixo forem utilizadas, é necessário definir $map_file para que o programa continue. | |
| 60 | +//pega as variaveis passadas com get ou post | |
| 62 | 61 | // |
| 63 | -if (($funcao == "pegaListaDeAtlas") || ($funcao == "criaAtlas")) | |
| 64 | -{$map_file = "";} | |
| 65 | -if (isset ($g_sid)) | |
| 62 | +include_once("pega_variaveis.php"); | |
| 63 | +if(isset($g_sid)) | |
| 66 | 64 | { |
| 67 | 65 | session_name("i3GeoPHP"); |
| 68 | 66 | session_id($g_sid); |
| ... | ... | @@ -72,6 +70,9 @@ if (isset ($g_sid)) |
| 72 | 70 | eval("\$".$k."='".$_SESSION[$k]."';"); |
| 73 | 71 | } |
| 74 | 72 | } |
| 73 | +if (($funcao == "pegaListaDeAtlas") || ($funcao == "criaAtlas")) | |
| 74 | +{$map_file = "";} | |
| 75 | + | |
| 75 | 76 | if (!isset($atlasxml)) |
| 76 | 77 | { |
| 77 | 78 | include_once("../ms_configura.php"); |
| ... | ... | @@ -81,8 +82,9 @@ if (!isset($atlasxml)) |
| 81 | 82 | //ativa o php mapscript e as extensões necessárias |
| 82 | 83 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 83 | 84 | // |
| 84 | -include_once ("carrega_ext.php"); | |
| 85 | +include_once("carrega_ext.php"); | |
| 85 | 86 | require_once("../pacotes/cpaint/cpaint2.inc.php"); |
| 87 | + | |
| 86 | 88 | // |
| 87 | 89 | //cria objeto cpaint para uso com ajax |
| 88 | 90 | // | ... | ... |
classesphp/classe_alteraclasse.php
| ... | ... | @@ -71,10 +71,14 @@ $map_file - Endereço do mapfile no servidor. |
| 71 | 71 | |
| 72 | 72 | $tema - nome do tema |
| 73 | 73 | */ |
| 74 | - function __construct($map_file,$tema="") | |
| 74 | + function __construct($map_file,$tema="",$locaplic="") | |
| 75 | 75 | { |
| 76 | 76 | //error_reporting(E_ALL); |
| 77 | + if (file_exists($locaplic."/funcoes_gerais.php")) | |
| 78 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 79 | + else | |
| 77 | 80 | require_once("funcoes_gerais.php"); |
| 81 | + $this->locaplic = $locaplic; | |
| 78 | 82 | $this->mapa = ms_newMapObj($map_file); |
| 79 | 83 | $this->arquivo = $map_file; |
| 80 | 84 | $this->layer = $this->mapa->getlayerbyname($tema); |
| ... | ... | @@ -249,7 +253,10 @@ Include: |
| 249 | 253 | $valores = pegaValores($this->mapa,$this->layer,$item,true,$ignorar); |
| 250 | 254 | if (count($valores) > 0) |
| 251 | 255 | { |
| 252 | - require_once("classe_estatistica.php"); | |
| 256 | + if(file_exists($this->locaplic."/classe_estatistica.php")) | |
| 257 | + require_once($this->locaplic."/classe_estatistica.php"); | |
| 258 | + else | |
| 259 | + require_once("classe_estatistica.php"); | |
| 253 | 260 | $estat = new estatistica(); |
| 254 | 261 | $estat->calcula($valores); |
| 255 | 262 | $calc = $estat->resultado; |
| ... | ... | @@ -372,6 +379,9 @@ Include: |
| 372 | 379 | */ |
| 373 | 380 | function alteraCoresClasses($cori,$corf) |
| 374 | 381 | { |
| 382 | + if(file_exists($this->locaplic."/class.palette.php")) | |
| 383 | + include($this->locaplic."/class.palette.php"); | |
| 384 | + else | |
| 375 | 385 | include("class.palette.php"); |
| 376 | 386 | $cori = RGB2hex(explode(",",$cori)); |
| 377 | 387 | $corf = RGB2hex(explode(",",$corf)); | ... | ... |
classesphp/classe_analise.php
| ... | ... | @@ -75,10 +75,14 @@ $map_file - Endereço do mapfile no servidor. |
| 75 | 75 | |
| 76 | 76 | $tema - Nome do tema que será processado |
| 77 | 77 | */ |
| 78 | - function __construct($map_file,$tema="") | |
| 78 | + function __construct($map_file,$tema="",$locaplic) | |
| 79 | 79 | { |
| 80 | 80 | //error_reporting(E_ALL); |
| 81 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
| 82 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 83 | + else | |
| 81 | 84 | require_once("funcoes_gerais.php"); |
| 85 | + $thhis->locaplic = $locaplic; | |
| 82 | 86 | $this->mapa = ms_newMapObj($map_file); |
| 83 | 87 | $this->arquivo = $map_file; |
| 84 | 88 | if($tema != "") |
| ... | ... | @@ -616,6 +620,9 @@ $locaplic - diretório da aplicação i3geo |
| 616 | 620 | { |
| 617 | 621 | if (file_exists($nomearq)) |
| 618 | 622 | { |
| 623 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 624 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 625 | + else | |
| 619 | 626 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 620 | 627 | //define o nome do novo shapefile que será criado |
| 621 | 628 | $nomefinal = nomeRandomico(); |
| ... | ... | @@ -700,6 +707,9 @@ $locaplic - diretório da aplicação i3geo |
| 700 | 707 | { |
| 701 | 708 | if (file_exists($nomearq)) |
| 702 | 709 | { |
| 710 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 711 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 712 | + else | |
| 703 | 713 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 704 | 714 | // |
| 705 | 715 | //define os nomes dos novos shapefiles que serão criados |
| ... | ... | @@ -858,6 +868,9 @@ $locaplic - Localização do I3geo. |
| 858 | 868 | */ |
| 859 | 869 | function pontoEmPoligono($temaPt,$temasPo,$locaplic) |
| 860 | 870 | { |
| 871 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 872 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 873 | + else | |
| 861 | 874 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 862 | 875 | $layerPt = $this->mapa->getlayerbyname($temaPt); |
| 863 | 876 | $layerPt->set("template","none.htm"); |
| ... | ... | @@ -1000,6 +1013,9 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig |
| 1000 | 1013 | { |
| 1001 | 1014 | //error_reporting(E_ALL); |
| 1002 | 1015 | //para manipular dbf |
| 1016 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1017 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1018 | + else | |
| 1003 | 1019 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1004 | 1020 | //define o nome do novo shapefile que será criado |
| 1005 | 1021 | $nomefinal = nomeRandomico(); |
| ... | ... | @@ -1121,8 +1137,10 @@ nome do layer criado com o buffer. |
| 1121 | 1137 | function criaBuffer($distancia,$locaplic) |
| 1122 | 1138 | { |
| 1123 | 1139 | //para manipular dbf |
| 1140 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1141 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1142 | + else | |
| 1124 | 1143 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1125 | - //define o nome do novo shapefile que será criado | |
| 1126 | 1144 | $nomebuffer = nomeRandomico(); |
| 1127 | 1145 | $nomeshp = $this->diretorio."/".$nomebuffer; |
| 1128 | 1146 | //pega os shapes selecionados |
| ... | ... | @@ -1216,8 +1234,10 @@ $locaplic - Localização do I3geo. |
| 1216 | 1234 | function criaCentroide($locaplic) |
| 1217 | 1235 | { |
| 1218 | 1236 | //para manipular dbf |
| 1237 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1238 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1239 | + else | |
| 1219 | 1240 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1220 | - //define o nome do novo shapefile que será criado | |
| 1221 | 1241 | $nomeCentroides = nomeRandomico(); |
| 1222 | 1242 | $nomeshp = $this->diretorio."/".$nomeCentroides; |
| 1223 | 1243 | //pega os shapes selecionados |
| ... | ... | @@ -1304,8 +1324,10 @@ $npty - Número de pontos em Y (opcional) |
| 1304 | 1324 | function gradeDePontos($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty) |
| 1305 | 1325 | { |
| 1306 | 1326 | //para manipular dbf |
| 1327 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1328 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1329 | + else | |
| 1307 | 1330 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1308 | - //define o nome do novo shapefile que será criado | |
| 1309 | 1331 | $nomegrade = nomeRandomico(); |
| 1310 | 1332 | $nomeshp = $this->diretorio."/".$nomegrade; |
| 1311 | 1333 | $this->mapa->preparequery(); |
| ... | ... | @@ -1413,6 +1435,9 @@ $npty - Número de pontos em Y (opcional) |
| 1413 | 1435 | function gradeDePol($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty) |
| 1414 | 1436 | { |
| 1415 | 1437 | //para manipular dbf |
| 1438 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1439 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1440 | + else | |
| 1416 | 1441 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1417 | 1442 | $nomegrade = nomeRandomico(); |
| 1418 | 1443 | $nomeshp = $this->diretorio."/".$nomegrade; |
| ... | ... | @@ -1547,6 +1572,9 @@ $npty - Número de pontos em Y (opcional) |
| 1547 | 1572 | function gradeDeHex($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty) |
| 1548 | 1573 | { |
| 1549 | 1574 | //para manipular dbf |
| 1575 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1576 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1577 | + else | |
| 1550 | 1578 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1551 | 1579 | $nomegrade = nomeRandomico(); |
| 1552 | 1580 | $nomeshp = $this->diretorio."/".$nomegrade; |
| ... | ... | @@ -1684,6 +1712,9 @@ $locaplic - Localização do I3geo |
| 1684 | 1712 | function nptPol($temaPt,$temaPo,$locaplic) |
| 1685 | 1713 | { |
| 1686 | 1714 | //para manipular dbf |
| 1715 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1716 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1717 | + else | |
| 1687 | 1718 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1688 | 1719 | $layerPt = $this->mapa->getlayerbyname($temaPt); |
| 1689 | 1720 | $layerPt->set("template","none.htm"); |
| ... | ... | @@ -1957,6 +1988,9 @@ $operacao - Tipo de análise. |
| 1957 | 1988 | if ($tiposhape == 0){$tiposhapefile = MS_SHP_MULTIPOINT;} |
| 1958 | 1989 | if ($tiposhape == 1){$tiposhapefile = MS_SHP_ARC;} |
| 1959 | 1990 | //cria o shapefile |
| 1991 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1992 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1993 | + else | |
| 1960 | 1994 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1961 | 1995 | $diretorio = dirname($this->arquivo); |
| 1962 | 1996 | $novonomelayer = nomeRandomico(); | ... | ... |
classesphp/classe_atributos.php
| ... | ... | @@ -71,9 +71,10 @@ $map_file - Endereço do mapfile no servidor. |
| 71 | 71 | |
| 72 | 72 | $tema - nome do tema |
| 73 | 73 | */ |
| 74 | - function __construct($map_file,$tema="") | |
| 74 | + function __construct($map_file,$tema="",$locaplic) | |
| 75 | 75 | { |
| 76 | 76 | //error_reporting(E_ALL); |
| 77 | + $this->locaplic = $locaplic; | |
| 77 | 78 | $this->mapa = ms_newMapObj($map_file); |
| 78 | 79 | $this->arquivo = $map_file; |
| 79 | 80 | if($tema != "") |
| ... | ... | @@ -505,6 +506,9 @@ Include: |
| 505 | 506 | if (count($valoresn) == 0) |
| 506 | 507 | {return("erro. Nenhum valor valido");} |
| 507 | 508 | //faz os calculos |
| 509 | + if(file_exists($this->locaplic."/classe_estatistica.php")) | |
| 510 | + require_once($this->locaplic."/classe_estatistica.php"); | |
| 511 | + else | |
| 508 | 512 | require_once("classe_estatistica.php"); |
| 509 | 513 | $estat = new estatistica(); |
| 510 | 514 | $resultado = $estat->calcula($valoresn); | ... | ... |
classesphp/classe_legenda.php
| ... | ... | @@ -109,6 +109,9 @@ $template - nome do template para processar a legenda |
| 109 | 109 | function __construct($map_file,$locaplic,$tema="",$template="") |
| 110 | 110 | { |
| 111 | 111 | //error_reporting(E_ALL); |
| 112 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
| 113 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 114 | + else | |
| 112 | 115 | require_once("funcoes_gerais.php"); |
| 113 | 116 | $this->mapa = ms_newMapObj($map_file); |
| 114 | 117 | $this->arquivo = $map_file; | ... | ... |
classesphp/classe_mapa.php
| ... | ... | @@ -61,10 +61,14 @@ parameters: |
| 61 | 61 | |
| 62 | 62 | $map_file - Endereço do mapfile no servidor. |
| 63 | 63 | */ |
| 64 | - function __construct($map_file) | |
| 64 | + function __construct($map_file,$locaplic="") | |
| 65 | 65 | { |
| 66 | 66 | //error_reporting(E_ALL); |
| 67 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
| 68 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 69 | + else | |
| 67 | 70 | require_once("funcoes_gerais.php"); |
| 71 | + $this->locaplic = $locaplic; | |
| 68 | 72 | $this->mapa = ms_newMapObj($map_file); |
| 69 | 73 | $this->arquivo = $map_file; |
| 70 | 74 | for ($i=0;$i < ($this->mapa->numlayers);$i++) |
| ... | ... | @@ -139,7 +143,7 @@ string - javascript com os parametros |
| 139 | 143 | //verifica se o tema pode receber a operação de zoom para o tema |
| 140 | 144 | // |
| 141 | 145 | $zoomtema = "sim"; |
| 142 | - if (($ct != 1) && ($oLayer->getmetadata("extencao") == "")) | |
| 146 | + if (($ct != 1) && ($oLayer->getmetadata("extensao") == "")) | |
| 143 | 147 | {$zoomtema = "nao";} |
| 144 | 148 | // |
| 145 | 149 | //verifica se existe restrição de escala |
| ... | ... | @@ -179,7 +183,10 @@ Include: |
| 179 | 183 | */ |
| 180 | 184 | function redesenhaCorpo($locsistemas,$locidentifica,$tipoimagem,$utilizacgi,$locmapserv) |
| 181 | 185 | { |
| 182 | - require_once("classe_imagem.php"); | |
| 186 | + if(file_exists($this->locaplic."/classe_imagem.php")) | |
| 187 | + require_once($this->locaplic."/classe_imagem.php"); | |
| 188 | + else | |
| 189 | + require_once("classe_imagem.php"); | |
| 183 | 190 | $nomer = ""; |
| 184 | 191 | $qy = file_exists(($this->arquivo)."qy"); |
| 185 | 192 | $legenda = $this->mapa->legend; |
| ... | ... | @@ -878,6 +885,9 @@ Include: |
| 878 | 885 | */ |
| 879 | 886 | function adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld,$formatosinfo="text/plain") |
| 880 | 887 | { |
| 888 | + if(file_exists($this->locaplic."/wmswfs.php")) | |
| 889 | + require_once($this->locaplic."/wmswfs.php"); | |
| 890 | + else | |
| 881 | 891 | require_once("wmswfs.php"); |
| 882 | 892 | //limpa selecao |
| 883 | 893 | if (file_exists(($this->arquivo)."qy")) |
| ... | ... | @@ -1093,7 +1103,10 @@ $canal - Identificador do canal (ordem em que está no RSS) |
| 1093 | 1103 | if (count($resultado) > 0) |
| 1094 | 1104 | { |
| 1095 | 1105 | //para manipular dbf |
| 1096 | - require_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1106 | + if (file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1107 | + require_once ($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1108 | + else | |
| 1109 | + require_once ("../pacotes/phpxbase/api_conversion.php"); | |
| 1097 | 1110 | $diretorio = dirname($this->arquivo); |
| 1098 | 1111 | $tipol = MS_SHP_POLYGON; |
| 1099 | 1112 | if ($tipog != "envelope"){$tipol = MS_SHP_POINT;} | ... | ... |
classesphp/classe_navegacao.php
| ... | ... | @@ -56,9 +56,12 @@ Cria um objeto avegacao |
| 56 | 56 | parameters: |
| 57 | 57 | $map_file - string $map_file Endereço do mapfile no servidor. |
| 58 | 58 | */ |
| 59 | - function __construct($map_file) | |
| 59 | + function __construct($map_file,$locaplic="") | |
| 60 | 60 | { |
| 61 | 61 | //error_reporting(E_ALL); |
| 62 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
| 63 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 64 | + else | |
| 62 | 65 | require_once("funcoes_gerais.php"); |
| 63 | 66 | $this->mapa = ms_newMapObj($map_file); |
| 64 | 67 | $this->arquivo = $map_file; | ... | ... |
classesphp/classe_shp.php
| ... | ... | @@ -68,9 +68,10 @@ $map_file - Endereço do mapfile no servidor. |
| 68 | 68 | |
| 69 | 69 | $tema - nome do tema |
| 70 | 70 | */ |
| 71 | - function __construct($map_file,$tema="") | |
| 71 | + function __construct($map_file,$tema="",$locaplic="") | |
| 72 | 72 | { |
| 73 | 73 | //error_reporting(E_ALL); |
| 74 | + $this->locaplic = $locaplic; | |
| 74 | 75 | $this->mapa = ms_newMapObj($map_file); |
| 75 | 76 | $this->arquivo = $map_file; |
| 76 | 77 | $this->tema = $tema; |
| ... | ... | @@ -100,6 +101,9 @@ Nome do tema criado. |
| 100 | 101 | */ |
| 101 | 102 | function criaSHPvazio() |
| 102 | 103 | { |
| 104 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 105 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 106 | + else | |
| 103 | 107 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 104 | 108 | $diretorio = dirname($this->arquivo); |
| 105 | 109 | $tipol = MS_SHP_POINT; |
| ... | ... | @@ -140,6 +144,9 @@ $projecao - código epsg da projeção das coordenadas |
| 140 | 144 | */ |
| 141 | 145 | function insereSHP($xy,$projecao) |
| 142 | 146 | { |
| 147 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 148 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 149 | + else | |
| 143 | 150 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 144 | 151 | $xy = explode(" ",$xy); |
| 145 | 152 | $data = $this->layer->data; |
| ... | ... | @@ -295,6 +302,9 @@ $para - linha|poligono |
| 295 | 302 | function shpPT2shp($locaplic,$para) |
| 296 | 303 | { |
| 297 | 304 | //para manipular dbf |
| 305 | + if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 306 | + require_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 307 | + else | |
| 298 | 308 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 299 | 309 | $this->layer->set("template","none.htm"); |
| 300 | 310 | $diretorio = dirname($this->arquivo); | ... | ... |
classesphp/classe_temas.php
| ... | ... | @@ -343,7 +343,7 @@ Calcula a extensão geográfica de um tema e ajusta o mapa para essa extensão. |
| 343 | 343 | $prjMapa = $this->mapa->getProjection(); |
| 344 | 344 | $prjTema = $this->layer->getProjection(); |
| 345 | 345 | $extatual = $this->mapa->extent; |
| 346 | - $ret = $this->layer->getmetadata("extencao"); | |
| 346 | + $ret = $this->layer->getmetadata("extensao"); | |
| 347 | 347 | if ($ret == "") |
| 348 | 348 | { |
| 349 | 349 | $ret = $this->layer->getextent(); | ... | ... |
classesphp/classe_toponimia.php
| ... | ... | @@ -72,9 +72,12 @@ $map_file - Endereço do mapfile no servidor. |
| 72 | 72 | |
| 73 | 73 | $tema - nome do tema que será processado |
| 74 | 74 | */ |
| 75 | - function __construct($map_file,$tema="") | |
| 75 | + function __construct($map_file,$tema="",$locaplic="") | |
| 76 | 76 | { |
| 77 | 77 | //error_reporting(E_ALL); |
| 78 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
| 79 | + require_once($locaplic."/funcoes_gerais.php"); | |
| 80 | + else | |
| 78 | 81 | require_once("funcoes_gerais.php"); |
| 79 | 82 | $this->mapa = ms_newMapObj($map_file); |
| 80 | 83 | $this->arquivo = $map_file; | ... | ... |
classesphp/funcoes_gerais.php
| ... | ... | @@ -1480,6 +1480,9 @@ $dir_tmp - Diretório temporário |
| 1480 | 1480 | function criaSHP($tema,$map_file,$locaplic,$dir_tmp) |
| 1481 | 1481 | { |
| 1482 | 1482 | //para manipular dbf |
| 1483 | + if(file_exists($locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1484 | + require_once($locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1485 | + else | |
| 1483 | 1486 | require_once "../pacotes/phpxbase/api_conversion.php"; |
| 1484 | 1487 | $map = @ms_newMapObj($map_file); |
| 1485 | 1488 | $layer = $map->getlayerbyname($tema); |
| ... | ... | @@ -1589,6 +1592,9 @@ function downloadTema($map_file,$tema,$locaplic,$dir_tmp) |
| 1589 | 1592 | ini_set("max_execution_time","1800"); |
| 1590 | 1593 | if (!@ms_newMapObj($map_file)) //a funcao foi chamada do aplicativo datadownload |
| 1591 | 1594 | { |
| 1595 | + if(file_exists($locaplic."/ms_configura.php")) | |
| 1596 | + require_once($locaplic."/ms_configura.php"); | |
| 1597 | + else | |
| 1592 | 1598 | require_once("../ms_configura.php"); |
| 1593 | 1599 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
| 1594 | 1600 | {$map_tmp = ms_newMapObj($locaplic."/aplicmap/geral1windows.map");} | ... | ... |
classesphp/mapa_inicia.php
| ... | ... | @@ -161,7 +161,7 @@ function iniciaMapa() |
| 161 | 161 | //verifica se o tema pode receber a operação de zoom para o tema |
| 162 | 162 | // |
| 163 | 163 | $zoomtema = "sim"; |
| 164 | - if (($ct != 1) && ($oLayer->getmetadata("extecao") == "")) | |
| 164 | + if (($ct != 1) && ($oLayer->getmetadata("extensao") == "")) | |
| 165 | 165 | {$zoomtema = "nao";} |
| 166 | 166 | // |
| 167 | 167 | //verifica se existe restrição de escala | ... | ... |