Commit cb6dbb2d9b51554601fc5b19c8cfe8741a2c3f7c
1 parent
ba58cdf9
Exists in
master
and in
7 other branches
Correcao nos includes
Showing
60 changed files
with
448 additions
and
503 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/classe_metaestat.php
| ... | ... | @@ -2841,10 +2841,7 @@ class Metaestat{ |
| 2841 | 2841 | } |
| 2842 | 2842 | //para manipular dbf |
| 2843 | 2843 | if($dbaseExiste == false){ |
| 2844 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 2845 | - {include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php");} | |
| 2846 | - else | |
| 2847 | - {include_once "../pacotes/phpxbase/api_conversion.php";} | |
| 2844 | + include_once (dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"); | |
| 2848 | 2845 | $db = xbase_create($nomeshp.".dbf", $def); |
| 2849 | 2846 | } |
| 2850 | 2847 | else | ... | ... |
admin/php/editormapfile.php
| ... | ... | @@ -1278,7 +1278,7 @@ function autoClassesLayer() |
| 1278 | 1278 | $layertemp = $mapageral->getlayer($i); |
| 1279 | 1279 | $layertemp->set("status",MS_DELETE); |
| 1280 | 1280 | } |
| 1281 | - | |
| 1281 | + | |
| 1282 | 1282 | $mapatemp = ms_newMapObj($mapfile); |
| 1283 | 1283 | $numlayers = $mapatemp->numlayers; |
| 1284 | 1284 | for ($i=0;$i < $numlayers;$i++) | ... | ... |
admin/php/estat_mapa_upload.php
| ... | ... | @@ -15,7 +15,7 @@ error_reporting(0); |
| 15 | 15 | <p> |
| 16 | 16 | <?php |
| 17 | 17 | if (isset($_FILES['uploadimagem']['name'])){ |
| 18 | - require_once ("../../ms_configura.php"); | |
| 18 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 19 | 19 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 20 | 20 | $arq = $metaestatTemplates."/logos/".$_FILES['uploadimagem']['name']; |
| 21 | 21 | //verifica nomes | ... | ... |
admin/php/menutemas.php
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | - Title: menutemas.php | |
| 3 | +Title: menutemas.php | |
| 4 | 4 | |
| 5 | 5 | Funções utilizadas nas operações de manutenção de menus, grupo, subgrupos e temas |
| 6 | 6 | |
| ... | ... | @@ -78,13 +78,13 @@ if($idioma == "") |
| 78 | 78 | switch (strtoupper($funcao)) |
| 79 | 79 | { |
| 80 | 80 | /* |
| 81 | - Note: | |
| 81 | + Note: | |
| 82 | 82 | |
| 83 | 83 | Valores que o parâmetro &funcao pode receber. Os parâmetros devem ser enviados na requisição em AJAX. |
| 84 | 84 | */ |
| 85 | 85 | |
| 86 | 86 | /* |
| 87 | - Valor: PEGAMENUS | |
| 87 | + Valor: PEGAMENUS | |
| 88 | 88 | |
| 89 | 89 | Lista de menus contendo todas as colunas |
| 90 | 90 | |
| ... | ... | @@ -104,7 +104,7 @@ switch (strtoupper($funcao)) |
| 104 | 104 | exit; |
| 105 | 105 | break; |
| 106 | 106 | /* |
| 107 | - Valor: PEGAMENUS2 | |
| 107 | + Valor: PEGAMENUS2 | |
| 108 | 108 | |
| 109 | 109 | Lista de menus contendo apenas colunas selecionadas |
| 110 | 110 | |
| ... | ... | @@ -131,7 +131,7 @@ switch (strtoupper($funcao)) |
| 131 | 131 | exit; |
| 132 | 132 | break; |
| 133 | 133 | /* |
| 134 | - Valor: PEGATAGS | |
| 134 | + Valor: PEGATAGS | |
| 135 | 135 | |
| 136 | 136 | Lista de tags |
| 137 | 137 | |
| ... | ... | @@ -145,7 +145,7 @@ switch (strtoupper($funcao)) |
| 145 | 145 | exit; |
| 146 | 146 | break; |
| 147 | 147 | /* |
| 148 | - Valor: PEGATAGSPORMAPFILE | |
| 148 | + Valor: PEGATAGSPORMAPFILE | |
| 149 | 149 | |
| 150 | 150 | Lista de tags por mapfile |
| 151 | 151 | |
| ... | ... | @@ -188,7 +188,7 @@ switch (strtoupper($funcao)) |
| 188 | 188 | exit; |
| 189 | 189 | break; |
| 190 | 190 | /* |
| 191 | - Valor: PEGAPERFIS | |
| 191 | + Valor: PEGAPERFIS | |
| 192 | 192 | |
| 193 | 193 | Lista de perfis |
| 194 | 194 | |
| ... | ... | @@ -205,7 +205,7 @@ switch (strtoupper($funcao)) |
| 205 | 205 | exit; |
| 206 | 206 | break; |
| 207 | 207 | /* |
| 208 | - Valor: ALTERAMENUS | |
| 208 | + Valor: ALTERAMENUS | |
| 209 | 209 | |
| 210 | 210 | Altera os dados de um menu |
| 211 | 211 | |
| ... | ... | @@ -244,7 +244,7 @@ switch (strtoupper($funcao)) |
| 244 | 244 | exit; |
| 245 | 245 | break; |
| 246 | 246 | /* |
| 247 | - Valor: PEGAGRUPOS | |
| 247 | + Valor: PEGAGRUPOS | |
| 248 | 248 | |
| 249 | 249 | Lista de grupos com todas as colunas |
| 250 | 250 | |
| ... | ... | @@ -264,7 +264,7 @@ switch (strtoupper($funcao)) |
| 264 | 264 | exit; |
| 265 | 265 | break; |
| 266 | 266 | /* |
| 267 | - Valor: PEGAGRUPOS2 | |
| 267 | + Valor: PEGAGRUPOS2 | |
| 268 | 268 | |
| 269 | 269 | Lista de grupos contendo as colunas principais |
| 270 | 270 | |
| ... | ... | @@ -282,7 +282,7 @@ switch (strtoupper($funcao)) |
| 282 | 282 | exit; |
| 283 | 283 | break; |
| 284 | 284 | /* |
| 285 | - Valor: ALTERAGRUPOS | |
| 285 | + Valor: ALTERAGRUPOS | |
| 286 | 286 | |
| 287 | 287 | Altera os dados de um grupo |
| 288 | 288 | |
| ... | ... | @@ -315,7 +315,7 @@ switch (strtoupper($funcao)) |
| 315 | 315 | exit; |
| 316 | 316 | break; |
| 317 | 317 | /* |
| 318 | - Valor: PEGASUBGRUPOS | |
| 318 | + Valor: PEGASUBGRUPOS | |
| 319 | 319 | |
| 320 | 320 | Lista de subgrupos com todas as colunas |
| 321 | 321 | |
| ... | ... | @@ -334,7 +334,7 @@ switch (strtoupper($funcao)) |
| 334 | 334 | exit; |
| 335 | 335 | break; |
| 336 | 336 | /* |
| 337 | - Valor: PEGASUBGRUPOS2 | |
| 337 | + Valor: PEGASUBGRUPOS2 | |
| 338 | 338 | |
| 339 | 339 | Lista de grupos contendo as colunas principais |
| 340 | 340 | |
| ... | ... | @@ -352,7 +352,7 @@ switch (strtoupper($funcao)) |
| 352 | 352 | exit; |
| 353 | 353 | break; |
| 354 | 354 | /* |
| 355 | - Valor: ALTERASUBGRUPOS | |
| 355 | + Valor: ALTERASUBGRUPOS | |
| 356 | 356 | |
| 357 | 357 | Altera os dados de um subgrupo |
| 358 | 358 | |
| ... | ... | @@ -385,7 +385,7 @@ switch (strtoupper($funcao)) |
| 385 | 385 | exit; |
| 386 | 386 | break; |
| 387 | 387 | /* |
| 388 | - Valor: PEGATEMAS | |
| 388 | + Valor: PEGATEMAS | |
| 389 | 389 | |
| 390 | 390 | Lista de temas com todas as colunas |
| 391 | 391 | |
| ... | ... | @@ -399,7 +399,7 @@ switch (strtoupper($funcao)) |
| 399 | 399 | exit; |
| 400 | 400 | break; |
| 401 | 401 | /* |
| 402 | - Valor: PEGATEMAPORMAPFILE | |
| 402 | + Valor: PEGATEMAPORMAPFILE | |
| 403 | 403 | |
| 404 | 404 | Lista os dados de um tema procurando registros com base no nome do mapfile |
| 405 | 405 | |
| ... | ... | @@ -433,7 +433,7 @@ switch (strtoupper($funcao)) |
| 433 | 433 | exit; |
| 434 | 434 | break; |
| 435 | 435 | /* |
| 436 | - Valor: PEGATEMAS2 | |
| 436 | + Valor: PEGATEMAS2 | |
| 437 | 437 | |
| 438 | 438 | Lista de temas com as colunas principais |
| 439 | 439 | |
| ... | ... | @@ -446,7 +446,7 @@ switch (strtoupper($funcao)) |
| 446 | 446 | exit; |
| 447 | 447 | break; |
| 448 | 448 | /* |
| 449 | - Valor: ATUALIZAMINIATURA | |
| 449 | + Valor: ATUALIZAMINIATURA | |
| 450 | 450 | |
| 451 | 451 | Atualiza as imagens das miniaturas de um tema |
| 452 | 452 | |
| ... | ... | @@ -459,7 +459,7 @@ switch (strtoupper($funcao)) |
| 459 | 459 | exit; |
| 460 | 460 | break; |
| 461 | 461 | /* |
| 462 | - Valor: ALTERATEMAS | |
| 462 | + Valor: ALTERATEMAS | |
| 463 | 463 | |
| 464 | 464 | Altera os dados de um tema |
| 465 | 465 | |
| ... | ... | @@ -505,7 +505,7 @@ switch (strtoupper($funcao)) |
| 505 | 505 | exit; |
| 506 | 506 | break; |
| 507 | 507 | /* |
| 508 | - Valor: ALTERATAGS | |
| 508 | + Valor: ALTERATAGS | |
| 509 | 509 | |
| 510 | 510 | Altera os dados de um tag |
| 511 | 511 | |
| ... | ... | @@ -526,7 +526,7 @@ switch (strtoupper($funcao)) |
| 526 | 526 | exit; |
| 527 | 527 | break; |
| 528 | 528 | /* |
| 529 | - Valor: ALTERAPERFIS | |
| 529 | + Valor: ALTERAPERFIS | |
| 530 | 530 | |
| 531 | 531 | Altera os dados de um perfil |
| 532 | 532 | |
| ... | ... | @@ -613,7 +613,7 @@ switch (strtoupper($funcao)) |
| 613 | 613 | exit; |
| 614 | 614 | break; |
| 615 | 615 | /* |
| 616 | - Valor: VERIFICAORFAOS | |
| 616 | + Valor: VERIFICAORFAOS | |
| 617 | 617 | |
| 618 | 618 | Verifica se existem temas sem o correspondente mapfile |
| 619 | 619 | |
| ... | ... | @@ -726,7 +726,7 @@ function excluiTagTemas($id) |
| 726 | 726 | } |
| 727 | 727 | } |
| 728 | 728 | /* |
| 729 | - Pega a lista de temas | |
| 729 | +Pega a lista de temas | |
| 730 | 730 | |
| 731 | 731 | Parameters: |
| 732 | 732 | |
| ... | ... | @@ -829,7 +829,7 @@ function pegaTemas2() |
| 829 | 829 | } |
| 830 | 830 | } |
| 831 | 831 | /* |
| 832 | - Altera o registro de um menu. Se id for vazio acrescenta o registro | |
| 832 | +Altera o registro de um menu. Se id for vazio acrescenta o registro | |
| 833 | 833 | */ |
| 834 | 834 | function alteraMenus() |
| 835 | 835 | { |
| ... | ... | @@ -859,7 +859,7 @@ function alteraMenus() |
| 859 | 859 | $id = $id->fetchAll(); |
| 860 | 860 | $id = $id[0]['id_menu']; |
| 861 | 861 | $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_menus SET nome_menu = '' WHERE id_menu = $id AND nome_menu = '$id_temp'"); |
| 862 | - $retorna = $id; | |
| 862 | + $retorna = $id; | |
| 863 | 863 | } |
| 864 | 864 | $dbhw = null; |
| 865 | 865 | $dbh = null; |
| ... | ... | @@ -1022,7 +1022,7 @@ function alteraTags() |
| 1022 | 1022 | } |
| 1023 | 1023 | } |
| 1024 | 1024 | /* |
| 1025 | - Altera o registro de um grupo. Se id for vazio acrescenta o registro | |
| 1025 | +Altera o registro de um grupo. Se id for vazio acrescenta o registro | |
| 1026 | 1026 | */ |
| 1027 | 1027 | function alteraGrupos() |
| 1028 | 1028 | { |
| ... | ... | @@ -1056,7 +1056,7 @@ function alteraGrupos() |
| 1056 | 1056 | } |
| 1057 | 1057 | } |
| 1058 | 1058 | /* |
| 1059 | - Altera o registro de um sub-grupo. Se id for vazio acrescenta o registro | |
| 1059 | +Altera o registro de um sub-grupo. Se id for vazio acrescenta o registro | |
| 1060 | 1060 | */ |
| 1061 | 1061 | function alteraSubGrupos() |
| 1062 | 1062 | { |
| ... | ... | @@ -1087,7 +1087,7 @@ function alteraSubGrupos() |
| 1087 | 1087 | } |
| 1088 | 1088 | } |
| 1089 | 1089 | /* |
| 1090 | - Registra um mapfile na tabela de temas | |
| 1090 | +Registra um mapfile na tabela de temas | |
| 1091 | 1091 | */ |
| 1092 | 1092 | function registraTema() |
| 1093 | 1093 | { |
| ... | ... | @@ -1112,7 +1112,7 @@ function registraTema() |
| 1112 | 1112 | } |
| 1113 | 1113 | } |
| 1114 | 1114 | /* |
| 1115 | - Altera o registro de um tema. Se id for vazio acrescenta o registro | |
| 1115 | +Altera o registro de um tema. Se id for vazio acrescenta o registro | |
| 1116 | 1116 | */ |
| 1117 | 1117 | function alteraTemas() |
| 1118 | 1118 | { |
| ... | ... | @@ -1208,7 +1208,7 @@ function alteraTemas() |
| 1208 | 1208 | } |
| 1209 | 1209 | } |
| 1210 | 1210 | /* |
| 1211 | - Retorna a lista de mapfiles do diretorio i3geo/temas | |
| 1211 | +Retorna a lista de mapfiles do diretorio i3geo/temas | |
| 1212 | 1212 | |
| 1213 | 1213 | */ |
| 1214 | 1214 | function listaMapsTemas() |
| ... | ... | @@ -1313,7 +1313,7 @@ function listaMapsTemas() |
| 1313 | 1313 | return $lista; |
| 1314 | 1314 | } |
| 1315 | 1315 | /* |
| 1316 | - Retorna a lista de temas sem mapfiles | |
| 1316 | +Retorna a lista de temas sem mapfiles | |
| 1317 | 1317 | |
| 1318 | 1318 | */ |
| 1319 | 1319 | function verificaOrfaos() |
| ... | ... | @@ -1404,8 +1404,8 @@ function removeCabecalho($arq,$symbolset=true) |
| 1404 | 1404 | function atualizaMiniatura(){ |
| 1405 | 1405 | global $tema,$locaplic; |
| 1406 | 1406 | $tipo = "foo"; |
| 1407 | - include_once("../../classesphp/funcoes_gerais.php"); | |
| 1408 | - require("../../geraminiatura.php"); | |
| 1407 | + include_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 1408 | + require(dirname(__FILE__)."/../../geraminiatura.php"); | |
| 1409 | 1409 | verificaMiniatura($tema,"todos",true); |
| 1410 | 1410 | return "ok"; |
| 1411 | 1411 | } | ... | ... |
admin/php/metaestat_mapa_uploadimagem.php
| ... | ... | @@ -19,7 +19,7 @@ error_reporting(0); |
| 19 | 19 | <p> |
| 20 | 20 | <?php |
| 21 | 21 | if (isset($_FILES['uploadimagem']['name'])){ |
| 22 | - require_once ("../../ms_configura.php"); | |
| 22 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 23 | 23 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 24 | 24 | $arq = $locaplic.$metaestatTemplates."/logos/".$_FILES['uploadimagem']['name']; |
| 25 | 25 | //verifica nomes | ... | ... |
admin/php/metaestat_uploadcsv_submit.php
| ... | ... | @@ -30,7 +30,7 @@ if (ob_get_level() == 0) ob_start(); |
| 30 | 30 | exit; |
| 31 | 31 | } |
| 32 | 32 | if (isset($_FILES['i3GEOuploadcsv']['name'])){ |
| 33 | - require_once ("../../ms_configura.php"); | |
| 33 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 34 | 34 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 35 | 35 | ob_flush(); |
| 36 | 36 | flush(); | ... | ... |
admin/php/metaestat_uploadshp_submit.php
| ... | ... | @@ -33,7 +33,7 @@ if ($_FILES['i3GEOuploadshp']['name'] == ""){ |
| 33 | 33 | exit; |
| 34 | 34 | } |
| 35 | 35 | if (isset($_FILES['i3GEOuploadshp']['name'])){ |
| 36 | - require_once ("../../ms_configura.php"); | |
| 36 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 37 | 37 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 38 | 38 | ob_flush(); |
| 39 | 39 | flush(); | ... | ... |
admin/php/parsemapfile.php
| ... | ... | @@ -37,10 +37,10 @@ Arquivo: |
| 37 | 37 | |
| 38 | 38 | i3geo/admin/php/parsemapfile.php |
| 39 | 39 | */ |
| 40 | -include("../../ms_configura.php"); | |
| 41 | -include_once("../../classesphp/funcoes_gerais.php"); | |
| 42 | -include_once("../../classesphp/carrega_ext.php"); | |
| 43 | -include_once("../../classesphp/pega_variaveis.php"); | |
| 40 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 41 | +include_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 42 | +include_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 43 | +include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 44 | 44 | // |
| 45 | 45 | //essa variavel indica se a senha do banco e bloqueada ou nao caso |
| 46 | 46 | //o tema seja do tipo postgis |
| ... | ... | @@ -196,7 +196,7 @@ function legendaValorUnico($layername) |
| 196 | 196 | $temp = implode(" ,",$temp); |
| 197 | 197 | //$temp = "1111 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1"; |
| 198 | 198 | $xml .= "<property key='typeKeys' value='$temp'/>\n"; |
| 199 | - $xml .= "<property key='typeValues' value='$temp'/>\n"; | |
| 199 | + $xml .= "<property key='typeValues' value='$temp'/>\n"; | |
| 200 | 200 | $xml .= "<property key='followHeaderEncoding' value='true'/>\n"; |
| 201 | 201 | $xml .= "<xml-tag><property key='className' value='com.iver.cit.gvsig.fmap.core.v02.FSymbol'/><property key='m_symbolType' value='4'/><property key='m_Style' value='1'/><property key='m_useOutline' value='true'/><property key='m_Color' value='150,150,150,255'/><property key='m_outlineColor' value='255,255,255,255'/><property key='m_bUseFontSize' value='true'/><property key='m_bDrawShape' value='true'/><property key='m_Size' value='2'/><property key='m_Rotation' value='0'/><property key='m_LinePattern' value='0'/><property key='m_stroke' value='1.0'/><property key='m_bUseSize' value='false'/><property key='m_AlingVert' value='0'/><property key='m_AlingHoriz' value='0'/><property key='m_Descrip' value='Default'/><property key='rgb' value='-14902251'/></xml-tag>"; |
| 202 | 202 | $xml .= "<xml-tag><property key='className' value='com.iver.cit.gvsig.fmap.core.v02.FSymbol'/><property key='m_symbolType' value='4'/><property key='m_Style' value='1'/><property key='m_useOutline' value='true'/><property key='m_Color' value='150,150,150,255'/><property key='m_outlineColor' value='255,255,255,255'/><property key='m_bUseFontSize' value='true'/><property key='m_bDrawShape' value='true'/><property key='m_Size' value='2'/><property key='m_Rotation' value='0'/><property key='m_LinePattern' value='0'/><property key='m_stroke' value='1.0'/><property key='m_bUseSize' value='false'/><property key='m_AlingVert' value='0'/><property key='m_AlingHoriz' value='0'/><property key='m_Descrip' value='Default'/><property key='rgb' value='-14902251'/></xml-tag>\n"; | ... | ... |
admin/php/uploadgvp.php
| ... | ... | @@ -16,7 +16,7 @@ if (ob_get_level() == 0) ob_start(); |
| 16 | 16 | <p> |
| 17 | 17 | <?php |
| 18 | 18 | if (isset($_FILES['i3GEOuploadgvp']['name'])){ |
| 19 | - require_once ("../../ms_configura.php"); | |
| 19 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 20 | 20 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 21 | 21 | ob_flush(); |
| 22 | 22 | flush(); | ... | ... |
classesjs/compactajs.php
| ... | ... | @@ -35,8 +35,8 @@ i3geo/classesjs/compactajs.php |
| 35 | 35 | //compacta os arquivos do richdraw |
| 36 | 36 | // |
| 37 | 37 | $locaplic = dirname(__FILE__)."/.."; |
| 38 | -include_once("../admin/php/admin.php"); | |
| 39 | -include_once("../admin/php/conexao.php"); | |
| 38 | +include_once(dirname(__FILE__)."/../admin/php/admin.php"); | |
| 39 | +include_once(dirname(__FILE__)."/../admin/php/conexao.php"); | |
| 40 | 40 | |
| 41 | 41 | if(empty($_POST["senha"]) || empty($_POST["usuario"])){ |
| 42 | 42 | formularioLoginMaster("compactajs.php"); |
| ... | ... | @@ -307,7 +307,7 @@ function packer($src,$out,$tipo="None") |
| 307 | 307 | { |
| 308 | 308 | if(file_exists($out)) |
| 309 | 309 | {unlink($out);} |
| 310 | - require_once '../pacotes/packer/class.JavaScriptPacker.php'; | |
| 310 | + require_once dirname(__FILE__).'/../pacotes/packer/class.JavaScriptPacker.php'; | |
| 311 | 311 | $script = file_get_contents($src); |
| 312 | 312 | $script = str_replace("if(typeof(console)","//if(typeof(console)",$script); |
| 313 | 313 | $t1 = microtime(true); | ... | ... |
classesphp/atlas_controle.php
| ... | ... | @@ -60,7 +60,7 @@ map_file - endere&ccedil;o, no servidor, do mapfile atual, exemplo: c:/ms4w/tmp/ |
| 60 | 60 | mapext - extensão geográfica do mapa atual, exemplo: -76.5125927 -39.3925675209 -29.5851853 9.49014852081 |
| 61 | 61 | perfil - nome do perfil para controlar os temas que serão visíveis na lista de temas. |
| 62 | 62 | mapdir - localização, no servidor, do diretório com o mapfile temporário do mapa atual. |
| 63 | -imgdir - localização, no servidor, das imagens temporárias do mapa atual. | |
| 63 | +imgdir - localização, no servidor, das imagens temporárias do mapa atual. | |
| 64 | 64 | debug - (pode ser definido como "sim" indica se o erro_reporting deve ser definido como E_ALL |
| 65 | 65 | */ |
| 66 | 66 | error_reporting(0); |
| ... | ... | @@ -80,7 +80,7 @@ if(isset($g_sid)) |
| 80 | 80 | //guarda na section se o id tiver sido enviado epla URL |
| 81 | 81 | if(isset($atlasId)) |
| 82 | 82 | {$_SESSION["atlasId"] = $atlasId;} |
| 83 | - // | |
| 83 | + // | |
| 84 | 84 | foreach(array_keys($_SESSION) as $k) |
| 85 | 85 | {eval("\$".$k."='".$_SESSION[$k]."';");} |
| 86 | 86 | $postgis_mapa = $_SESSION["postgis_mapa"]; |
| ... | ... | @@ -116,10 +116,7 @@ if ($map_file != "") |
| 116 | 116 | } |
| 117 | 117 | if(!isset($locaplic)) |
| 118 | 118 | { |
| 119 | - if(file_exists("../ms_configura.php")) | |
| 120 | - {include("../ms_configura.php");} | |
| 121 | - else | |
| 122 | - {include("ms_configura.php");} | |
| 119 | + include(dirname(__FILE__)."/ms_configura.php"); | |
| 123 | 120 | } |
| 124 | 121 | include($locaplic."/admin/php/xml.php"); |
| 125 | 122 | $xml = simplexml_load_string(geraXmlAtlas($locaplic,$editores)); |
| ... | ... | @@ -167,7 +164,7 @@ Esse programa &eacute; chamado diretamente, por exemplo, i3geo/classesphp/atlas_ |
| 167 | 164 | // |
| 168 | 165 | $executa = "gravaId"; |
| 169 | 166 | $temasa = ""; |
| 170 | - include_once("../ms_criamapa.php"); | |
| 167 | + include_once(dirname(__FILE__)."/../ms_criamapa.php"); | |
| 171 | 168 | exit; |
| 172 | 169 | break; |
| 173 | 170 | /* |
| ... | ... | @@ -219,6 +216,6 @@ function gravaid() |
| 219 | 216 | $l->setmetadata("ATLAS","nao"); |
| 220 | 217 | $l->setmetadata("TIP",""); |
| 221 | 218 | } |
| 222 | - $m->save($tmpfname); | |
| 219 | + $m->save($tmpfname); | |
| 223 | 220 | } |
| 224 | 221 | ?> |
| 225 | 222 | \ No newline at end of file | ... | ... |
classesphp/classe_analise.php
| ... | ... | @@ -733,11 +733,8 @@ $locaplic - diretório da aplica&ccedil;&atilde;o i3geo |
| 733 | 733 | { |
| 734 | 734 | if (file_exists($nomearq)) |
| 735 | 735 | { |
| 736 | - if($this->dbaseExiste == false){ | |
| 737 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 738 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 739 | - else | |
| 740 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 736 | + if($this->dbaseExiste == false){ | |
| 737 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 741 | 738 | } |
| 742 | 739 | //define o nome do novo shapefile que será criado |
| 743 | 740 | $nomefinal = nomeRandomico(); |
| ... | ... | @@ -827,11 +824,8 @@ $locaplic - diretório da aplica&ccedil;&atilde;o i3geo |
| 827 | 824 | { |
| 828 | 825 | if (file_exists($nomearq)) |
| 829 | 826 | { |
| 830 | - if($this->dbaseExiste == false){ | |
| 831 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 832 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 833 | - else | |
| 834 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 827 | + if($this->dbaseExiste == false){ | |
| 828 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 835 | 829 | } |
| 836 | 830 | // |
| 837 | 831 | //define os nomes dos novos shapefiles que serão criados |
| ... | ... | @@ -1007,10 +1001,7 @@ $locaplic - Localiza&ccedil;&atilde;o do I3geo. |
| 1007 | 1001 | { |
| 1008 | 1002 | set_time_limit(3000); |
| 1009 | 1003 | if($this->dbaseExiste == false){ |
| 1010 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1011 | - {include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php");} | |
| 1012 | - else | |
| 1013 | - {include_once "../pacotes/phpxbase/api_conversion.php";} | |
| 1004 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1014 | 1005 | } |
| 1015 | 1006 | $layerPt = $this->mapa->getlayerbyname($temaPt); |
| 1016 | 1007 | $layerPt->set("template","none.htm"); |
| ... | ... | @@ -1174,10 +1165,7 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig |
| 1174 | 1165 | set_time_limit(180); |
| 1175 | 1166 | //para manipular dbf |
| 1176 | 1167 | if($this->dbaseExiste == false){ |
| 1177 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1178 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1179 | - else | |
| 1180 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1168 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1181 | 1169 | } |
| 1182 | 1170 | //define o nome do novo shapefile que será criado |
| 1183 | 1171 | $nomefinal = nomeRandomico(); |
| ... | ... | @@ -1321,10 +1309,7 @@ nome do layer criado com o buffer. |
| 1321 | 1309 | {$items = array();} |
| 1322 | 1310 | //para manipular dbf |
| 1323 | 1311 | if($this->dbaseExiste == false){ |
| 1324 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1325 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1326 | - else | |
| 1327 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1312 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1328 | 1313 | } |
| 1329 | 1314 | $nomebuffer = nomeRandomico(); |
| 1330 | 1315 | $nomeshp = $this->diretorio."/".$nomebuffer; |
| ... | ... | @@ -1435,10 +1420,7 @@ $item {string} - (opcional) Item q ser&aacute; utilizado para ponderar os valore |
| 1435 | 1420 | set_time_limit(180); |
| 1436 | 1421 | //para manipular dbf |
| 1437 | 1422 | if($this->dbaseExiste == false){ |
| 1438 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1439 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1440 | - else | |
| 1441 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1423 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1442 | 1424 | } |
| 1443 | 1425 | //error_reporting(0); |
| 1444 | 1426 | $nomeCentro = nomeRandomico(); |
| ... | ... | @@ -1521,10 +1503,7 @@ $locaplic - Localiza&ccedil;&atilde;o do I3geo. |
| 1521 | 1503 | set_time_limit(180); |
| 1522 | 1504 | //para manipular dbf |
| 1523 | 1505 | if($this->dbaseExiste == false){ |
| 1524 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1525 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1526 | - else | |
| 1527 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1506 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1528 | 1507 | } |
| 1529 | 1508 | $nomeCentroides = nomeRandomico(); |
| 1530 | 1509 | $nomeshp = $this->diretorio."/".$nomeCentroides; |
| ... | ... | @@ -1604,10 +1583,7 @@ $npty - N&uacute;mero de pontos em Y (opcional) |
| 1604 | 1583 | set_time_limit(180); |
| 1605 | 1584 | //para manipular dbf |
| 1606 | 1585 | if($this->dbaseExiste == false){ |
| 1607 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1608 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1609 | - else | |
| 1610 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1586 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1611 | 1587 | } |
| 1612 | 1588 | $nomegrade = nomeRandomico(); |
| 1613 | 1589 | $nomeshp = $this->diretorio."/".$nomegrade; |
| ... | ... | @@ -1733,10 +1709,7 @@ $npty - N&uacute;mero de pontos em Y (opcional) |
| 1733 | 1709 | set_time_limit(180); |
| 1734 | 1710 | //para manipular dbf |
| 1735 | 1711 | if($this->dbaseExiste == false){ |
| 1736 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1737 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1738 | - else | |
| 1739 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1712 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1740 | 1713 | } |
| 1741 | 1714 | $nomegrade = nomeRandomico(); |
| 1742 | 1715 | $nomeshp = $this->diretorio."/".$nomegrade; |
| ... | ... | @@ -1888,10 +1861,7 @@ $npty - N&uacute;mero de pontos em Y (opcional) |
| 1888 | 1861 | set_time_limit(180); |
| 1889 | 1862 | //para manipular dbf |
| 1890 | 1863 | if($this->dbaseExiste == false){ |
| 1891 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 1892 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 1893 | - else | |
| 1894 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1864 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1895 | 1865 | } |
| 1896 | 1866 | $nomegrade = nomeRandomico(); |
| 1897 | 1867 | $nomeshp = $this->diretorio."/".$nomegrade; |
| ... | ... | @@ -2047,10 +2017,7 @@ $locaplic - Localiza&ccedil;&atilde;o do I3geo |
| 2047 | 2017 | set_time_limit(180); |
| 2048 | 2018 | //para manipular dbf |
| 2049 | 2019 | if($this->dbaseExiste == false){ |
| 2050 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 2051 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 2052 | - else | |
| 2053 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 2020 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 2054 | 2021 | } |
| 2055 | 2022 | $layerPt = $this->mapa->getlayerbyname($temaPt); |
| 2056 | 2023 | $layerPt->set("template","none.htm"); |
| ... | ... | @@ -2155,10 +2122,7 @@ Salva o mapa acrescentando um novo layer com o resultado. |
| 2155 | 2122 | //para manipular dbf |
| 2156 | 2123 | if(!isset($item)){$item="";} |
| 2157 | 2124 | if($this->dbaseExiste == false){ |
| 2158 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 2159 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 2160 | - else | |
| 2161 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 2125 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 2162 | 2126 | } |
| 2163 | 2127 | $shapes =retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); |
| 2164 | 2128 | $indices = array(); |
| ... | ... | @@ -2265,10 +2229,7 @@ $locaplic - Localiza&ccedil;&atilde;o do I3geo |
| 2265 | 2229 | //para manipular dbf |
| 2266 | 2230 | if(!isset($item)){$item="";} |
| 2267 | 2231 | if($this->dbaseExiste == false){ |
| 2268 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 2269 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 2270 | - else | |
| 2271 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 2232 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 2272 | 2233 | } |
| 2273 | 2234 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); |
| 2274 | 2235 | $indices = array(); |
| ... | ... | @@ -2606,10 +2567,7 @@ $tipoLista - tipo de valores que s&atilde;o passados em $lista stringArquivos|ar |
| 2606 | 2567 | if ($tiposhape == 1){$tiposhapefile = MS_SHP_ARC;} |
| 2607 | 2568 | //cria o shapefile |
| 2608 | 2569 | if($this->dbaseExiste == false){ |
| 2609 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 2610 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 2611 | - else | |
| 2612 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 2570 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 2613 | 2571 | } |
| 2614 | 2572 | $diretorio = dirname($this->arquivo); |
| 2615 | 2573 | $novonomelayer = nomeRandomico(); | ... | ... |
classesphp/classe_menutemas.php
| ... | ... | @@ -499,7 +499,7 @@ $fatorestrela - valor para normalizar o total de acessos com o valor da estrela |
| 499 | 499 | */ |
| 500 | 500 | function procurartemasestrela($nivel,$fatorestrela) |
| 501 | 501 | { |
| 502 | - include_once(__DIR__."/../admin/php/classe_arvore.php"); | |
| 502 | + include_once(dirname(__FILE__)."/../admin/php/classe_arvore.php"); | |
| 503 | 503 | $arvore = new Arvore($this->locaplic,$this->idioma); |
| 504 | 504 | $temas = $arvore->procuraTemasEstrela($nivel,$fatorestrela,$this->perfil); |
| 505 | 505 | unset($arvore); |
| ... | ... | @@ -689,13 +689,13 @@ nrss - (opcional) n&uacute;mero de registros no rss que ser&atilde;o considerado |
| 689 | 689 | */ |
| 690 | 690 | function array_in_array($needle, $haystack) |
| 691 | 691 | { |
| 692 | - //Make sure $needle is an array for foreach | |
| 693 | - if(!is_array($needle)) $needle = array($needle); | |
| 694 | - //For each value in $needle, return TRUE if in $haystack | |
| 695 | - foreach($needle as $pin) | |
| 696 | - if(in_array($pin, $haystack)) return TRUE; | |
| 697 | - //Return FALSE if none of the values from $needle are found in $haystack | |
| 698 | - return FALSE; | |
| 692 | + //Make sure $needle is an array for foreach | |
| 693 | + if(!is_array($needle)) $needle = array($needle); | |
| 694 | + //For each value in $needle, return TRUE if in $haystack | |
| 695 | + foreach($needle as $pin) | |
| 696 | + if(in_array($pin, $haystack)) return TRUE; | |
| 697 | + //Return FALSE if none of the values from $needle are found in $haystack | |
| 698 | + return FALSE; | |
| 699 | 699 | } |
| 700 | 700 | function ixml($no,$nome) |
| 701 | 701 | { | ... | ... |
classesphp/classe_shp.php
| ... | ... | @@ -125,8 +125,8 @@ function: salva |
| 125 | 125 | |
| 126 | 126 | Salva o mapfile atual |
| 127 | 127 | */ |
| 128 | - function salva() | |
| 129 | - { | |
| 128 | + function salva() | |
| 129 | + { | |
| 130 | 130 | if (connection_aborted()){ |
| 131 | 131 | exit(); |
| 132 | 132 | } |
| ... | ... | @@ -164,10 +164,7 @@ Nome do tema criado. |
| 164 | 164 | $tipol = MS_SHP_POINT; |
| 165 | 165 | } |
| 166 | 166 | if($this->dbaseExiste == false){ |
| 167 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 168 | - {include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php");} | |
| 169 | - else | |
| 170 | - {include_once "../pacotes/phpxbase/api_conversion.php";} | |
| 167 | + include_once (dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"); | |
| 171 | 168 | $db = xbase_create($nomeshp.".dbf", $def); |
| 172 | 169 | xbase_close($db); |
| 173 | 170 | } |
| ... | ... | @@ -215,12 +212,7 @@ $projecao - código epsg da proje&ccedil;&atilde;o das coordenadas |
| 215 | 212 | { |
| 216 | 213 | if(!$this->layer){return "erro";} |
| 217 | 214 | if($this->dbaseExiste == false){ |
| 218 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")){ | |
| 219 | - include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php"); | |
| 220 | - } | |
| 221 | - else{ | |
| 222 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 223 | - } | |
| 215 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 224 | 216 | } |
| 225 | 217 | |
| 226 | 218 | $xy = explode(" ",$xy); |
| ... | ... | @@ -489,8 +481,8 @@ $para - linha|poligono |
| 489 | 481 | $tipos = MS_SHAPE_LINE; |
| 490 | 482 | if ($para == "poligono") |
| 491 | 483 | { |
| 492 | - $tipol = MS_SHP_POLYGON; | |
| 493 | - $tipos = MS_SHAPE_POLYGON; | |
| 484 | + $tipol = MS_SHP_POLYGON; | |
| 485 | + $tipos = MS_SHAPE_POLYGON; | |
| 494 | 486 | } |
| 495 | 487 | $novonomelayer = nomeRandomico(); |
| 496 | 488 | $nomeshp = $diretorio."/".$novonomelayer; |
| ... | ... | @@ -505,10 +497,7 @@ $para - linha|poligono |
| 505 | 497 | //para manipular dbf |
| 506 | 498 | if($this->dbaseExiste == false) |
| 507 | 499 | { |
| 508 | - if(file_exists($this->locaplic."/pacotes/phpxbase/api_conversion.php")) | |
| 509 | - {include_once($this->locaplic."/pacotes/phpxbase/api_conversion.php");} | |
| 510 | - else | |
| 511 | - {include_once "../pacotes/phpxbase/api_conversion.php";} | |
| 500 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 512 | 501 | $db = xbase_create($nomeshp.".dbf", $def); |
| 513 | 502 | } |
| 514 | 503 | else | ... | ... |
classesphp/funcoes_gerais.php
| ... | ... | @@ -991,12 +991,12 @@ function buscaRapida($servico,$palavra) |
| 991 | 991 | //error_reporting(0); |
| 992 | 992 | if(!function_exists('preg_match')) |
| 993 | 993 | { |
| 994 | - include_once('../pacotes/SOAPdepreciado/nusoap.php'); | |
| 994 | + include_once(dirname(__FILE__).'/../pacotes/SOAPdepreciado/nusoap.php'); | |
| 995 | 995 | new Xsoapclient($servico."?wsdl","wsdl"); |
| 996 | 996 | } |
| 997 | 997 | else |
| 998 | 998 | { |
| 999 | - include_once('../pacotes/SOAP/nusoap.php'); | |
| 999 | + include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php'); | |
| 1000 | 1000 | $soapclient = new nusoap_client($servico); |
| 1001 | 1001 | } |
| 1002 | 1002 | //echo $soapclient->getDebug(); |
| ... | ... | @@ -1382,7 +1382,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
| 1382 | 1382 | include_once($locaplic."/pacotes/phpxbase/api_conversion.php"); |
| 1383 | 1383 | } |
| 1384 | 1384 | else{ |
| 1385 | - include_once "../pacotes/phpxbase/api_conversion.php"; | |
| 1385 | + include_once dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"; | |
| 1386 | 1386 | } |
| 1387 | 1387 | $map = @ms_newMapObj($map_file); |
| 1388 | 1388 | $layer = $map->getlayerbyname($tema); |
| ... | ... | @@ -1572,7 +1572,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) |
| 1572 | 1572 | include($locaplic."/ms_configura.php"); |
| 1573 | 1573 | } |
| 1574 | 1574 | else{ |
| 1575 | - include("../ms_configura.php"); | |
| 1575 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
| 1576 | 1576 | } |
| 1577 | 1577 | $versao = versao(); |
| 1578 | 1578 | $versao = $versao["principal"]; |
| ... | ... | @@ -1836,10 +1836,7 @@ function verificaDBF($arq){ |
| 1836 | 1836 | if(function_exists("dbase_open")) |
| 1837 | 1837 | $db = dbase_open($arq, 0); |
| 1838 | 1838 | else{ |
| 1839 | - if(file_exists("../../pacotes/phpxbase/api_conversion.php")) | |
| 1840 | - {include_once("../../pacotes/phpxbase/api_conversion.php");} | |
| 1841 | - else | |
| 1842 | - {include_once "../pacotes/phpxbase/api_conversion.php";} | |
| 1839 | + include_once (dirname(__FILE__)."/../pacotes/phpxbase/api_conversion.php"); | |
| 1843 | 1840 | $db = xbase_open($arq, 0); |
| 1844 | 1841 | } |
| 1845 | 1842 | //nas versões novas do PHP open retorna vazio, não dá pra verificar |
| ... | ... | @@ -1998,15 +1995,7 @@ function autoClasses(&$nlayer,$mapa,$locaplic=null) |
| 1998 | 1995 | { |
| 1999 | 1996 | $postgis_mapa = ""; |
| 2000 | 1997 | $substituicon = "nao"; |
| 2001 | - if(!isset($locaplic)) | |
| 2002 | - { | |
| 2003 | - if(file_exists("ms_configura.php")) | |
| 2004 | - include("ms_configura.php"); | |
| 2005 | - else | |
| 2006 | - include("../ms_configura.php"); | |
| 2007 | - } | |
| 2008 | - else | |
| 2009 | - {include_once("$locaplic/ms_configura.php");} | |
| 1998 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
| 2010 | 1999 | if ($nlayer->connectiontype == MS_POSTGIS) |
| 2011 | 2000 | { |
| 2012 | 2001 | if ($nlayer->connection == " ") |
| ... | ... | @@ -2266,10 +2255,11 @@ function cpjson($obj){ |
| 2266 | 2255 | echojson(array2json($obj)); |
| 2267 | 2256 | } |
| 2268 | 2257 | else{ |
| 2269 | - include_once("../pacotes/cpaint/cpaint2.inc.php"); | |
| 2258 | + include_once(dirname(__FILE__)."/../pacotes/cpaint/cpaint2.inc.php"); | |
| 2270 | 2259 | $cp = new cpaint(); |
| 2271 | 2260 | $cp->set_data($obj); |
| 2272 | 2261 | $cp->return_data(); |
| 2262 | + exit; | |
| 2273 | 2263 | } |
| 2274 | 2264 | } |
| 2275 | 2265 | /* | ... | ... |
classesphp/mapa_controle.php
| ... | ... | @@ -173,16 +173,14 @@ if($funcao == "criaMapa"){ |
| 173 | 173 | //primeiro é necessário carregar o ms_configura.php para pegar a variável $locaplic |
| 174 | 174 | // |
| 175 | 175 | $d = ""; |
| 176 | - if(!file_exists("ms_configura.php")) | |
| 177 | - {$d = "../";} | |
| 178 | - include_once($d."ms_configura.php"); | |
| 176 | + include_once(dirname(__FILE__)."/../ms_configura.php"); | |
| 179 | 177 | // |
| 180 | 178 | //é necessário mudar o diretório em função dos includes que são feitos pelo ms_criamapa.php |
| 181 | 179 | // |
| 182 | - chdir($locaplic); | |
| 180 | + //chdir($locaplic); | |
| 183 | 181 | $interfaceTemp = $interface; |
| 184 | 182 | $interface = "mashup"; |
| 185 | - include_once("ms_criamapa.php"); | |
| 183 | + include_once(dirname(__FILE__)."/../ms_criamapa.php"); | |
| 186 | 184 | $_SESSION["interface"] = $interfaceTemp; |
| 187 | 185 | $temp = $_SESSION["map_file"]; |
| 188 | 186 | $id = session_id(); |
| ... | ... | @@ -893,7 +891,7 @@ Gera os arquivos para download de um tema for&ccedil;ando um mapfile vazio. |
| 893 | 891 | case "DOWNLOAD3": |
| 894 | 892 | //caso o tema tenha de vir do sistema de metadados estatisticos |
| 895 | 893 | if(isset($id_medida_variavel) && $id_medida_variavel != ""){ |
| 896 | - include("../admin/php/classe_metaestat.php"); | |
| 894 | + include(dirname(__FILE__)."/../admin/php/classe_metaestat.php"); | |
| 897 | 895 | $m = new Metaestat(); |
| 898 | 896 | $m->nomecache = "ogcmetaestat".$id_medida_variavel; |
| 899 | 897 | $tema = $m->mapfileMedidaVariavel($id_medida_variavel,"",1,"","","","","","",true); |
| ... | ... | @@ -1747,7 +1745,7 @@ Altera a extens&atilde;o geogr&aacute;fica do mapa. |
| 1747 | 1745 | <classe_navegacao.php> |
| 1748 | 1746 | */ |
| 1749 | 1747 | /* |
| 1750 | - Valor: MARCADORES2SHP | |
| 1748 | +Valor: MARCADORES2SHP | |
| 1751 | 1749 | |
| 1752 | 1750 | Converte marcadores em shapefile |
| 1753 | 1751 | */ |
| ... | ... | @@ -2129,7 +2127,7 @@ Pega a lista de drives registrados para o usu&aacute;rio atual. |
| 2129 | 2127 | A lista de drives é definida no ms_configura e permite que o usuário navegue pelos arquivos do servidor. |
| 2130 | 2128 | */ |
| 2131 | 2129 | case "LISTADRIVES": |
| 2132 | - include("../ms_configura.php"); | |
| 2130 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
| 2133 | 2131 | //verifica se está cadastrado |
| 2134 | 2132 | $ipcliente = pegaIPcliente(); |
| 2135 | 2133 | $retorno = array(); | ... | ... |
classesphp/parse_cgi.php
| ... | ... | @@ -61,7 +61,7 @@ session_start(); |
| 61 | 61 | $mapext = $temp; |
| 62 | 62 | $map_file = $_SESSION["map_file"]; |
| 63 | 63 | |
| 64 | -include("../ms_configura.php"); | |
| 64 | +include(dirname(__FILE__)."/../ms_configura.php"); | |
| 65 | 65 | if(isset($fingerprint)) |
| 66 | 66 | { |
| 67 | 67 | if (md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id()) != $fingerprint) |
| ... | ... | @@ -95,7 +95,7 @@ foreach ($layersNames as $layerName) |
| 95 | 95 | for($j=0;$j<$nestilos;++$j){ |
| 96 | 96 | $estilo = $classe->getstyle($j); |
| 97 | 97 | $estilo->set("symbolname","pt1"); |
| 98 | - } | |
| 98 | + } | |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | } | ... | ... |
classesphp/wmswfs.php
| ... | ... | @@ -55,7 +55,7 @@ function gravaCacheWMS($servico) |
| 55 | 55 | { |
| 56 | 56 | global $dir_tmp; |
| 57 | 57 | if($dir_tmp == "") |
| 58 | - {include("../ms_configura.php");} | |
| 58 | + {include(dirname(__FILE__)."/../ms_configura.php");} | |
| 59 | 59 | error_reporting(0); |
| 60 | 60 | try{ |
| 61 | 61 | $teste = explode("=",$servico); |
| ... | ... | @@ -333,9 +333,9 @@ function temaswms() |
| 333 | 333 | # Test that the capabilites file has successfully downloaded. |
| 334 | 334 | # |
| 335 | 335 | //$wms_service_request = "c://temp//teste.xml"; |
| 336 | - include_once("../admin/php/admin.php"); | |
| 336 | + include_once(dirname(__FILE__)."/../admin/php/admin.php"); | |
| 337 | 337 | |
| 338 | - include_once("../admin/php/webservices.php"); | |
| 338 | + include_once(dirname(__FILE__)."/../admin/php/webservices.php"); | |
| 339 | 339 | |
| 340 | 340 | //error_reporting(0); |
| 341 | 341 | if($wms_service_request == "erro") { |
| ... | ... | @@ -474,8 +474,8 @@ function listaLayersWMS() |
| 474 | 474 | } |
| 475 | 475 | //para o caso do sistema de metadados estatisticos |
| 476 | 476 | $wms_service_request = gravaCacheWMS($servico); |
| 477 | - include_once("../admin/php/admin.php"); | |
| 478 | - include_once("../admin/php/webservices.php"); | |
| 477 | + include_once(dirname(__FILE__)."/../admin/php/admin.php"); | |
| 478 | + include_once(dirname(__FILE__)."/../admin/php/webservices.php"); | |
| 479 | 479 | error_reporting(0); |
| 480 | 480 | if($tipo_ws != "WMSMETAESTAT" && $nivel < 2){ |
| 481 | 481 | if($wms_service_request == "erro") { | ... | ... |
classesphp/wscliente.php
| ... | ... | @@ -48,9 +48,9 @@ http://localhost/i3geo/classesphp/wscliente.php?funcao=listaRSSws&rss=http://loc |
| 48 | 48 | */ |
| 49 | 49 | include_once("pega_variaveis.php"); |
| 50 | 50 | include_once("lews/wms_functions.php"); |
| 51 | -include_once("../pacotes/cpaint/cpaint2.inc.php"); | |
| 51 | +include_once(dirname(__FILE__)."/../pacotes/cpaint/cpaint2.inc.php"); | |
| 52 | 52 | include_once("carrega_ext.php"); |
| 53 | -include("../ms_configura.php"); | |
| 53 | +include(dirname(__FILE__)."/../ms_configura.php"); | |
| 54 | 54 | $cp = new cpaint(); |
| 55 | 55 | // |
| 56 | 56 | //busca o getcapabilities de um wms |
| ... | ... | @@ -137,7 +137,7 @@ Retorno: |
| 137 | 137 | function funcoesws() |
| 138 | 138 | { |
| 139 | 139 | global $servico,$cp; |
| 140 | - include_once('../pacotes/SOAP/nusoap.php'); | |
| 140 | + include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php'); | |
| 141 | 141 | $service_request = $servico; // . "?wsdl"; |
| 142 | 142 | $service_r = file($service_request); |
| 143 | 143 | $service_r = implode("",$service_r); |
| ... | ... | @@ -239,8 +239,8 @@ function dadosWS() |
| 239 | 239 | { |
| 240 | 240 | global $param,$cp,$servico,$funcaows; |
| 241 | 241 | //ini_set("memory_limit","28M"); |
| 242 | - include_once('../pacotes/SOAP/nusoap.php'); | |
| 243 | - include_once("../pacotes/SOAP/easy_parser.inc"); | |
| 242 | + include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php'); | |
| 243 | + include_once(dirname(__FILE__)."/../pacotes/SOAP/easy_parser.inc"); | |
| 244 | 244 | $soapclient = new Xsoapclient($servico."?wsdl","wsdl"); |
| 245 | 245 | $retorna = "erro"; |
| 246 | 246 | $parametros = ""; |
| ... | ... | @@ -309,7 +309,7 @@ function parFuncoesws() |
| 309 | 309 | { |
| 310 | 310 | global $cp,$servico,$funcaows; |
| 311 | 311 | $retorna = array(); |
| 312 | - include_once('../pacotes/SOAP/nusoap.php'); | |
| 312 | + include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php'); | |
| 313 | 313 | $service_request = $servico; // . "?wsdl"; |
| 314 | 314 | $service_r = file($service_request); |
| 315 | 315 | $service_r = implode("",$service_r); |
| ... | ... | @@ -551,7 +551,7 @@ Retorno: |
| 551 | 551 | function listaRSSws() |
| 552 | 552 | { |
| 553 | 553 | global $cp,$rss; |
| 554 | - require('../pacotes/magpierss/rss_fetch.inc'); | |
| 554 | + require(dirname(__FILE__).'/../pacotes/magpierss/rss_fetch.inc'); | |
| 555 | 555 | $rsss = explode("|",$rss); |
| 556 | 556 | $erro = "Erro. Nao foi possivel ler o arquivo"; |
| 557 | 557 | foreach ($rsss as $r) | ... | ... |
exemplos/executafuncao.php
ferramentas/aplicarsld/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 3 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 4 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 4 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | error_reporting(0); |
| 6 | 6 | session_name("i3GeoPHP"); |
| 7 | 7 | if (isset($g_sid)) |
| ... | ... | @@ -22,7 +22,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 22 | 22 | if (isset($_FILES['i3GEOaplicarsld']['name'])) |
| 23 | 23 | { |
| 24 | 24 | //$ndir = dirname($filen); |
| 25 | - require_once ("../../ms_configura.php"); | |
| 25 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 26 | 26 | $mapa = ms_newMapObj($map_file); |
| 27 | 27 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 28 | 28 | $dirmap = dirname($map_file); |
| ... | ... | @@ -57,7 +57,7 @@ if (isset($_FILES['i3GEOaplicarsld']['name'])) |
| 57 | 57 | } |
| 58 | 58 | else |
| 59 | 59 | { |
| 60 | - echo "<p class='paragrafo' >Erro ao enviar o arquivo. Talvez o tamanho do arquivo seja maior do que o permitido.</p>"; | |
| 60 | + echo "<p class='paragrafo' >Erro ao enviar o arquivo. Talvez o tamanho do arquivo seja maior do que o permitido.</p>"; | |
| 61 | 61 | } |
| 62 | 62 | paraAguarde(); |
| 63 | 63 | function paraAguarde(){ | ... | ... |
ferramentas/buscafotos/funcoes.php
| 1 | 1 | <?php |
| 2 | 2 | error_reporting(0); |
| 3 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 4 | -require_once("../../pacotes/cpaint/cpaint2.inc.php"); | |
| 5 | -require_once("../../ms_configura.php"); | |
| 6 | -require_once("../../pacotes/phpflickr/phpFlickr.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 4 | +require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); | |
| 5 | +require_once(dirname(__FILE__)."/../../ms_configura.php"); | |
| 6 | +require_once(dirname(__FILE__)."/../../pacotes/phpflickr/phpFlickr.php"); | |
| 7 | 7 | error_reporting(0); |
| 8 | 8 | $cp = new cpaint(); |
| 9 | 9 | if($funcao == "listafotosflickr") | ... | ... |
ferramentas/buscarapida/gadget.php
| 1 | 1 | <?php |
| 2 | -include_once("../../classesphp/pega_variaveis.php"); | |
| 2 | +include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | 3 | if(!isset($palavra)) |
| 4 | 4 | {echo "Parâmetro &palavra= não foi definido. 'palavra' é a palavra que será buscada";} |
| 5 | 5 | if(!isset($locaplic)) |
| 6 | 6 | {echo "<br>Parâmetro &locaplic= não foi definido. 'locaplic' indica onde o i3geo está instalado";} |
| 7 | 7 | ?> |
| 8 | 8 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 9 | - <head> | |
| 10 | - <link rel="stylesheet" type="text/css" href="../../css/ferramentas.css"></link> | |
| 11 | - <link rel="stylesheet" type="text/css" href="../../css/botoes.css"></link> | |
| 12 | - <title></title> | |
| 13 | - </head> | |
| 14 | - <body class="yui-skin-sam;" style="overflow:auto;"> | |
| 9 | + <head> | |
| 10 | + <link rel="stylesheet" type="text/css" href="../../css/ferramentas.css"></link> | |
| 11 | + <link rel="stylesheet" type="text/css" href="../../css/botoes.css"></link> | |
| 12 | + <title></title> | |
| 13 | + </head> | |
| 14 | + <body class="yui-skin-sam;" style="overflow:auto;"> | |
| 15 | 15 | <div style="top:5px;left:1px;display:block;width:90%;" id="resultado" >Aguarde...</div> |
| 16 | 16 | <script src="../../classesjs/i3geo.js" type="text/javascript"></script> |
| 17 | - <script type="text/javascript" src="index.js"></script> | |
| 17 | + <script type="text/javascript" src="index.js"></script> | |
| 18 | 18 | |
| 19 | 19 | <script type="text/javascript"> |
| 20 | 20 | i3GEObuscaRapida.idresultado |
| ... | ... | @@ -32,8 +32,8 @@ var mapaLugar = function(wkt,layer,gid,nm) |
| 32 | 32 | } |
| 33 | 33 | i3GEObuscaRapida.funcaozoom = "mapaLugar" |
| 34 | 34 | i3GEObuscaRapida.inicia("<?php echo $palavra;?>","<?php echo $locaplic;?>",i3GEObuscaRapida.montaResultado,true,false) |
| 35 | - </script> | |
| 35 | + </script> | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | - </body> | |
| 38 | + </body> | |
| 39 | 39 | </html> |
| 40 | 40 | \ No newline at end of file | ... | ... |
ferramentas/carregamapa/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 3 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 4 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 4 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | session_name("i3GeoPHP"); |
| 6 | 6 | if (isset($g_sid)) |
| 7 | 7 | {session_id($g_sid);} |
| ... | ... | @@ -29,7 +29,7 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name'])) |
| 29 | 29 | if( (ereg('[^a-zA-Z0-9\.]',$Arquivo)) || (!ereg('\.map$',$Arquivo)) ) |
| 30 | 30 | {$statusNome = 0;} |
| 31 | 31 | if($statusNome != 1) |
| 32 | - {echo "<p class='paragrafo' >Arquivo inválido.!";paraAguarde();exit;} | |
| 32 | + {echo "<p class='paragrafo' >Arquivo inválido.!";paraAguarde();exit;} | |
| 33 | 33 | */ |
| 34 | 34 | $nome = basename($Arquivo); |
| 35 | 35 | $arqtemp = $dirmap."/".$Arquivo; |
| ... | ... | @@ -80,7 +80,7 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name'])) |
| 80 | 80 | echo "<p class='paragrafo' >Ok. redesenhando."; |
| 81 | 81 | echo "<script>window.parent.i3GEO.atualiza();</script>"; |
| 82 | 82 | echo "<script>window.parent.i3GEO.navega.zoomExt(window.parent.i3GEO.configura.locaplic,window.parent.i3GEO.configura.sid,'nenhum','".$extatual."');</script>"; |
| 83 | - | |
| 83 | + | |
| 84 | 84 | } |
| 85 | 85 | else |
| 86 | 86 | {echo "<p class='paragrafo' >Erro ao enviar o arquivo.";} | ... | ... |
ferramentas/comentarios/index.php
| ... | ... | @@ -63,13 +63,13 @@ function formularioInsere() |
| 63 | 63 | function listaComentarios() |
| 64 | 64 | { |
| 65 | 65 | $locaplic = "../.."; |
| 66 | - include("../../admin/php/conexao.php"); | |
| 66 | + include(dirname(__FILE__)."/../../admin/php/conexao.php"); | |
| 67 | 67 | if(!empty($esquemaadmin)){ |
| 68 | 68 | $esquemaadmin = str_replace(".","",$esquemaadmin)."."; |
| 69 | 69 | } |
| 70 | 70 | $data = gmdate("d-m-Y\TH:i:s\Z"); |
| 71 | 71 | $id_tema = $dbh->query("select * from ".$esquemaadmin."i3geoadmin_temas where codigo_tema = '".$_SESSION["tema"]."' ",PDO::FETCH_ASSOC); |
| 72 | - $id_tema = $id_tema->fetchAll(); | |
| 72 | + $id_tema = $id_tema->fetchAll(); | |
| 73 | 73 | $id_tema = $id_tema[0]["id_tema"]; |
| 74 | 74 | $lista = $dbh->query("select * from ".$esquemaadmin."i3geoadmin_comentarios where id_tema = $id_tema ",PDO::FETCH_ASSOC); |
| 75 | 75 | $lista = $lista->fetchAll(); |
| ... | ... | @@ -86,8 +86,8 @@ function listaComentarios() |
| 86 | 86 | echo "</tr>"; |
| 87 | 87 | } |
| 88 | 88 | echo "</table><hr>"; |
| 89 | - $dbhw = null; | |
| 90 | - $dbh = null; | |
| 89 | + $dbhw = null; | |
| 90 | + $dbh = null; | |
| 91 | 91 | echo "<p><a href='../../admin/rsscomentariostemas.php'><img src='../../imagens/rss.gif' style='border:0px solid gray;' > todos os comentários</a>"; |
| 92 | 92 | echo " <a href='../../admin/rsscomentariostemas.php?id_tema=".$id_tema."'><img src='../../imagens/rss.gif' style='border:0px solid gray;' > comentários para o tema</a></p>"; |
| 93 | 93 | |
| ... | ... | @@ -95,18 +95,18 @@ function listaComentarios() |
| 95 | 95 | function gravaComentario() |
| 96 | 96 | { |
| 97 | 97 | //necessário para os includes do admin.php |
| 98 | - include_once("../../admin/php/conexao.php"); | |
| 98 | + include_once(dirname(__FILE__)."/../../admin/php/conexao.php"); | |
| 99 | 99 | if(!empty($esquemaadmin)){ |
| 100 | 100 | $esquemaadmin = str_replace(".","",$esquemaadmin)."."; |
| 101 | 101 | } |
| 102 | 102 | $data = gmdate("d-m-Y\TH:i:s\Z"); |
| 103 | 103 | $id_tema = $dbh->query("select * from ".$esquemaadmin."i3geoadmin_temas where codigo_tema = '".$_SESSION["tema"]."' ",PDO::FETCH_ASSOC); |
| 104 | - $id_tema = $id_tema->fetchAll(); | |
| 104 | + $id_tema = $id_tema->fetchAll(); | |
| 105 | 105 | $id_tema = $id_tema[0]["id_tema"]; |
| 106 | 106 | $q = "INSERT INTO ".$esquemaadmin."i3geoadmin_comentarios (comentario,data,openidnome,openidimagem,openidservico,openidusuario,openidurl,id_tema) VALUES ('".converte($_POST["novocomentario"])."','".$data."','".$_SESSION["openidnome"]."','".$_SESSION["openidimagem"]."','".$_SESSION["openidservico"]."','".$_SESSION["openidusuario"]."','".$_SESSION["openidurl"]."','".$id_tema."')"; |
| 107 | 107 | $dbhw->query($q); |
| 108 | - $dbhw = null; | |
| 109 | - $dbh = null; | |
| 108 | + $dbhw = null; | |
| 109 | + $dbh = null; | |
| 110 | 110 | } |
| 111 | 111 | function converte($texto){ |
| 112 | 112 | global $convUTF; | ... | ... |
ferramentas/congelamapa/openlayers.php
| ... | ... | @@ -9,7 +9,7 @@ if($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())){ |
| 9 | 9 | echo "erro"; |
| 10 | 10 | return; |
| 11 | 11 | } |
| 12 | -include("../../classesphp/funcoes_gerais.php"); | |
| 12 | +include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 13 | 13 | $map_file = $_SESSION["map_file"]; |
| 14 | 14 | $base = basename($map_file); |
| 15 | 15 | $dir = dirname($map_file); | ... | ... |
ferramentas/especies/pesquisa.php
| ... | ... | @@ -35,12 +35,12 @@ Free Software Foundation, Inc., no endere&ccedil;o |
| 35 | 35 | |
| 36 | 36 | */ |
| 37 | 37 | set_time_limit(180); |
| 38 | -require_once("../../pacotes/cpaint/cpaint2.inc.php"); | |
| 39 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 38 | +require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); | |
| 39 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 40 | 40 | if (function_exists('ereg')) |
| 41 | -{require_once('../../pacotes/SOAPdepreciado/nusoap.php');} | |
| 41 | +{require_once(dirname(__FILE__).'/../../pacotes/SOAPdepreciado/nusoap.php');} | |
| 42 | 42 | else |
| 43 | -{require_once('../../pacotes/SOAP/nusoap.php');} | |
| 43 | +{require_once(dirname(__FILE__).'/../../pacotes/SOAP/nusoap.php');} | |
| 44 | 44 | if (isset($g_sid)) |
| 45 | 45 | {session_id($g_sid);} |
| 46 | 46 | session_start(); |
| ... | ... | @@ -48,8 +48,8 @@ foreach(array_keys($_SESSION) as $k) |
| 48 | 48 | { |
| 49 | 49 | eval("\$".$k."='".$_SESSION[$k]."';"); |
| 50 | 50 | } |
| 51 | -require_once("../../pacotes/phpxbase/api_conversion.php"); | |
| 52 | -require_once ("../../classesphp/carrega_ext.php"); | |
| 51 | +require_once(dirname(__FILE__)."/../../pacotes/phpxbase/api_conversion.php"); | |
| 52 | +require_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 53 | 53 | $cp = new cpaint(); |
| 54 | 54 | $servico = "http://mapas.mma.gov.br/webservices/especiesws.php"; |
| 55 | 55 | |
| ... | ... | @@ -89,7 +89,7 @@ function listaBancos() |
| 89 | 89 | if (function_exists('ereg')) |
| 90 | 90 | $soapclient = new Xsoapclient($servico."?wsdl","wsdl"); |
| 91 | 91 | else |
| 92 | - $soapclient = new nusoap_client($servico); | |
| 92 | + $soapclient = new nusoap_client($servico); | |
| 93 | 93 | $resultado = $soapclient->call("natureserveDatabase",""); |
| 94 | 94 | $cp->set_data($resultado); |
| 95 | 95 | } |
| ... | ... | @@ -134,17 +134,17 @@ function adicionatema() |
| 134 | 134 | { |
| 135 | 135 | global $map_file,$dir_tmp,$imgdir,$banco,$familia,$servico,$cp,$especie,$cor,$locaplic,$imgurl; |
| 136 | 136 | $retorno = "erro."; |
| 137 | - | |
| 137 | + | |
| 138 | 138 | if (function_exists('ereg')) |
| 139 | 139 | $soapclient = new Xsoapclient($servico."?wsdl","wsdl"); |
| 140 | 140 | else |
| 141 | 141 | $soapclient = new nusoap_client($servico); |
| 142 | - | |
| 142 | + | |
| 143 | 143 | $resultado = $soapclient->call("natureserveGidEspecie",array($banco,$especie)); |
| 144 | 144 | $tabelas = $resultado["especies"]; |
| 145 | 145 | $mapa = ms_newMapObj($map_file); |
| 146 | - include("../../classesphp/classe_mapa.php"); | |
| 147 | - include("../../classesphp/funcoes_gerais.php"); | |
| 146 | + include(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); | |
| 147 | + include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 148 | 148 | $nomeslegenda["munamb1"] = "pássaros (poligonos) ".$especie; |
| 149 | 149 | $nomeslegenda["munamb2"] = "anfíbios (poligonos) ".$especie; |
| 150 | 150 | $nomeslegenda["munamb3"] = "mamíferos (poligonos) ".$especie; |
| ... | ... | @@ -157,17 +157,17 @@ function adicionatema() |
| 157 | 157 | $retorno = "ok"; |
| 158 | 158 | $nometema = explode(".",$tabela["tabela"]); |
| 159 | 159 | $tema = $nometema[1]; |
| 160 | - $servico = "http://mapas.mma.gov.br/webservices/especieswms.php?gid=".$tabela["gids"]."&cor=".$cor; | |
| 161 | - $nome = "default"; | |
| 162 | - $proj = "EPSG:4618"; | |
| 163 | - $formato = "image/png"; | |
| 164 | - $nomecamada = $nomeslegenda[$tema]; | |
| 165 | - $suportasld = "nao"; | |
| 166 | - $versao = "1.1.0"; | |
| 167 | - $tiporep = ""; | |
| 168 | - $tipo = ""; | |
| 160 | + $servico = "http://mapas.mma.gov.br/webservices/especieswms.php?gid=".$tabela["gids"]."&cor=".$cor; | |
| 161 | + $nome = "default"; | |
| 162 | + $proj = "EPSG:4618"; | |
| 163 | + $formato = "image/png"; | |
| 164 | + $nomecamada = $nomeslegenda[$tema]; | |
| 165 | + $suportasld = "nao"; | |
| 166 | + $versao = "1.1.0"; | |
| 167 | + $tiporep = ""; | |
| 168 | + $tipo = ""; | |
| 169 | 169 | $m = new Mapa($map_file); |
| 170 | - $m->adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld); | |
| 170 | + $m->adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld); | |
| 171 | 171 | $m->salva(); |
| 172 | 172 | } |
| 173 | 173 | } | ... | ... |
ferramentas/googlemaps/endereco.php
| 1 | 1 | <?php |
| 2 | -include("../../ms_configura.php"); | |
| 3 | -include_once("../../classesphp/pega_variaveis.php"); | |
| 2 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 3 | +include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 4 | 4 | ?> |
| 5 | 5 | <html> |
| 6 | 6 | <head> |
| ... | ... | @@ -8,35 +8,35 @@ include_once("../../classesphp/pega_variaveis.php"); |
| 8 | 8 | <link rel="stylesheet" type="text/css" href="../../css/i3geo_ferramentas45.css"> |
| 9 | 9 | |
| 10 | 10 | <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $googleApiKey; ?>"></script> |
| 11 | -<script type="text/javascript"> | |
| 11 | +<script type="text/javascript"> | |
| 12 | 12 | function inicializa() |
| 13 | 13 | { |
| 14 | 14 | var p2 = <?php echo $x;?>; |
| 15 | 15 | var p1 = <?php echo $y;?>; |
| 16 | 16 | ponto = new GLatLng(p1,p2) |
| 17 | - geocoder = new GClientGeocoder(); | |
| 18 | - var pt1 = function(response) | |
| 19 | - { | |
| 17 | + geocoder = new GClientGeocoder(); | |
| 18 | + var pt1 = function(response) | |
| 19 | + { | |
| 20 | 20 | if (!response || response.Status.code != 200) { |
| 21 | - var ins = "Não foi possível encontrar o endereço. Status Code:" + response.Status.code; | |
| 21 | + var ins = "Não foi possível encontrar o endereço. Status Code:" + response.Status.code; | |
| 22 | 22 | } else { |
| 23 | 23 | place = response.Placemark[0]; |
| 24 | - var ins = '<b>orig latlng:</b>' + response.name + '<br/>' | |
| 25 | - ins += '<b>latlng:</b>' + place.Point.coordinates[0] + "," + place.Point.coordinates[1] + '<br>' | |
| 26 | - ins += '<b>Status Code:</b>' + response.Status.code + '<br>' | |
| 27 | - ins += '<b>Status Request:</b>' + response.Status.request + '<br>' | |
| 28 | - ins += '<b>Address:</b>' + place.address + '<br>' | |
| 29 | - ins += '<b>Accuracy:</b>' + place.AddressDetails.Accuracy + '<br>' | |
| 30 | - ins += '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode; | |
| 31 | - ins += '<br><br>O endereço obtido é aproximado. Mais detalhes em <a href="http://nicogoeminne.googlepages.com/documentation.html" >Google</a>' | |
| 24 | + var ins = '<b>orig latlng:</b>' + response.name + '<br/>' | |
| 25 | + ins += '<b>latlng:</b>' + place.Point.coordinates[0] + "," + place.Point.coordinates[1] + '<br>' | |
| 26 | + ins += '<b>Status Code:</b>' + response.Status.code + '<br>' | |
| 27 | + ins += '<b>Status Request:</b>' + response.Status.request + '<br>' | |
| 28 | + ins += '<b>Address:</b>' + place.address + '<br>' | |
| 29 | + ins += '<b>Accuracy:</b>' + place.AddressDetails.Accuracy + '<br>' | |
| 30 | + ins += '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode; | |
| 31 | + ins += '<br><br>O endereço obtido é aproximado. Mais detalhes em <a href="http://nicogoeminne.googlepages.com/documentation.html" >Google</a>' | |
| 32 | 32 | } |
| 33 | 33 | document.getElementById("mapa").innerHTML = ins |
| 34 | - } | |
| 35 | - geocoder.getLocations(ponto, pt1); | |
| 36 | -} | |
| 34 | + } | |
| 35 | + geocoder.getLocations(ponto, pt1); | |
| 36 | +} | |
| 37 | 37 | </script> |
| 38 | - </head> | |
| 39 | - <body onload="inicializa()"> | |
| 40 | - <div id="mapa"></div> | |
| 41 | - </body> | |
| 38 | + </head> | |
| 39 | + <body onload="inicializa()"> | |
| 40 | + <div id="mapa"></div> | |
| 41 | + </body> | |
| 42 | 42 | </html> |
| 43 | 43 | \ No newline at end of file | ... | ... |
ferramentas/googlemaps/index.php
| 1 | 1 | <?php |
| 2 | -include("../../ms_configura.php"); | |
| 2 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 3 | 3 | ?> |
| 4 | 4 | <html> |
| 5 | 5 | <head> |
| ... | ... | @@ -48,28 +48,28 @@ Function: inicializa |
| 48 | 48 | |
| 49 | 49 | Cria o mapa do Google Maps e adiciona os botões especiais do i3Geo. Define os eventos que disparam modificações no mapa |
| 50 | 50 | principal do i3Geo quando é feita a navegação. |
| 51 | -*/ | |
| 51 | +*/ | |
| 52 | 52 | function inicializa(){ |
| 53 | 53 | window.parent.i3GEO.util.criaPin("boxpingoogle",window.parent.i3GEO.configura.locaplic+'/imagens/dot1red.gif',"5px","5px"); |
| 54 | 54 | var box = window.parent.$i("boxpingoogle"); |
| 55 | 55 | counterClick = 0 |
| 56 | - var m = document.getElementById("mapa") | |
| 56 | + var m = document.getElementById("mapa") | |
| 57 | 57 | if(window.parent.i3GEO){ |
| 58 | - m.style.width = (window.parent.i3GEO.parametros.w / 2) - 20 + "px"; | |
| 59 | - m.style.height = (window.parent.i3GEO.parametros.h / 2) -20 + "px"; | |
| 58 | + m.style.width = (window.parent.i3GEO.parametros.w / 2) - 20 + "px"; | |
| 59 | + m.style.height = (window.parent.i3GEO.parametros.h / 2) -20 + "px"; | |
| 60 | 60 | i3geoOverlay = false; |
| 61 | 61 | if(window.parent.document.getElementById("boxg")) |
| 62 | 62 | window.parent.document.getElementById("boxg").style.zIndex = 0 |
| 63 | - navm = false; // IE | |
| 64 | - navn = false; // netscape | |
| 65 | - var app = navigator.appName.substring(0,1); | |
| 66 | - if (app=='N') navn=true; else navm=true; | |
| 67 | - docmapa = window.parent.document | |
| 68 | - pol = window.parent.i3GEO.parametros.mapexten | |
| 69 | - ret = pol.split(" ") | |
| 70 | - pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1 | |
| 71 | - pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1 | |
| 72 | - pt = pt1+","+pt2 | |
| 63 | + navm = false; // IE | |
| 64 | + navn = false; // netscape | |
| 65 | + var app = navigator.appName.substring(0,1); | |
| 66 | + if (app=='N') navn=true; else navm=true; | |
| 67 | + docmapa = window.parent.document | |
| 68 | + pol = window.parent.i3GEO.parametros.mapexten | |
| 69 | + ret = pol.split(" ") | |
| 70 | + pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1 | |
| 71 | + pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1 | |
| 72 | + pt = pt1+","+pt2 | |
| 73 | 73 | try{ |
| 74 | 74 | var coordenadas = window.parent.i3GEO.navega.dialogo.google.coordenadas; |
| 75 | 75 | } |
| ... | ... | @@ -79,38 +79,38 @@ function inicializa(){ |
| 79 | 79 | var pt1 = -54; |
| 80 | 80 | var pt2 = -12; |
| 81 | 81 | } |
| 82 | - map = new GMap2(m); | |
| 83 | - map.setMapType(G_SATELLITE_MAP); | |
| 84 | - map.addMapType(G_SATELLITE_3D_MAP); | |
| 85 | - map.addControl(new GLargeMapControl()); | |
| 86 | - map.addControl(new GMapTypeControl()); | |
| 87 | - map.addControl(new GScaleControl()); | |
| 88 | - map.setCenter(new GLatLng(pt2,pt1), 8); | |
| 82 | + map = new GMap2(m); | |
| 83 | + map.setMapType(G_SATELLITE_MAP); | |
| 84 | + map.addMapType(G_SATELLITE_3D_MAP); | |
| 85 | + map.addControl(new GLargeMapControl()); | |
| 86 | + map.addControl(new GMapTypeControl()); | |
| 87 | + map.addControl(new GScaleControl()); | |
| 88 | + map.setCenter(new GLatLng(pt2,pt1), 8); | |
| 89 | 89 | if(coordenadas) |
| 90 | 90 | {adicionaMarcasMapa(coordenadas);} |
| 91 | - GEvent.addListener(map, "moveend", function() { | |
| 92 | - ondegoogle(map); | |
| 93 | - }); | |
| 94 | - GEvent.addListener(map, "zoomend", function() { | |
| 91 | + GEvent.addListener(map, "moveend", function() { | |
| 92 | + ondegoogle(map); | |
| 93 | + }); | |
| 94 | + GEvent.addListener(map, "zoomend", function() { | |
| 95 | 95 | if(window.parent.i3GEO){ |
| 96 | - ondegoogle(); | |
| 97 | - try{ | |
| 96 | + ondegoogle(); | |
| 97 | + try{ | |
| 98 | 98 | map.removeOverlay(wmsmap); |
| 99 | 99 | wmsmap = new GGroundOverlay(criaWMS(), map.getBounds()); |
| 100 | 100 | map.addOverlay(wmsmap); |
| 101 | - }catch(x){} | |
| 101 | + }catch(x){} | |
| 102 | 102 | } |
| 103 | - }); | |
| 104 | - GEvent.addListener(map, "dragend", function() { | |
| 103 | + }); | |
| 104 | + GEvent.addListener(map, "dragend", function() { | |
| 105 | 105 | if(window.parent.i3GEO){ |
| 106 | 106 | ondegoogle(); |
| 107 | 107 | try{ |
| 108 | 108 | map.removeOverlay(wmsmap); |
| 109 | - wmsmap = new GGroundOverlay(criaWMS(), map.getBounds()); | |
| 109 | + wmsmap = new GGroundOverlay(criaWMS(), map.getBounds()); | |
| 110 | 110 | map.addOverlay(wmsmap); |
| 111 | 111 | }catch(x){} |
| 112 | 112 | } |
| 113 | - }); | |
| 113 | + }); | |
| 114 | 114 | GEvent.addListener(map, "mousemove", function(ponto) { |
| 115 | 115 | var teladms,tela,temp, |
| 116 | 116 | mapexten = window.parent.i3GEO.parametros.mapexten; |
| ... | ... | @@ -129,7 +129,7 @@ function inicializa(){ |
| 129 | 129 | window.parent.i3GEO.eventos.mousemoveMapa(); |
| 130 | 130 | if(window.parent.i3GEO.Interface.ATUAL === "googleearth") |
| 131 | 131 | {return;} |
| 132 | - temp = mapexten.split(" "); | |
| 132 | + temp = mapexten.split(" "); | |
| 133 | 133 | if(ponto.x < temp[2] && ponto.y < temp[3]){ |
| 134 | 134 | xy = window.parent.i3GEO.calculo.dd2tela(ponto.x,ponto.y,window.parent.document.getElementById(window.parent.i3GEO.Interface.IDMAPA),mapexten,window.parent.i3GEO.parametros.pixelsize); |
| 135 | 135 | box.style.display = "block"; |
| ... | ... | @@ -140,15 +140,15 @@ function inicializa(){ |
| 140 | 140 | } |
| 141 | 141 | }); |
| 142 | 142 | function botaoI3geo() {} |
| 143 | - botaoI3geo.prototype = new GControl(); | |
| 144 | - botaoI3geo.prototype.initialize = function(map) { | |
| 143 | + botaoI3geo.prototype = new GControl(); | |
| 144 | + botaoI3geo.prototype.initialize = function(map) { | |
| 145 | 145 | var container = document.createElement("div"); |
| 146 | 146 | var i3geo = document.createElement("div"); |
| 147 | 147 | this.setButtonStyle_(i3geo); |
| 148 | - container.appendChild(i3geo); | |
| 149 | - i3geo.appendChild(document.createTextNode("i3Geo")); | |
| 150 | - GEvent.addDomListener(i3geo, "click", function() { | |
| 151 | - //ativaI3geo(); | |
| 148 | + container.appendChild(i3geo); | |
| 149 | + i3geo.appendChild(document.createTextNode("i3Geo")); | |
| 150 | + GEvent.addDomListener(i3geo, "click", function() { | |
| 151 | + //ativaI3geo(); | |
| 152 | 152 | try |
| 153 | 153 | {map.removeOverlay(wmsmap);wmsmap = null;} |
| 154 | 154 | catch(x){ |
| ... | ... | @@ -156,38 +156,38 @@ function inicializa(){ |
| 156 | 156 | map.addOverlay(wmsmap); |
| 157 | 157 | if(typeof(console) !== 'undefined'){console.error(x);} |
| 158 | 158 | } |
| 159 | - }); | |
| 159 | + }); | |
| 160 | 160 | |
| 161 | - var rota = document.createElement("div"); | |
| 162 | - this.setButtonStyle_(rota); | |
| 163 | - container.appendChild(rota); | |
| 164 | - rota.appendChild(document.createTextNode("Rota")); | |
| 165 | - GEvent.addDomListener(rota, "click", function() { | |
| 166 | - ativaI3geoRota(); | |
| 167 | - }); | |
| 168 | - map.getContainer().appendChild(container); | |
| 169 | - return container; | |
| 170 | - } | |
| 171 | - botaoI3geo.prototype.getDefaultPosition = function() { | |
| 172 | - return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(50, 50)); | |
| 173 | - } | |
| 174 | - botaoI3geo.prototype.setButtonStyle_ = function(button) { | |
| 175 | - button.style.textDecoration = "none"; | |
| 176 | - button.style.color = "black"; | |
| 177 | - button.style.backgroundColor = "white"; | |
| 178 | - button.style.font = "small Arial"; | |
| 179 | - button.style.border = "1px solid black"; | |
| 180 | - button.style.padding = "1px"; | |
| 181 | - button.style.marginBottom = "3px"; | |
| 182 | - button.style.textAlign = "center"; | |
| 183 | - button.style.width = "3em"; | |
| 184 | - button.style.cursor = "pointer"; | |
| 185 | - } | |
| 186 | - if(window.parent.i3GEO){ | |
| 187 | - if(window.parent.i3GEO.parametros.mapfile) | |
| 161 | + var rota = document.createElement("div"); | |
| 162 | + this.setButtonStyle_(rota); | |
| 163 | + container.appendChild(rota); | |
| 164 | + rota.appendChild(document.createTextNode("Rota")); | |
| 165 | + GEvent.addDomListener(rota, "click", function() { | |
| 166 | + ativaI3geoRota(); | |
| 167 | + }); | |
| 168 | + map.getContainer().appendChild(container); | |
| 169 | + return container; | |
| 170 | + } | |
| 171 | + botaoI3geo.prototype.getDefaultPosition = function() { | |
| 172 | + return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(50, 50)); | |
| 173 | + } | |
| 174 | + botaoI3geo.prototype.setButtonStyle_ = function(button) { | |
| 175 | + button.style.textDecoration = "none"; | |
| 176 | + button.style.color = "black"; | |
| 177 | + button.style.backgroundColor = "white"; | |
| 178 | + button.style.font = "small Arial"; | |
| 179 | + button.style.border = "1px solid black"; | |
| 180 | + button.style.padding = "1px"; | |
| 181 | + button.style.marginBottom = "3px"; | |
| 182 | + button.style.textAlign = "center"; | |
| 183 | + button.style.width = "3em"; | |
| 184 | + button.style.cursor = "pointer"; | |
| 185 | + } | |
| 186 | + if(window.parent.i3GEO){ | |
| 187 | + if(window.parent.i3GEO.parametros.mapfile) | |
| 188 | 188 | map.addControl(new botaoI3geo()); |
| 189 | 189 | ondegoogle(map); |
| 190 | - } | |
| 190 | + } | |
| 191 | 191 | if(coordenadas) |
| 192 | 192 | {adicionaMarcasMapa(coordenadas);} |
| 193 | 193 | } |
| ... | ... | @@ -214,7 +214,7 @@ function ondegoogle() |
| 214 | 214 | var ne = bd.getNorthEast(); |
| 215 | 215 | var xyMin = window.parent.i3GEO.calculo.dd2tela(so.lng(),so.lat(),window.parent.document.getElementById(window.parent.i3GEO.Interface.IDMAPA),window.parent.i3GEO.parametros.mapexten,window.parent.i3GEO.parametros.pixelsize); |
| 216 | 216 | var xyMax = window.parent.i3GEO.calculo.dd2tela(ne.lng(),ne.lat(),window.parent.document.getElementById(window.parent.i3GEO.Interface.IDMAPA),window.parent.i3GEO.parametros.mapexten,window.parent.i3GEO.parametros.pixelsize); |
| 217 | - | |
| 217 | + | |
| 218 | 218 | var box = window.parent.$i("boxg") |
| 219 | 219 | var w = xyMax[0]-xyMin[0] |
| 220 | 220 | var h = xyMin[1]-xyMax[1] |
| ... | ... | @@ -284,14 +284,14 @@ function criaTile(){ |
| 284 | 284 | parametros += '&mode=tile'; |
| 285 | 285 | parametros += '&tilemode=gmap'; |
| 286 | 286 | parametros += '&tile={X}+{Y}+{Z}'; |
| 287 | - return(cgi+parametros); | |
| 287 | + return(cgi+parametros); | |
| 288 | 288 | } |
| 289 | 289 | function ativaI3geo() |
| 290 | 290 | { |
| 291 | 291 | var i3GEOTile = new GTileLayer(null,0,18,{ |
| 292 | - tileUrlTemplate:criaTile(), | |
| 293 | - isPng:true, | |
| 294 | - opacity:1 }); | |
| 292 | + tileUrlTemplate:criaTile(), | |
| 293 | + isPng:true, | |
| 294 | + opacity:1 }); | |
| 295 | 295 | i3GEOTileO = new GTileLayerOverlay(i3GEOTile); |
| 296 | 296 | map.addOverlay(i3GEOTileO); |
| 297 | 297 | } |
| ... | ... | @@ -314,7 +314,7 @@ Obt&eacute;m os parâmetros para cria&ccedil;&atilde;o da rota, inclusive o ponto |
| 314 | 314 | function parametrosRota(overlay,latlng) |
| 315 | 315 | { |
| 316 | 316 | if(counterClick == 1) |
| 317 | - { | |
| 317 | + { | |
| 318 | 318 | counterClick++; |
| 319 | 319 | i3GEO.janela.tempoMsg("Clique o ponto de destino da rota"); |
| 320 | 320 | pontoRota1 = latlng |
| ... | ... | @@ -357,9 +357,9 @@ function constroiRota() |
| 357 | 357 | } |
| 358 | 358 | } |
| 359 | 359 | } |
| 360 | - | |
| 360 | + | |
| 361 | 361 | var pt1 = function(response) |
| 362 | - { | |
| 362 | + { | |
| 363 | 363 | map.clearOverlays(); |
| 364 | 364 | if (!response || response.Status.code != 200) { |
| 365 | 365 | i3GEO.janela.tempoMsg("Status Code:" + response.Status.code); |
| ... | ... | @@ -368,7 +368,7 @@ function constroiRota() |
| 368 | 368 | point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]); |
| 369 | 369 | marker = new GMarker(point); |
| 370 | 370 | marker.openInfoWindowHtml( |
| 371 | - '<b>orig latlng:</b>' + response.name + '<br/>' + | |
| 371 | + '<b>orig latlng:</b>' + response.name + '<br/>' + | |
| 372 | 372 | '<b>latlng:</b>' + place.Point.coordinates[0] + "," + place.Point.coordinates[1] + '<br>' + |
| 373 | 373 | '<b>Status Code:</b>' + response.Status.code + '<br>' + |
| 374 | 374 | '<b>Status Request:</b>' + response.Status.request + '<br>' + |
| ... | ... | @@ -423,7 +423,7 @@ function montaRota() |
| 423 | 423 | { |
| 424 | 424 | var cp = new cpaint(); |
| 425 | 425 | cp.set_response_type("JSON"); |
| 426 | - //cp.set_debug(2) | |
| 426 | + //cp.set_debug(2) | |
| 427 | 427 | var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+window.parent.i3GEO.configura.sid+"&funcao=sphPT2shp¶=linha&tema="+temaNovo; |
| 428 | 428 | cp.call(p,"sphPT2shp",window.parent.i3GEO.atualiza); |
| 429 | 429 | cursor("default"); |
| ... | ... | @@ -464,9 +464,9 @@ function cursor(c){ |
| 464 | 464 | var d = document.getElementById("mapa"); |
| 465 | 465 | d.firstChild.style.cursor = c; |
| 466 | 466 | } |
| 467 | - </script> | |
| 468 | - </head> | |
| 469 | - <body onload="inicializa()"> | |
| 470 | - <div id="mapa" style="width: 440px; height: 340px"></div> | |
| 471 | - </body> | |
| 467 | + </script> | |
| 468 | + </head> | |
| 469 | + <body onload="inicializa()"> | |
| 470 | + <div id="mapa" style="width: 440px; height: 340px"></div> | |
| 471 | + </body> | |
| 472 | 472 | </html> |
| 473 | 473 | \ No newline at end of file | ... | ... |
ferramentas/googlemaps1/endereco.php
| 1 | 1 | <?php |
| 2 | -include("../../ms_configura.php"); | |
| 3 | -include_once("../../classesphp/pega_variaveis.php"); | |
| 2 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 3 | +include_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 4 | 4 | ?> |
| 5 | 5 | <html> |
| 6 | 6 | <head> |
| ... | ... | @@ -8,35 +8,35 @@ include_once("../../classesphp/pega_variaveis.php"); |
| 8 | 8 | <link rel="stylesheet" type="text/css" href="../../css/i3geo_ferramentas45.css"> |
| 9 | 9 | |
| 10 | 10 | <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $googleApiKey; ?>"></script> |
| 11 | -<script type="text/javascript"> | |
| 11 | +<script type="text/javascript"> | |
| 12 | 12 | function inicializa() |
| 13 | 13 | { |
| 14 | 14 | var p2 = <?php echo $x;?>; |
| 15 | 15 | var p1 = <?php echo $y;?>; |
| 16 | 16 | ponto = new GLatLng(p1,p2) |
| 17 | - geocoder = new GClientGeocoder(); | |
| 18 | - var pt1 = function(response) | |
| 19 | - { | |
| 17 | + geocoder = new GClientGeocoder(); | |
| 18 | + var pt1 = function(response) | |
| 19 | + { | |
| 20 | 20 | if (!response || response.Status.code != 200) { |
| 21 | - var ins = "Não foi possível encontrar o endereço. Status Code:" + response.Status.code; | |
| 21 | + var ins = "Não foi possível encontrar o endereço. Status Code:" + response.Status.code; | |
| 22 | 22 | } else { |
| 23 | 23 | place = response.Placemark[0]; |
| 24 | - var ins = '<b>orig latlng:</b>' + response.name + '<br/>' | |
| 25 | - ins += '<b>latlng:</b>' + place.Point.coordinates[0] + "," + place.Point.coordinates[1] + '<br>' | |
| 26 | - ins += '<b>Status Code:</b>' + response.Status.code + '<br>' | |
| 27 | - ins += '<b>Status Request:</b>' + response.Status.request + '<br>' | |
| 28 | - ins += '<b>Address:</b>' + place.address + '<br>' | |
| 29 | - ins += '<b>Accuracy:</b>' + place.AddressDetails.Accuracy + '<br>' | |
| 30 | - ins += '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode; | |
| 31 | - ins += '<br><br>O endereço obtido é aproximado. Mais detalhes em <a href="http://nicogoeminne.googlepages.com/documentation.html" >Google</a>' | |
| 24 | + var ins = '<b>orig latlng:</b>' + response.name + '<br/>' | |
| 25 | + ins += '<b>latlng:</b>' + place.Point.coordinates[0] + "," + place.Point.coordinates[1] + '<br>' | |
| 26 | + ins += '<b>Status Code:</b>' + response.Status.code + '<br>' | |
| 27 | + ins += '<b>Status Request:</b>' + response.Status.request + '<br>' | |
| 28 | + ins += '<b>Address:</b>' + place.address + '<br>' | |
| 29 | + ins += '<b>Accuracy:</b>' + place.AddressDetails.Accuracy + '<br>' | |
| 30 | + ins += '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode; | |
| 31 | + ins += '<br><br>O endereço obtido é aproximado. Mais detalhes em <a href="http://nicogoeminne.googlepages.com/documentation.html" >Google</a>' | |
| 32 | 32 | } |
| 33 | 33 | document.getElementById("mapa").innerHTML = ins |
| 34 | - } | |
| 35 | - geocoder.getLocations(ponto, pt1); | |
| 36 | -} | |
| 34 | + } | |
| 35 | + geocoder.getLocations(ponto, pt1); | |
| 36 | +} | |
| 37 | 37 | </script> |
| 38 | - </head> | |
| 39 | - <body onload="inicializa()"> | |
| 40 | - <div id="mapa"></div> | |
| 41 | - </body> | |
| 38 | + </head> | |
| 39 | + <body onload="inicializa()"> | |
| 40 | + <div id="mapa"></div> | |
| 41 | + </body> | |
| 42 | 42 | </html> |
| 43 | 43 | \ No newline at end of file | ... | ... |
ferramentas/identifica/twitter.php
| ... | ... | @@ -22,8 +22,8 @@ p { |
| 22 | 22 | } |
| 23 | 23 | $par = $_GET["x"].",".$_GET["y"]; |
| 24 | 24 | echo "<p class=paragrafo >Raio de <input type=text size=4 value='$km' id=km onchange='recarrega($par,this.value)'> km</p>"; |
| 25 | - include("../../classesphp/carrega_ext.php"); | |
| 26 | - include("../../ms_configura.php"); | |
| 25 | + include(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 26 | + include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 27 | 27 | $s = PHP_SHLIB_SUFFIX; |
| 28 | 28 | if(!function_exists('curl_init')) |
| 29 | 29 | { | ... | ... |
ferramentas/identifica/twitterplaces.php
| ... | ... | @@ -13,13 +13,13 @@ text-align:left; |
| 13 | 13 | </head> |
| 14 | 14 | <body style="background-color:white;margin:10px"> |
| 15 | 15 | <?php |
| 16 | -include("../../classesphp/carrega_ext.php"); | |
| 16 | +include(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 17 | 17 | $s = PHP_SHLIB_SUFFIX; |
| 18 | 18 | if(!function_exists('curl_init')) |
| 19 | 19 | {@dl( 'php_curl'.'.'.$s );} |
| 20 | 20 | if(!function_exists('curl_init')) |
| 21 | 21 | {echo "curl não instalado";} |
| 22 | -include("../../ms_configura.php"); | |
| 22 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | $ch = curl_init(); | ... | ... |
ferramentas/importarwmc/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 3 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 3 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 4 | 4 | error_reporting(0); |
| 5 | 5 | session_name("i3GeoPHP"); |
| 6 | 6 | if (isset($_POST["g_sid"])) |
| ... | ... | @@ -17,7 +17,7 @@ $map_file = $_SESSION["map_file"]; |
| 17 | 17 | <p> |
| 18 | 18 | <?php |
| 19 | 19 | error_reporting(0); |
| 20 | -require_once ("../../ms_configura.php"); | |
| 20 | +require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 21 | 21 | $dirmap = dirname($map_file); |
| 22 | 22 | $arquivo = ""; |
| 23 | 23 | if(isset($_FILES['i3GEOimportarwmc']['name']) && !($_POST["i3GEOimportarwmcurl"])) | ... | ... |
ferramentas/imprimir/a4lpaisagempdf.php
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | // |
| 3 | 3 | //escrito por Luis Henrique Weirich de Matos |
| 4 | 4 | // |
| 5 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 5 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 6 | 6 | error_reporting(0); |
| 7 | 7 | session_name("i3GeoPHP"); |
| 8 | 8 | if (isset($g_sid)) |
| ... | ... | @@ -16,7 +16,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 16 | 16 | // |
| 17 | 17 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 18 | 18 | // |
| 19 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 19 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 20 | 20 | // |
| 21 | 21 | //carrega o phpmapscript |
| 22 | 22 | // |
| ... | ... | @@ -31,7 +31,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 31 | 31 | else |
| 32 | 32 | {dl('php_mapscript.so');} |
| 33 | 33 | } |
| 34 | -require("../../classesphp/funcoes_gerais.php"); | |
| 34 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 35 | 35 | $nomes = nomeRandomico(); |
| 36 | 36 | // |
| 37 | 37 | //substitui a string de conexão com o banco em cada layer se for necessário |
| ... | ... | @@ -110,7 +110,7 @@ $imgo->saveImage($nomer); |
| 110 | 110 | $pathlegenda = $dir_tmp."/".basename($imgo->imageurl)."/".basename($nomer); |
| 111 | 111 | $titulo = $_GET['titulo']; |
| 112 | 112 | substituiCon($map_file,$postgis_mapa); |
| 113 | -require('../../pacotes/fpdf/fpdf.php'); | |
| 113 | +require(dirname(__FILE__).'/../../pacotes/fpdf/fpdf.php'); | |
| 114 | 114 | $pdf = new FPDF("L","mm","A4"); |
| 115 | 115 | $pdf->SetAutoPageBreak(false); |
| 116 | 116 | $pdf->SetDisplayMode( 70 , "single"); | ... | ... |
ferramentas/imprimir/a4lpdf.php
ferramentas/imprimir/aggpng.php
| ... | ... | @@ -3,7 +3,7 @@ body |
| 3 | 3 | {margin:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;width:300px} |
| 4 | 4 | A |
| 5 | 5 | {text-align:left;font-family: Verdana, Arial, Helvetica, sans-serif;color: #2F4632;} |
| 6 | -A:hover | |
| 6 | +A:hover | |
| 7 | 7 | {color: #4142ff;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif;} |
| 8 | 8 | </style> |
| 9 | 9 | <body> |
| ... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se n&atilde;o, escreva para a |
| 29 | 29 | Free Software Foundation, Inc., no endereço |
| 30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 31 | 31 | */ |
| 32 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 32 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 33 | 33 | error_reporting(0); |
| 34 | 34 | session_name("i3GeoPHP"); |
| 35 | 35 | if (isset($g_sid)) |
| ... | ... | @@ -44,7 +44,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 44 | 44 | // |
| 45 | 45 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 46 | 46 | // |
| 47 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 47 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 48 | 48 | // |
| 49 | 49 | //carrega o phpmapscript |
| 50 | 50 | // |
| ... | ... | @@ -59,7 +59,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 59 | 59 | else |
| 60 | 60 | {dl('php_mapscript.so');} |
| 61 | 61 | } |
| 62 | -require("../../classesphp/funcoes_gerais.php"); | |
| 62 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 63 | 63 | error_reporting(0); |
| 64 | 64 | $nomes = nomeRandomico(); |
| 65 | 65 | $map = ms_newMapObj($map_file); |
| ... | ... | @@ -99,7 +99,7 @@ foreach ($temas as $tema) |
| 99 | 99 | $classe->set("name","classeNula"); |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | - } | |
| 102 | + } | |
| 103 | 103 | } |
| 104 | 104 | $map->save($temp); |
| 105 | 105 | removeLinha("classeNula",$temp); | ... | ... |
ferramentas/imprimir/geotif.php
| ... | ... | @@ -3,7 +3,7 @@ body |
| 3 | 3 | {margin:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;width:300px} |
| 4 | 4 | A |
| 5 | 5 | {text-align:left;font-family: Verdana, Arial, Helvetica, sans-serif;color: #2F4632;} |
| 6 | -A:hover | |
| 6 | +A:hover | |
| 7 | 7 | {color: #4142ff;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif;} |
| 8 | 8 | </style> |
| 9 | 9 | <body> |
| ... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se n&atilde;o, escreva para a |
| 29 | 29 | Free Software Foundation, Inc., no endereço |
| 30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 31 | 31 | */ |
| 32 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 32 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 33 | 33 | error_reporting(0); |
| 34 | 34 | session_name("i3GeoPHP"); |
| 35 | 35 | if (isset($g_sid)) |
| ... | ... | @@ -43,7 +43,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 43 | 43 | // |
| 44 | 44 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 45 | 45 | // |
| 46 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 46 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 47 | 47 | // |
| 48 | 48 | //carrega o phpmapscript |
| 49 | 49 | // |
| ... | ... | @@ -58,7 +58,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 58 | 58 | else |
| 59 | 59 | {dl('php_mapscript.so');} |
| 60 | 60 | } |
| 61 | -require("../../classesphp/funcoes_gerais.php"); | |
| 61 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 62 | 62 | error_reporting(0); |
| 63 | 63 | $nomes = nomeRandomico(); |
| 64 | 64 | $map = ms_newMapObj($map_file); |
| ... | ... | @@ -98,7 +98,7 @@ foreach ($temas as $tema) |
| 98 | 98 | $classe->set("name","classeNula"); |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | - } | |
| 101 | + } | |
| 102 | 102 | } |
| 103 | 103 | $map->save($temp); |
| 104 | 104 | removeLinha("classeNula",$temp); | ... | ... |
ferramentas/imprimir/geraimagens.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | 3 | error_reporting(0); |
| 4 | 4 | session_name("i3GeoPHP"); |
| 5 | 5 | if (isset($g_sid)) |
| ... | ... | @@ -13,7 +13,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 13 | 13 | // |
| 14 | 14 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 15 | 15 | // |
| 16 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 16 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 17 | 17 | // |
| 18 | 18 | //carrega o phpmapscript |
| 19 | 19 | // |
| ... | ... | @@ -28,7 +28,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 28 | 28 | else |
| 29 | 29 | {dl('php_mapscript.so');} |
| 30 | 30 | } |
| 31 | -require("../../classesphp/funcoes_gerais.php"); | |
| 31 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 32 | 32 | $nomes = nomeRandomico(); |
| 33 | 33 | |
| 34 | 34 | $temp = str_replace(".map","xxx.map",$map_file); | ... | ... |
ferramentas/imprimir/svg.php
| ... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se n&atilde;o, escreva para a |
| 29 | 29 | Free Software Foundation, Inc., no endereço |
| 30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 31 | 31 | */ |
| 32 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 32 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 33 | 33 | error_reporting(0); |
| 34 | 34 | session_name("i3GeoPHP"); |
| 35 | 35 | if (isset($g_sid)) |
| ... | ... | @@ -43,7 +43,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 43 | 43 | // |
| 44 | 44 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 45 | 45 | // |
| 46 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 46 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 47 | 47 | // |
| 48 | 48 | //carrega o phpmapscript |
| 49 | 49 | // |
| ... | ... | @@ -58,7 +58,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 58 | 58 | else |
| 59 | 59 | {dl('php_mapscript.so');} |
| 60 | 60 | } |
| 61 | -require("../../classesphp/funcoes_gerais.php"); | |
| 61 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 62 | 62 | error_reporting(0); |
| 63 | 63 | $nomes = nomeRandomico(); |
| 64 | 64 | $map = ms_newMapObj($map_file); | ... | ... |
ferramentas/imprimir/swf.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | 3 | error_reporting(0); |
| 4 | 4 | session_name("i3GeoPHP"); |
| 5 | 5 | if (isset($g_sid)) |
| ... | ... | @@ -13,7 +13,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 13 | 13 | // |
| 14 | 14 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
| 15 | 15 | // |
| 16 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 16 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 17 | 17 | // |
| 18 | 18 | //carrega o phpmapscript |
| 19 | 19 | // |
| ... | ... | @@ -28,7 +28,7 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 28 | 28 | else |
| 29 | 29 | {dl('php_mapscript.so');} |
| 30 | 30 | } |
| 31 | -require("../../classesphp/funcoes_gerais.php"); | |
| 31 | +require(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 32 | 32 | error_reporting(0); |
| 33 | 33 | $nomes = nomeRandomico(); |
| 34 | 34 | $map = ms_newMapObj($map_file); |
| ... | ... | @@ -59,7 +59,7 @@ foreach ($temas as $tema) |
| 59 | 59 | $classe->set("name","classeNula"); |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | - } | |
| 62 | + } | |
| 63 | 63 | } |
| 64 | 64 | $map->save($temp); |
| 65 | 65 | removeLinha("classeNula",$temp); | ... | ... |
ferramentas/metaestat/analise.php
| ... | ... | @@ -206,7 +206,7 @@ function mapaDeCalor($map_file,$tema){ |
| 206 | 206 | $mapa->save($map_file); |
| 207 | 207 | $meta = new Metaestat(); |
| 208 | 208 | $medidavariavel = $meta->listaMedidaVariavel("",$layer->getmetadata("METAESTAT_ID_MEDIDA_VARIAVEL")); |
| 209 | - include_once("../../classesphp/classe_analise.php"); | |
| 209 | + include_once(dirname(__FILE__)."/../../classesphp/classe_analise.php"); | |
| 210 | 210 | $m = new Analise($map_file,$tema,$locaplic,$ext); |
| 211 | 211 | $retorno = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,50,"densidade","243,217,173","255,0,0","",0,true,"",2,$medidavariavel["colunavalor"]); |
| 212 | 212 | $m->salva(); |
| ... | ... | @@ -348,7 +348,7 @@ function classes2circulos($map_file,$tema,$tipo){ |
| 348 | 348 | $mapa->save($nometemp); |
| 349 | 349 | //$mapatemp = ms_newMapObj($nometemp); |
| 350 | 350 | $medidavariavel = $meta->listaMedidaVariavel("",$layer->getmetadata("METAESTAT_ID_MEDIDA_VARIAVEL")); |
| 351 | - include_once("../../classesphp/classe_alteraclasse.php"); | |
| 351 | + include_once(dirname(__FILE__)."/../../classesphp/classe_alteraclasse.php"); | |
| 352 | 352 | $m = new Alteraclasse($nometemp,$layer->name,"",""); |
| 353 | 353 | $valores = $m->pegaValores($m->mapa,$m->layer,$medidavariavel["colunavalor"],true,0); |
| 354 | 354 | $min = min($valores); | ... | ... |
ferramentas/metar/metarextensao.php
| ... | ... | @@ -35,9 +35,9 @@ Return: |
| 35 | 35 | {json} - lista com o resultado |
| 36 | 36 | */ |
| 37 | 37 | //set_time_limit(600); |
| 38 | -require_once("../../pacotes/cpaint/cpaint2.inc.php"); | |
| 39 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 40 | -require_once("../../classesphp/carrega_ext.php"); | |
| 38 | +require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); | |
| 39 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 40 | +require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 41 | 41 | error_reporting(0); |
| 42 | 42 | $e = explode(" ",$ret); |
| 43 | 43 | $url = "http://ws.geonames.org/weatherJSON?lang=pt&north=".$e[3]."&south=".$e[1]."&east=".$e[2]."&west=".$e[0]."&maxRows=10"; | ... | ... |
ferramentas/metar/metarproxima.php
| ... | ... | @@ -42,10 +42,10 @@ Return: |
| 42 | 42 | */ |
| 43 | 43 | //set_time_limit(600); |
| 44 | 44 | echo "<html><style> |
| 45 | - P | |
| 45 | + P | |
| 46 | 46 | {padding-top:1px;COLOR: #2F4632;text-align: justify;font-size: 12px;font-family: Verdana, Arial, Helvetica, sans-serif;} |
| 47 | 47 | </style>"; |
| 48 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 48 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 49 | 49 | error_reporting(0); |
| 50 | 50 | $url = "http://ws.geonames.org/findNearByWeatherXML?lat=$y&lng=$x&lang=pt"; |
| 51 | 51 | |
| ... | ... | @@ -61,23 +61,23 @@ if($xml == true){ |
| 61 | 61 | $r = $e->xpath('observation'); |
| 62 | 62 | foreach($r as $t) |
| 63 | 63 | {$resultado .= "<p><b>".$t."</b>";} |
| 64 | - | |
| 64 | + | |
| 65 | 65 | $r = $e->xpath('observationTime'); |
| 66 | 66 | foreach($r as $t) |
| 67 | 67 | {$resultado .= "<p><b> Data: </b>".$t;} |
| 68 | - | |
| 68 | + | |
| 69 | 69 | $r = $e->xpath('stationName'); |
| 70 | 70 | foreach($r as $t) |
| 71 | 71 | {$resultado .= "<p><b> Estação: </b>".$t;} |
| 72 | - | |
| 72 | + | |
| 73 | 73 | $r = $e->xpath('ICAO'); |
| 74 | 74 | foreach($r as $t) |
| 75 | 75 | {$resultado .= "<p><b> ICAO: </b>".$t;} |
| 76 | - | |
| 76 | + | |
| 77 | 77 | $r = $e->xpath('elevation'); |
| 78 | 78 | foreach($r as $t) |
| 79 | 79 | {$resultado .= "<p><b> Elevação: </b>".$t;} |
| 80 | - | |
| 80 | + | |
| 81 | 81 | $r = $e->xpath('lat'); |
| 82 | 82 | foreach($r as $t){ |
| 83 | 83 | $resultado .= "<p><a title='Incluir no mapa' href='#' onmouseout='escondexy()' onmouseover='mostraxy()' onclick='insereponto()'><b> Latitude: </b>".$t; |
| ... | ... | @@ -88,39 +88,39 @@ if($xml == true){ |
| 88 | 88 | $resultado .= "<b> Longitude: </b>".$t."</a>"; |
| 89 | 89 | $x = $t; |
| 90 | 90 | } |
| 91 | - | |
| 91 | + | |
| 92 | 92 | $r = $e->xpath('temperature'); |
| 93 | 93 | foreach($r as $t) |
| 94 | 94 | {$resultado .= "<p><b> Temperatura: </b>".$t." C";} |
| 95 | - | |
| 95 | + | |
| 96 | 96 | $r = $e->xpath('dewPoint'); |
| 97 | 97 | foreach($r as $t) |
| 98 | 98 | {$resultado .= "<p><b> Ponto de orvalho: </b>".$t." C";} |
| 99 | - | |
| 99 | + | |
| 100 | 100 | $r = $e->xpath('humidity'); |
| 101 | 101 | foreach($r as $t) |
| 102 | 102 | {$resultado .= "<p><b> Humidade: </b>".$t." %";} |
| 103 | - | |
| 103 | + | |
| 104 | 104 | $r = $e->xpath('clouds'); |
| 105 | 105 | foreach($r as $t) |
| 106 | 106 | {$resultado .= "<p><b> Nuvens: </b>".$t;} |
| 107 | - | |
| 107 | + | |
| 108 | 108 | $r = $e->xpath('weatherCondition'); |
| 109 | 109 | foreach($r as $t) |
| 110 | 110 | {$resultado .= "<p><b> Condição: </b>".$t;} |
| 111 | - | |
| 111 | + | |
| 112 | 112 | $r = $e->xpath('hectoPascAltimeter'); |
| 113 | 113 | foreach($r as $t) |
| 114 | 114 | {$resultado .= "<p><b> Pressão: </b>".$t." hpa";} |
| 115 | - | |
| 115 | + | |
| 116 | 116 | $r = $e->xpath('windDirection'); |
| 117 | 117 | foreach($r as $t) |
| 118 | 118 | {$resultado .= "<p><b> Direção do vento: </b>".$t;} |
| 119 | - | |
| 119 | + | |
| 120 | 120 | $r = $e->xpath('windSpeed'); |
| 121 | 121 | foreach($r as $t) |
| 122 | 122 | {$resultado .= "<p><b> Velocidade do vento: </b>".$t." mph<br>";} |
| 123 | - | |
| 123 | + | |
| 124 | 124 | $resultado .= "<p><a href='$url' >Web Service</a><br>"; |
| 125 | 125 | $resultado .= "<br><a href='http://weather.noaa.gov/' >Metar</a><br>"; |
| 126 | 126 | } |
| ... | ... | @@ -154,7 +154,7 @@ echo $resultado; |
| 154 | 154 | box.style.zIndex = 5000 |
| 155 | 155 | } |
| 156 | 156 | function insereponto(){ |
| 157 | - i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,x,y); | |
| 157 | + i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,x,y); | |
| 158 | 158 | } |
| 159 | 159 | </script> |
| 160 | 160 | </html> |
| 161 | 161 | \ No newline at end of file | ... | ... |
ferramentas/planosmanejoflorestal/pesquisa.php
| 1 | 1 | <?php |
| 2 | -require_once("../../pacotes/cpaint/cpaint2.inc.php"); | |
| 3 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 4 | -require_once("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 4 | +require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | if (isset($g_sid)) |
| 6 | 6 | {session_id($g_sid);} |
| 7 | 7 | session_start(); |
| ... | ... | @@ -9,7 +9,7 @@ foreach(array_keys($_SESSION) as $k) |
| 9 | 9 | { |
| 10 | 10 | eval("\$".$k."='".$_SESSION[$k]."';"); |
| 11 | 11 | } |
| 12 | -include("../../pacotes/phpxbase/api_conversion.php"); | |
| 12 | +include(dirname(__FILE__)."/../../pacotes/phpxbase/api_conversion.php"); | |
| 13 | 13 | $cp = new cpaint(); |
| 14 | 14 | $cp->register('pesquisa'); |
| 15 | 15 | $cp->start(); |
| ... | ... | @@ -17,9 +17,9 @@ $cp->return_data(); |
| 17 | 17 | function pesquisa() |
| 18 | 18 | { |
| 19 | 19 | global $cp,$map_file,$dir_tmp,$imgdir,$uf,$categoria,$ano,$situacao,$mes,$cnpj; |
| 20 | - $parametros = "&uf=$uf&categoria=$categoria&ano=$ano&situacao=$situacao&mes=$mes&cnpj=$cnpj"; | |
| 21 | - $xml = simplexml_load_file("http://www.mma.gov.br/estruturas/sfb_pflorestal/xml/callWS_plano_manejoA.php?".$parametros); | |
| 22 | - var_dump($xml); | |
| 20 | + $parametros = "&uf=$uf&categoria=$categoria&ano=$ano&situacao=$situacao&mes=$mes&cnpj=$cnpj"; | |
| 21 | + $xml = simplexml_load_file("http://www.mma.gov.br/estruturas/sfb_pflorestal/xml/callWS_plano_manejoA.php?".$parametros); | |
| 22 | + var_dump($xml); | |
| 23 | 23 | //echo "http://www.mma.gov.br/estruturas/sfb_pflorestal/xml/callWS_plano_manejoA.php?".$parametros; |
| 24 | 24 | if ($xml != FALSE) |
| 25 | 25 | { |
| ... | ... | @@ -73,7 +73,7 @@ function adicionatema($map_file,$dir_tmp,$imgdir,$nometemapontos,$itens,$valores |
| 73 | 73 | if(!function_exists(dbase_create)) |
| 74 | 74 | {xbase_create($nomeshp.".dbf", $def);} |
| 75 | 75 | else |
| 76 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 76 | + {dbase_create($nomeshp.".dbf", $def);} | |
| 77 | 77 | |
| 78 | 78 | $dbname = $nomeshp.".dbf"; |
| 79 | 79 | $db=xbase_open($dbname,2); | ... | ... |
ferramentas/sibea/pesquisa.php
| ... | ... | @@ -6,7 +6,7 @@ Acessa os web services do MMA para recuperar dados sobre educadores ambientais. |
| 6 | 6 | |
| 7 | 7 | Por ser executado dentro do I3Geo, boa parte dos parâmetros são obtidos da variável de seção. |
| 8 | 8 | |
| 9 | -Arquivos: | |
| 9 | +Arquivos: | |
| 10 | 10 | |
| 11 | 11 | i3geo/ferramentas/sibea/pesquisa.htm |
| 12 | 12 | i3geo/ferramentas/sibea/pesquisa.php |
| ... | ... | @@ -130,21 +130,21 @@ function adicionatema() |
| 130 | 130 | $soapclient = new Xsoapclient($servico."?wsdl","wsdl"); |
| 131 | 131 | else |
| 132 | 132 | $soapclient = new nusoap_client($servico); |
| 133 | - | |
| 133 | + | |
| 134 | 134 | if ($filtro == "tipoTitulacaoMaxima") |
| 135 | 135 | { |
| 136 | 136 | $resultado = $soapclient->call("sibeaTitulacaoMaxima",$valor); |
| 137 | - $nometema = "Titulação máxima"; | |
| 137 | + $nometema = "Titulação máxima"; | |
| 138 | 138 | } |
| 139 | 139 | if ($filtro == "tipoFormacao") |
| 140 | 140 | { |
| 141 | 141 | $resultado = $soapclient->call("sibeaFormacao",$valor); |
| 142 | - $nometema = "Formação"; | |
| 142 | + $nometema = "Formação"; | |
| 143 | 143 | } |
| 144 | 144 | if ($filtro == "tipoAreaFormacao") |
| 145 | 145 | { |
| 146 | 146 | $resultado = $soapclient->call("sibeaGrandeArea",$valor); |
| 147 | - $nometema = "Grande área de formação"; | |
| 147 | + $nometema = "Grande área de formação"; | |
| 148 | 148 | } |
| 149 | 149 | // |
| 150 | 150 | //converte siafi-ibge |
| ... | ... | @@ -160,8 +160,8 @@ function adicionatema() |
| 160 | 160 | $cp->set_data("erro. Nada encontrado"); |
| 161 | 161 | return; |
| 162 | 162 | } |
| 163 | - include("../../classesphp/classe_mapa.php"); | |
| 164 | - include("../../classesphp/funcoes_gerais.php"); | |
| 163 | + include(dirname(__FILE__)."/../../classesphp/classe_mapa.php"); | |
| 164 | + include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 165 | 165 | if ($listaIbge != '') |
| 166 | 166 | { |
| 167 | 167 | $retorno = "ok"; |
| ... | ... | @@ -179,9 +179,9 @@ function adicionatema() |
| 179 | 179 | $m->adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld); |
| 180 | 180 | $m->salva(); |
| 181 | 181 | } |
| 182 | - $cp->set_data($retorno); | |
| 183 | - | |
| 184 | - | |
| 182 | + $cp->set_data($retorno); | |
| 183 | + | |
| 184 | + | |
| 185 | 185 | /* |
| 186 | 186 | $sql = "('".(str_replace(",","','",$listaIbge))."')"; |
| 187 | 187 | $nomes = ""; | ... | ... |
ferramentas/tabela/relatorio.php
| ... | ... | @@ -3,14 +3,14 @@ session_name("i3GeoPHP"); |
| 3 | 3 | if (isset($g_sid)) |
| 4 | 4 | {session_id($g_sid);} |
| 5 | 5 | session_start(); |
| 6 | -include("../../classesphp/pega_variaveis.php"); | |
| 6 | +include(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 7 | 7 | foreach(array_keys($_SESSION) as $k) |
| 8 | 8 | { |
| 9 | 9 | eval("\$".$k."='".$_SESSION[$k]."';"); |
| 10 | 10 | } |
| 11 | 11 | $postgis_mapa = $_SESSION["postgis_mapa"]; |
| 12 | -include("../../classesphp/carrega_ext.php"); | |
| 13 | -include("../../classesphp/funcoes_gerais.php"); | |
| 12 | +include(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 13 | +include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 14 | 14 | $versao = versao(); |
| 15 | 15 | $versao = $versao["principal"]; |
| 16 | 16 | substituiCon($map_file,$postgis_mapa); | ... | ... |
ferramentas/telaremota/googleearth1.php
| 1 | 1 | <?php |
| 2 | -include("../../ms_configura.php"); | |
| 2 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 3 | 3 | ?> |
| 4 | 4 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 5 | 5 | <html> |
| ... | ... | @@ -72,8 +72,8 @@ function inicia(){ |
| 72 | 72 | navm = false; |
| 73 | 73 | var app = navigator.appName.substring(0,1); |
| 74 | 74 | if (app==='N'){navn=true;}else{navm=true;} |
| 75 | - | |
| 76 | - google.earth.createInstance("googleearthdiv", | |
| 75 | + | |
| 76 | + google.earth.createInstance("googleearthdiv", | |
| 77 | 77 | function(objeto){ |
| 78 | 78 | mapaRemoto = objeto; |
| 79 | 79 | mapaRemoto.getWindow().setVisibility(true); |
| ... | ... | @@ -89,7 +89,7 @@ function inicia(){ |
| 89 | 89 | options.setGridVisibility(false); |
| 90 | 90 | remoto = criaLayer(); |
| 91 | 91 | recuperaMapa(); |
| 92 | - }, | |
| 92 | + }, | |
| 93 | 93 | function(){ |
| 94 | 94 | alert("Falhou. Vc precisa do plugin instalado"); |
| 95 | 95 | } |
| ... | ... | @@ -126,23 +126,23 @@ function zoom2ext(ext){ |
| 126 | 126 | lng1 = (ret[2]*1); |
| 127 | 127 | lat1 = (ret[1]*1); |
| 128 | 128 | lat2 = (ret[3]*1); |
| 129 | - camera.setLatitude((lat1 + lat2) / 2.0); | |
| 130 | - camera.setLongitude((lng1 + lng2) / 2.0); | |
| 131 | - camera.setHeading(0.0); | |
| 132 | - camera.setTilt(0.0); | |
| 129 | + camera.setLatitude((lat1 + lat2) / 2.0); | |
| 130 | + camera.setLongitude((lng1 + lng2) / 2.0); | |
| 131 | + camera.setHeading(0.0); | |
| 132 | + camera.setTilt(0.0); | |
| 133 | 133 | // determine if the rectangle is portrait or landscape |
| 134 | - dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
| 135 | - dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
| 134 | + dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
| 135 | + dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
| 136 | 136 | // find the longest side |
| 137 | - d = Math.max(dy, dx); | |
| 137 | + d = Math.max(dy, dx); | |
| 138 | 138 | // convert the longest side degrees to radians |
| 139 | - d = d * Math.PI/180.0; | |
| 139 | + d = d * Math.PI/180.0; | |
| 140 | 140 | // find half the chord length |
| 141 | - dist = r * Math.tan(d / 2); | |
| 141 | + dist = r * Math.tan(d / 2); | |
| 142 | 142 | // get the altitude using the chord length |
| 143 | - alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
| 144 | - camera.setAltitude(alt); | |
| 145 | - mapaRemoto.getView().setAbstractView(camera); | |
| 143 | + alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
| 144 | + camera.setAltitude(alt); | |
| 145 | + mapaRemoto.getView().setAbstractView(camera); | |
| 146 | 146 | } |
| 147 | 147 | function atualizaMapa(){ |
| 148 | 148 | mapaRemoto.getFeatures().removeChild(mapaRemoto.getFeatures().getChildNodes().item(0)); | ... | ... |
ferramentas/upload/upload.php
| ... | ... | @@ -3,9 +3,9 @@ |
| 3 | 3 | //caso o usuário seja um administrador, ele pode enviar um nome de diretório onde os arquivos serão armazenados |
| 4 | 4 | //na variável $dirDestino |
| 5 | 5 | // |
| 6 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 7 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 8 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 6 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 7 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 8 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 9 | 9 | error_reporting(0); |
| 10 | 10 | session_name("i3GeoPHP"); |
| 11 | 11 | if(isset($g_sid) && $g_sid != ""){ |
| ... | ... | @@ -27,7 +27,7 @@ if (ob_get_level() == 0) ob_start(); |
| 27 | 27 | <?php |
| 28 | 28 | if (isset($_FILES['i3GEOuploadshp']['name'])) |
| 29 | 29 | { |
| 30 | - require_once ("../../ms_configura.php"); | |
| 30 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 31 | 31 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 32 | 32 | ob_flush(); |
| 33 | 33 | flush(); | ... | ... |
ferramentas/uploaddbf/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 3 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 4 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 4 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | session_name("i3GeoPHP"); |
| 6 | 6 | if (isset($g_sid)) |
| 7 | 7 | {session_id($g_sid);} |
| ... | ... | @@ -22,7 +22,7 @@ if (ob_get_level() == 0) ob_start(); |
| 22 | 22 | if (isset($_FILES['i3GEOuploaddbffile']['name'])) |
| 23 | 23 | { |
| 24 | 24 | //$ndir = dirname($filen); |
| 25 | - require_once ("../../ms_configura.php"); | |
| 25 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 26 | 26 | $mapa = ms_newMapObj($map_file); |
| 27 | 27 | echo "<p class='paragrafo'>Carregando o arquivo...</p>"; |
| 28 | 28 | ob_flush(); |
| ... | ... | @@ -50,8 +50,8 @@ if (isset($_FILES['i3GEOuploaddbffile']['name'])) |
| 50 | 50 | if($i3GEOuploaddbftipoarquivo != "dbf"){ |
| 51 | 51 | if($i3GEOuploaddbftipoarquivo == "csvpv"){$separador = ";";} |
| 52 | 52 | if($i3GEOuploaddbftipoarquivo == "csvv"){$separador = ",";} |
| 53 | - include_once "../../pacotes/phpxbase/api_conversion.php"; | |
| 54 | - include_once("../../pacotes/parsecsv/parsecsv.lib.php"); | |
| 53 | + include_once dirname(__FILE__)."/../../pacotes/phpxbase/api_conversion.php"; | |
| 54 | + include_once(dirname(__FILE__)."/../../pacotes/parsecsv/parsecsv.lib.php"); | |
| 55 | 55 | $csv = new parseCSV(); |
| 56 | 56 | $csv->delimiter = $separador; |
| 57 | 57 | $dados = $csv->parse($dirmap."/".$_FILES['i3GEOuploaddbffile']['name']); |
| ... | ... | @@ -113,7 +113,7 @@ if (isset($_FILES['i3GEOuploaddbffile']['name'])) |
| 113 | 113 | } |
| 114 | 114 | else |
| 115 | 115 | { |
| 116 | - require_once("../../pacotes/phpxbase/api_conversion.php"); | |
| 116 | + require_once(dirname(__FILE__)."/../../pacotes/phpxbase/api_conversion.php"); | |
| 117 | 117 | echo "<p class='paragrafo'>Lendo arquivo ".$dirmap."/".$_FILES['i3GEOuploaddbffile']['name']."</p>"; |
| 118 | 118 | $dbf = xbase_open($dirmap."/".$_FILES['i3GEOuploaddbffile']['name']); |
| 119 | 119 | $records = xbase_numrecords($dbf); | ... | ... |
ferramentas/uploadgpx/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 3 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 4 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 4 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | error_reporting(0); |
| 6 | 6 | session_name("i3GeoPHP"); |
| 7 | 7 | if (isset($g_sid)) |
| ... | ... | @@ -23,7 +23,7 @@ if (ob_get_level() == 0) ob_start(); |
| 23 | 23 | if (isset($_FILES['i3GEOuploadgpx']['name'])) |
| 24 | 24 | { |
| 25 | 25 | //$ndir = dirname($filen); |
| 26 | - require_once ("../../ms_configura.php"); | |
| 26 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 27 | 27 | $mapa = ms_newMapObj($map_file); |
| 28 | 28 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 29 | 29 | ob_flush(); | ... | ... |
ferramentas/uploadkml/upload.php
| 1 | 1 | <?php |
| 2 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 3 | -require_once("../../classesphp/funcoes_gerais.php"); | |
| 4 | -include_once ("../../classesphp/carrega_ext.php"); | |
| 2 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 3 | +require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | |
| 4 | +include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 5 | 5 | error_reporting(0); |
| 6 | 6 | session_name("i3GeoPHP"); |
| 7 | 7 | if (isset($g_sid)) |
| ... | ... | @@ -23,7 +23,7 @@ if (ob_get_level() == 0) ob_start(); |
| 23 | 23 | if (isset($_FILES['i3GEOuploadkml']['name'])) |
| 24 | 24 | { |
| 25 | 25 | //$ndir = dirname($filen); |
| 26 | - require_once ("../../ms_configura.php"); | |
| 26 | + require_once (dirname(__FILE__)."/../../ms_configura.php"); | |
| 27 | 27 | $mapa = ms_newMapObj($map_file); |
| 28 | 28 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 29 | 29 | ob_flush(); | ... | ... |
ferramentas/vinde/wmsindejson.php
| ... | ... | @@ -15,7 +15,9 @@ echo |
| 15 | 15 | /* |
| 16 | 16 | * new OpenLayers.Layer.WMS('2013 - Agricultura Irrigada', 'http://www.geoservicos.inde.gov.br/geoserver/wms', {layers: 'MPOG:Agricultura_Irrigada', format: 'image/png', transparent: true}, {isBaseLayer: false, visibility: false, group: 'Planejamento/Planejamento/2013 - Agricultura Irrigada', metadataURL: 'http://www.metadados.inde.gov.br/geonetwork/srv/br/metadata.show.embedded?uuid=045663f7-5691-447a-8d06-ab692522328c', legendURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=MPOG:Agricultura_Irrigada&format=image/png',kmlURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=MPOG:Agricultura_Irrigada&width=1024&height=768&bbox=-74,-34,-29,6&format=application/vnd.google-earth.kmz+xml',sldtema: '','maxExtent': new OpenLayers.Bounds(-55.389,-22.229,-37.808,-2.922), isBaseGroup: false, displayInLayerSwitcher: false, removable: false, groupOfKeeper: 'MP/2013 - Agricultura Irrigada', groupOfTheme: 'Planejamento/Planejamento/2013 - Agricultura Irrigada'}), |
| 17 | 17 | */ |
| 18 | -include("../../ms_configura.php"); | |
| 18 | + | |
| 19 | +include(dirname(__FILE__)."/../../ms_configura.php"); | |
| 20 | +include($locaplic."/classesphp/funcoes_gerais.php"); | |
| 19 | 21 | $agora = intval(time() / 1000); |
| 20 | 22 | $arq = $dir_tmp."/inde$agora.html"; |
| 21 | 23 | if(!file_exists($arq)){ |
| ... | ... | @@ -111,6 +113,7 @@ for ($i=0;$i<$n;$i++){ |
| 111 | 113 | //$novalinha[] = "[".trim($linha,",")."]"; |
| 112 | 114 | } |
| 113 | 115 | } |
| 116 | + | |
| 114 | 117 | //separa os grupos |
| 115 | 118 | //echo "<pre>"; |
| 116 | 119 | //var_dump($grupos);exit; | ... | ... |
ferramentas/wiki/funcoes.php
| 1 | 1 | <?php |
| 2 | 2 | $usuarioGeonames = "i3geo"; |
| 3 | 3 | //set_time_limit(600); |
| 4 | -require_once("../../pacotes/cpaint/cpaint2.inc.php"); | |
| 5 | -require_once("../../classesphp/pega_variaveis.php"); | |
| 6 | -require_once("../../classesphp/carrega_ext.php"); | |
| 4 | +require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); | |
| 5 | +require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | |
| 6 | +require_once(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | |
| 7 | 7 | error_reporting(0); |
| 8 | 8 | $cp = new cpaint(); |
| 9 | 9 | $cp->register('listaartigos'); | ... | ... |
init/index.php
| ... | ... | @@ -11,7 +11,7 @@ $cache_expire = 1; |
| 11 | 11 | header("Pragma: public"); |
| 12 | 12 | header("Cache-Control: max-age=".$cache_expire); |
| 13 | 13 | header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT'); |
| 14 | -include("../ms_configura.php"); | |
| 14 | +include(dirname(__FILE__)."/../ms_configura.php"); | |
| 15 | 15 | ?> |
| 16 | 16 | <script type="text/javascript" src="../classesjs/i3geo.js"></script> |
| 17 | 17 | <script type="text/javascript" src="dicionario.js"></script> | ... | ... |
init/remover.php
| ... | ... | @@ -12,8 +12,8 @@ Remove a tela inicial de apresenta&ccedil;&atilde;o do i3Geo substituindo-a pela |
| 12 | 12 | Após remover, a tela inicial pode ser vista utilizando-se o endereço i3geo/init. |
| 13 | 13 | <?php |
| 14 | 14 | $locaplic = dirname(__FILE__)."/.."; |
| 15 | -include_once("../admin/php/admin.php"); | |
| 16 | -include_once("../admin/php/conexao.php"); | |
| 15 | +include_once(dirname(__FILE__)."/../admin/php/admin.php"); | |
| 16 | +include_once(dirname(__FILE__)."/../admin/php/conexao.php"); | |
| 17 | 17 | |
| 18 | 18 | if(empty($_POST["senha"]) || empty($_POST["usuario"])){ |
| 19 | 19 | formularioLoginMaster("remover.php"); | ... | ... |
mashups/openlayers.php
| ... | ... | @@ -2,9 +2,9 @@ |
| 2 | 2 | /** |
| 3 | 3 | * DESLIGACACHE (opcional) {sim|nao} - forca a nao usar o cache de imagens qd definido como "sim", do contrário, o uso ou não do cache será definido automaticamente |
| 4 | 4 | */ |
| 5 | -include_once("../ms_configura.php"); | |
| 6 | -include_once("../classesphp/pega_variaveis.php"); | |
| 7 | -include_once("../classesphp/carrega_ext.php"); | |
| 5 | +include_once(dirname(__FILE__)."/../ms_configura.php"); | |
| 6 | +include_once(dirname(__FILE__)."/../classesphp/pega_variaveis.php"); | |
| 7 | +include_once(dirname(__FILE__)."/../classesphp/carrega_ext.php"); | |
| 8 | 8 | error_reporting(0); |
| 9 | 9 | // |
| 10 | 10 | //recupera um mapa salvo no banco de administracao | ... | ... |
mashups/openlayers_ajuda.php
| 1 | 1 | <?php |
| 2 | -include("../versao.php"); | |
| 2 | +include(dirname(__FILE__)."/../versao.php"); | |
| 3 | 3 | ?> |
| 4 | 4 | <html> |
| 5 | 5 | <head> |
| ... | ... | @@ -17,10 +17,10 @@ p,td |
| 17 | 17 | padding:2px; |
| 18 | 18 | } |
| 19 | 19 | .olControlEditingToolbar1 { |
| 20 | - height: 20px; | |
| 21 | - left: 20px; | |
| 22 | - position: relative; | |
| 23 | - width: 100%; | |
| 20 | + height: 20px; | |
| 21 | + left: 20px; | |
| 22 | + position: relative; | |
| 23 | + width: 100%; | |
| 24 | 24 | float: left; |
| 25 | 25 | } |
| 26 | 26 | |
| ... | ... | @@ -32,7 +32,7 @@ p,td |
| 32 | 32 | <p><img src="../imagens/i3geo1.jpg" /></p> |
| 33 | 33 | <p><?php echo $mensagemInicia;?></p> |
| 34 | 34 | <p style='font-size:16px'>Documentação do editor</p> |
| 35 | -</div> | |
| 35 | +</div> | |
| 36 | 36 | <table class="olControlEditingToolbar1" > |
| 37 | 37 | <tr> |
| 38 | 38 | <td style=width:20px ><div class="editorOLprocuraItemInactive"></div></td> |
| ... | ... | @@ -85,7 +85,7 @@ p,td |
| 85 | 85 | <tr> |
| 86 | 86 | <td style=width:20px ><div class="editorOLtoolsItemInactive"></div></td> |
| 87 | 87 | <td>Modifique as geometrias aplicando operações como união, intersecção, etc.</td> |
| 88 | - </tr> | |
| 88 | + </tr> | |
| 89 | 89 | <tr> |
| 90 | 90 | <td style=width:20px ><div class="editorOLselecaoItemInactive"></div></td> |
| 91 | 91 | <td>Clique sobre uma geometria para selecioná-la. Utilize a tecla 'shift' para adicionar ou remover geometrias de um conjunto selecionado.</td> |
| ... | ... | @@ -97,7 +97,7 @@ p,td |
| 97 | 97 | <tr> |
| 98 | 98 | <td style=width:20px ><div class="editorOLundoItemInactive"></div></td> |
| 99 | 99 | <td>Recupere a última geometria apagada ou modificada.</td> |
| 100 | - </tr> | |
| 100 | + </tr> | |
| 101 | 101 | <tr> |
| 102 | 102 | <td style=width:20px ><div class="editorOLsalvaItemInactive"></div></td> |
| 103 | 103 | <td>Converta para shapefile, salve ou obtenha as coordenadas das geometrias selecionadas.</td> |
| ... | ... | @@ -105,15 +105,15 @@ p,td |
| 105 | 105 | <tr> |
| 106 | 106 | <td style=width:20px ><div class="editorOLfrenteItemInactive"></div></td> |
| 107 | 107 | <td>Traz a figura selecionada para a frente das demais.</td> |
| 108 | - </tr> | |
| 108 | + </tr> | |
| 109 | 109 | <tr> |
| 110 | 110 | <td style=width:20px ><div class="editorOLpropriedadesItemInactive"></div></td> |
| 111 | 111 | <td>Defina as propriedades de edição, como a distância de aproximação e outros comportamentos das operações. Defina também o comportamento da ferramenta de edição, permitindo alterar uma figura ou rotacioná-la, movê-la ou redimensionar.</td> |
| 112 | - </tr> | |
| 112 | + </tr> | |
| 113 | 113 | <tr> |
| 114 | 114 | <td style=width:20px ><div class="editorOLajudaItemInactive"></div></td> |
| 115 | 115 | <td>Abre essa página de ajuda.</td> |
| 116 | - </tr> | |
| 116 | + </tr> | |
| 117 | 117 | </table> |
| 118 | 118 | </body> |
| 119 | 119 | </html> |
| 120 | 120 | \ No newline at end of file | ... | ... |
temas/_lbiomashp.map
| ... | ... | @@ -29,7 +29,9 @@ MAP |
| 29 | 29 | NAME "CAATINGA" |
| 30 | 30 | EXPRESSION ('[CD_LEGENDA]'eq'CAATINGA') |
| 31 | 31 | STYLE |
| 32 | - COLOR 164 186 131 | |
| 32 | + ANGLE 0 | |
| 33 | + COLOR 247 114 249 | |
| 34 | + OFFSET 0 0 | |
| 33 | 35 | OUTLINECOLOR 255 255 255 |
| 34 | 36 | END # STYLE |
| 35 | 37 | END # CLASS |
| ... | ... | @@ -37,7 +39,9 @@ MAP |
| 37 | 39 | NAME "PAMPA" |
| 38 | 40 | EXPRESSION ('[CD_LEGENDA]'eq'PAMPA') |
| 39 | 41 | STYLE |
| 40 | - COLOR 129 208 7 | |
| 42 | + ANGLE 0 | |
| 43 | + COLOR 178 88 255 | |
| 44 | + OFFSET 0 0 | |
| 41 | 45 | OUTLINECOLOR 255 255 255 |
| 42 | 46 | END # STYLE |
| 43 | 47 | END # CLASS |
| ... | ... | @@ -45,7 +49,9 @@ MAP |
| 45 | 49 | NAME "CERRADO" |
| 46 | 50 | EXPRESSION ('[CD_LEGENDA]'eq'CERRADO') |
| 47 | 51 | STYLE |
| 48 | - COLOR 74 234 68 | |
| 52 | + ANGLE 0 | |
| 53 | + COLOR 67 52 102 | |
| 54 | + OFFSET 0 0 | |
| 49 | 55 | OUTLINECOLOR 255 255 255 |
| 50 | 56 | END # STYLE |
| 51 | 57 | END # CLASS |
| ... | ... | @@ -53,7 +59,9 @@ MAP |
| 53 | 59 | NAME "PANTANAL" |
| 54 | 60 | EXPRESSION ('[CD_LEGENDA]'eq'PANTANAL') |
| 55 | 61 | STYLE |
| 56 | - COLOR 60 196 145 | |
| 62 | + ANGLE 0 | |
| 63 | + COLOR 220 65 64 | |
| 64 | + OFFSET 0 0 | |
| 57 | 65 | OUTLINECOLOR 255 255 255 |
| 58 | 66 | END # STYLE |
| 59 | 67 | END # CLASS |
| ... | ... | @@ -61,7 +69,9 @@ MAP |
| 61 | 69 | NAME "AMAZONIA" |
| 62 | 70 | EXPRESSION ('[CD_LEGENDA]'eq'AMAZONIA') |
| 63 | 71 | STYLE |
| 64 | - COLOR 248 68 118 | |
| 72 | + ANGLE 0 | |
| 73 | + COLOR 195 70 245 | |
| 74 | + OFFSET 0 0 | |
| 65 | 75 | OUTLINECOLOR 255 255 255 |
| 66 | 76 | END # STYLE |
| 67 | 77 | END # CLASS |
| ... | ... | @@ -69,7 +79,9 @@ MAP |
| 69 | 79 | NAME "MATA ATLANTICA" |
| 70 | 80 | EXPRESSION ('[CD_LEGENDA]'eq'MATA ATLANTICA') |
| 71 | 81 | STYLE |
| 72 | - COLOR 7 115 180 | |
| 82 | + ANGLE 0 | |
| 83 | + COLOR 216 193 38 | |
| 84 | + OFFSET 0 0 | |
| 73 | 85 | OUTLINECOLOR 255 255 255 |
| 74 | 86 | END # STYLE |
| 75 | 87 | END # CLASS | ... | ... |
testainstal.php
| ... | ... | @@ -160,6 +160,7 @@ echo "<br><pre>Extens&otilde;es:<br>"; |
| 160 | 160 | if (!extension_loaded("curl")){ |
| 161 | 161 | echo "<span style=color:red >Problema: não está instalado a curl que pode afetar algumas funcionalidades do i3Geo<br></span>"; |
| 162 | 162 | } |
| 163 | +if (!extension_loaded("json")){echo "<span style=color:red >Problema: não está instalado a json<br></span>";} | |
| 163 | 164 | if (!extension_loaded("imagick")){echo "<span style=color:red >Problema: não está instalado a imagick<br></span>";} |
| 164 | 165 | if (!extension_loaded("libxml")){echo "<span style=color:red >Problema: não está instalado a libxml<br></span>";} |
| 165 | 166 | if (!extension_loaded( "PDO")){echo "<span style=color:red >Problema: não está instalado a PDO<br></span>";} | ... | ... |