Commit 624f9b3454646d15f03eb8668da3484167a48917
1 parent
b06bcef9
Exists in
master
and in
7 other branches
funcao de log
Showing
7 changed files
with
41 additions
and
7 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/editormapfile.php
... | ... | @@ -40,6 +40,14 @@ Cada operação possuí seus proprios parâmetros, que de |
40 | 40 | |
41 | 41 | */ |
42 | 42 | include_once(dirname(__FILE__)."/login.php"); |
43 | + | |
44 | +$id = $_GET["id"]; | |
45 | + | |
46 | +testaSafeNumerico([$id]); | |
47 | + | |
48 | +$codigoMap = $_GET["codigoMap"]; | |
49 | +$codigoLayer = $_GET["codigoLayer"]; | |
50 | + | |
43 | 51 | $funcoesEdicao = array( |
44 | 52 | "CRIARNOVOMAP", |
45 | 53 | "EDITASIMBOLO", |
... | ... | @@ -68,7 +76,8 @@ $funcoesEdicao = array( |
68 | 76 | "ALTERAREDITAVEL", |
69 | 77 | "PEGAPLUGIN", |
70 | 78 | "GRAVAPLUGIN", |
71 | - "REMOVEPLUGIN" | |
79 | + "REMOVEPLUGIN", | |
80 | + "DOWNLOADGVP" | |
72 | 81 | ); |
73 | 82 | if(in_array(strtoupper($funcao),$funcoesEdicao)){ |
74 | 83 | if(verificaOperacaoSessao("admin/html/editormapfile") == false){ |
... | ... | @@ -91,8 +100,10 @@ error_reporting(0); |
91 | 100 | //algumas funcoes podem ser inseridas com include em outros programas |
92 | 101 | //nesse caso, defina output como "retorno" |
93 | 102 | //caso contrario sera definido como json |
94 | -if(empty($output)){ | |
103 | +if(empty($_GET["output"])){ | |
95 | 104 | $output = "json"; |
105 | +} else { | |
106 | + $output = $_GET["output"]; | |
96 | 107 | } |
97 | 108 | //faz a busca da função que deve ser executada |
98 | 109 | switch (strtoupper($funcao)) |
... | ... | @@ -142,7 +153,7 @@ switch (strtoupper($funcao)) |
142 | 153 | $mapfile = $locaplic."/temas/".$codigoMap.".map"; |
143 | 154 | $mapa = ms_newMapObj($mapfile); |
144 | 155 | $layer = $mapa->getlayerbyname($codigoLayer); |
145 | - $layer->setmetadata("PLUGINI3GEO",$plugin); | |
156 | + $layer->setmetadata("PLUGINI3GEO",$_GET["plugin"]); | |
146 | 157 | $mapa->save($mapfile); |
147 | 158 | removeCabecalho($mapfile); |
148 | 159 | retornaJSON("ok"); |
... | ... | @@ -216,8 +227,9 @@ switch (strtoupper($funcao)) |
216 | 227 | $base = $locaplic."/aplicmap/".$base; |
217 | 228 | } |
218 | 229 | } |
230 | + $base = str_replace(".map","",$base).".map"; | |
219 | 231 | $m = new Legenda($base,$locaplic); |
220 | - retornaJSON($m->listaSimbolos($tipo,$dir_tmp,"",$onclick,8,1,true)); | |
232 | + retornaJSON($m->listaSimbolos($tipo,$dir_tmp,"",$_GET["onclick"],8,1,true)); | |
221 | 233 | exit; |
222 | 234 | break; |
223 | 235 | /* |
... | ... | @@ -1130,10 +1142,10 @@ switch (strtoupper($funcao)) |
1130 | 1142 | } |
1131 | 1143 | function clonarMapfile() |
1132 | 1144 | { |
1133 | - global $novomap, $codigomap, $locaplic; | |
1145 | + global $codigomap, $locaplic; | |
1134 | 1146 | error_reporting(0); |
1135 | 1147 | $arqtema = $locaplic."/temas/".$codigomap.".map"; |
1136 | - $novotema = $locaplic."/temas/".$novomap.".map"; | |
1148 | + $novotema = $locaplic."/temas/".$_GET["novomap"].".map"; | |
1137 | 1149 | copy($arqtema,$novotema); |
1138 | 1150 | $mapa = ms_newMapObj($novotema); |
1139 | 1151 | $layer = @$mapa->getlayerbyname($codigomap); |
... | ... | @@ -1144,7 +1156,11 @@ function clonarMapfile() |
1144 | 1156 | } |
1145 | 1157 | function refazerLayer() |
1146 | 1158 | { |
1147 | - global $nomelayer, $codigomap, $maporigem, $locaplic, $cache; | |
1159 | + global $nomelayer, $codigomap, $locaplic; | |
1160 | + | |
1161 | + $maporigem = $_GET["maporigem"]; | |
1162 | + $cache = $_GET["cache"]; | |
1163 | + | |
1148 | 1164 | error_reporting(0); |
1149 | 1165 | if(empty($cache)){ |
1150 | 1166 | $cache = ""; | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -3040,4 +3040,13 @@ function fileContemString($arq,$s){ |
3040 | 3040 | fclose($handle); |
3041 | 3041 | return $valid; |
3042 | 3042 | } |
3043 | +function i3GeoLog($txt,$dir_tmp=""){ | |
3044 | + if(empty($dir_tmp)){ | |
3045 | + include(dirname(__FILE__)."/../ms_configura.php"); | |
3046 | + } | |
3047 | + $log = "User: ".$_SERVER['REMOTE_ADDR'].' - '.date("F j, Y, g:i a").PHP_EOL. | |
3048 | + $txt.PHP_EOL. | |
3049 | + "-------------------------".PHP_EOL; | |
3050 | + file_put_contents($dir_tmp.'/log_i3geo_'.date("j.n.Y").'.txt', $log, FILE_APPEND); | |
3051 | +} | |
3043 | 3052 | ?> | ... | ... |
classesphp/mapa_googlemaps.php
... | ... | @@ -145,6 +145,9 @@ elseif(isset($_GET["BBOX"])){ |
145 | 145 | } |
146 | 146 | //por seguranca |
147 | 147 | include_once("funcoes_gerais.php"); |
148 | + | |
149 | +i3GeoLog("mapa_googlemaps",$_SESSION["dir_tmp"]); | |
150 | + | |
148 | 151 | restauraCon($map_fileX,$postgis_mapa); |
149 | 152 | |
150 | 153 | $mapa = ms_newMapObj($map_fileX); | ... | ... |
classesphp/mapa_openlayers.php
... | ... | @@ -165,6 +165,9 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
165 | 165 | |
166 | 166 | //por seguranca |
167 | 167 | include_once("funcoes_gerais.php"); |
168 | + | |
169 | +i3GeoLog("mapa_openlayers",$_SESSION["dir_tmp"]); | |
170 | + | |
168 | 171 | restauraCon($map_fileX,$postgis_mapa); |
169 | 172 | |
170 | 173 | $cachedir = $_SESSION["cachedir"]; | ... | ... |
ms_criamapa.php
... | ... | @@ -223,6 +223,7 @@ filtros - filtros podem ser adicionados incluindo o parametro da seguinte forma: |
223 | 223 | // |
224 | 224 | //quando $funcao existe, é pq o ms_criamapa.php está sendo utilizado como um include em classesphp/mapa_controle.php |
225 | 225 | // |
226 | + | |
226 | 227 | ms_ResetErrorList(); |
227 | 228 | if(!isset($funcao)){ |
228 | 229 | ob_end_clean(); |
... | ... | @@ -285,6 +286,7 @@ $versao = $versao["principal"]; |
285 | 286 | if(!isset($dir_tmp)){ |
286 | 287 | include_once (dirname(__FILE__)."/ms_configura.php"); |
287 | 288 | } |
289 | +i3GeoLog("ms_criamapa",$dir_tmp); | |
288 | 290 | if(!empty($restauramapa)){ |
289 | 291 | $base = restauraMapaAdmin($restauramapa,$dir_tmp); |
290 | 292 | $m = ms_newMapObj($base); | ... | ... |
ogc.php