Commit acd3b5c8b3c138038d0ba65fa6757703151fba6e
1 parent
8f54a7c4
Exists in
master
Atualização do sistema de administração
Showing
3 changed files
with
12 additions
and
8 deletions
Show diff stats
admin/php/login.php
... | ... | @@ -73,6 +73,7 @@ if(!empty($_POST["usuario"]) && !empty($_POST["senha"])){ |
73 | 73 | session_regenerate_id(); |
74 | 74 | $_SESSION = array(); |
75 | 75 | session_start(); |
76 | + $funcao = "login"; | |
76 | 77 | } |
77 | 78 | else{//se nao, verifica se o login ja existe realmente |
78 | 79 | if(!empty($_COOKIE["i3geocodigologin"])){ |
... | ... | @@ -80,10 +81,12 @@ else{//se nao, verifica se o login ja existe realmente |
80 | 81 | session_start(); |
81 | 82 | if($_SESSION["usuario"] != $_COOKIE["i3geousuariologin"]){ |
82 | 83 | logoutUsuario(); |
84 | + cpjson("logout"); | |
83 | 85 | } |
84 | 86 | } |
85 | 87 | else{//caso nao exista, retorna um erro |
86 | - $retorno = "erro"; | |
88 | + logoutUsuario(); | |
89 | + cpjson("erro"); | |
87 | 90 | } |
88 | 91 | } |
89 | 92 | //var_dump($_SESSION);exit; | ... | ... |
init/index.js
1 | 1 | botoesIni = [ |
2 | 2 | { |
3 | 3 | "img":"openlayers", |
4 | - "href": location.href.replace("init/index.php","") + customDir + "/black_ol.htm", | |
4 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/black_ol.htm", | |
5 | 5 | "titulo":$trad(4,g_traducao_init), |
6 | 6 | "subtitulo": $trad("4a",g_traducao_init), |
7 | 7 | "fa": "map-o", |
8 | 8 | "target": "_blank" |
9 | 9 | },{ |
10 | 10 | "img":"osm", |
11 | - "href": location.href.replace("init/index.php","") + customDir + "/black_osm.htm", | |
11 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/black_osm.htm", | |
12 | 12 | "titulo":$trad(23,g_traducao_init), |
13 | 13 | "subtitulo": $trad("23a",g_traducao_init), |
14 | 14 | "fa": "map-o", |
15 | 15 | "target": "_blank" |
16 | 16 | },{ |
17 | 17 | "img":"googlemaps", |
18 | - "href": location.href.replace("init/index.php","") + customDir + "/black_gm.phtml", | |
18 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/black_gm.phtml", | |
19 | 19 | "titulo":$trad(6,g_traducao_init), |
20 | 20 | "subtitulo": $trad("6a",g_traducao_init), |
21 | 21 | "fa": "map-o", |
... | ... | @@ -29,14 +29,14 @@ botoesIni = [ |
29 | 29 | "target": "_self" |
30 | 30 | },{ |
31 | 31 | "img":"googleearth", |
32 | - "href": location.href.replace("init/index.php","") + customDir + "/googleearth.phtml", | |
32 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/googleearth.phtml", | |
33 | 33 | "titulo":$trad(7,g_traducao_init), |
34 | 34 | "subtitulo": $trad("7a",g_traducao_init), |
35 | 35 | "fa": "map-o", |
36 | 36 | "target": "_blank" |
37 | 37 | },{ |
38 | 38 | "img":"cartogramas", |
39 | - "href": location.href.replace("init/index.php","") + customDir + "/black_carto_ol.htm", | |
39 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/black_carto_ol.htm", | |
40 | 40 | "titulo":$trad(8,g_traducao_init), |
41 | 41 | "subtitulo": $trad("8a",g_traducao_init), |
42 | 42 | "fa": "map-o", |
... | ... | @@ -85,7 +85,7 @@ botoesIni = [ |
85 | 85 | "target": "_self" |
86 | 86 | },{ |
87 | 87 | "img":"openlayersdebug", |
88 | - "href": location.href.replace("init/index.php","") + customDir + "/openlayersdebug.htm", | |
88 | + "href": location.href.replace("init/index.php"+window.location.search,"") + customDir + "/openlayersdebug.htm", | |
89 | 89 | "titulo":$trad(5,g_traducao_init), |
90 | 90 | "subtitulo": $trad("5a",g_traducao_init), |
91 | 91 | "fa": "cogs", | ... | ... |
ms_criamapa.php
... | ... | @@ -287,7 +287,7 @@ if(!isset($dir_tmp)){ |
287 | 287 | include_once (dirname(__FILE__)."/ms_configura.php"); |
288 | 288 | } |
289 | 289 | if(isset($logExec) && $logExec["init"] == true){ |
290 | - i3GeoLog("ms_criamapa ".implode("&",array_merge($_GET,$_POST)),$_SESSION["dir_tmp"]); | |
290 | + i3GeoLog("prog: ms_criamapa url: ".implode("&",array_merge($_GET,$_POST)),$dir_tmp); | |
291 | 291 | } |
292 | 292 | if(!empty($restauramapa)){ |
293 | 293 | $base = restauraMapaAdmin($restauramapa,$dir_tmp); |
... | ... | @@ -438,6 +438,7 @@ $_SESSION["expoeMapfile"] = $expoeMapfile; |
438 | 438 | $_SESSION["googleApiKey"] = $googleApiKey_; |
439 | 439 | $_SESSION["mensagemInicia"] = $mensagemInicia_; |
440 | 440 | $_SESSION["interfacePadrao"] = $interfacePadrao_; |
441 | +$_SESSION["logExec"] = $logExec_; | |
441 | 442 | if(isset($interface_)){ |
442 | 443 | $_SESSION["interface"] = $interface_; |
443 | 444 | } | ... | ... |