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,6 +73,7 @@ if(!empty($_POST["usuario"]) && !empty($_POST["senha"])){ | ||
| 73 | session_regenerate_id(); | 73 | session_regenerate_id(); |
| 74 | $_SESSION = array(); | 74 | $_SESSION = array(); |
| 75 | session_start(); | 75 | session_start(); |
| 76 | + $funcao = "login"; | ||
| 76 | } | 77 | } |
| 77 | else{//se nao, verifica se o login ja existe realmente | 78 | else{//se nao, verifica se o login ja existe realmente |
| 78 | if(!empty($_COOKIE["i3geocodigologin"])){ | 79 | if(!empty($_COOKIE["i3geocodigologin"])){ |
| @@ -80,10 +81,12 @@ else{//se nao, verifica se o login ja existe realmente | @@ -80,10 +81,12 @@ else{//se nao, verifica se o login ja existe realmente | ||
| 80 | session_start(); | 81 | session_start(); |
| 81 | if($_SESSION["usuario"] != $_COOKIE["i3geousuariologin"]){ | 82 | if($_SESSION["usuario"] != $_COOKIE["i3geousuariologin"]){ |
| 82 | logoutUsuario(); | 83 | logoutUsuario(); |
| 84 | + cpjson("logout"); | ||
| 83 | } | 85 | } |
| 84 | } | 86 | } |
| 85 | else{//caso nao exista, retorna um erro | 87 | else{//caso nao exista, retorna um erro |
| 86 | - $retorno = "erro"; | 88 | + logoutUsuario(); |
| 89 | + cpjson("erro"); | ||
| 87 | } | 90 | } |
| 88 | } | 91 | } |
| 89 | //var_dump($_SESSION);exit; | 92 | //var_dump($_SESSION);exit; |
init/index.js
| 1 | botoesIni = [ | 1 | botoesIni = [ |
| 2 | { | 2 | { |
| 3 | "img":"openlayers", | 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 | "titulo":$trad(4,g_traducao_init), | 5 | "titulo":$trad(4,g_traducao_init), |
| 6 | "subtitulo": $trad("4a",g_traducao_init), | 6 | "subtitulo": $trad("4a",g_traducao_init), |
| 7 | "fa": "map-o", | 7 | "fa": "map-o", |
| 8 | "target": "_blank" | 8 | "target": "_blank" |
| 9 | },{ | 9 | },{ |
| 10 | "img":"osm", | 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 | "titulo":$trad(23,g_traducao_init), | 12 | "titulo":$trad(23,g_traducao_init), |
| 13 | "subtitulo": $trad("23a",g_traducao_init), | 13 | "subtitulo": $trad("23a",g_traducao_init), |
| 14 | "fa": "map-o", | 14 | "fa": "map-o", |
| 15 | "target": "_blank" | 15 | "target": "_blank" |
| 16 | },{ | 16 | },{ |
| 17 | "img":"googlemaps", | 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 | "titulo":$trad(6,g_traducao_init), | 19 | "titulo":$trad(6,g_traducao_init), |
| 20 | "subtitulo": $trad("6a",g_traducao_init), | 20 | "subtitulo": $trad("6a",g_traducao_init), |
| 21 | "fa": "map-o", | 21 | "fa": "map-o", |
| @@ -29,14 +29,14 @@ botoesIni = [ | @@ -29,14 +29,14 @@ botoesIni = [ | ||
| 29 | "target": "_self" | 29 | "target": "_self" |
| 30 | },{ | 30 | },{ |
| 31 | "img":"googleearth", | 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 | "titulo":$trad(7,g_traducao_init), | 33 | "titulo":$trad(7,g_traducao_init), |
| 34 | "subtitulo": $trad("7a",g_traducao_init), | 34 | "subtitulo": $trad("7a",g_traducao_init), |
| 35 | "fa": "map-o", | 35 | "fa": "map-o", |
| 36 | "target": "_blank" | 36 | "target": "_blank" |
| 37 | },{ | 37 | },{ |
| 38 | "img":"cartogramas", | 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 | "titulo":$trad(8,g_traducao_init), | 40 | "titulo":$trad(8,g_traducao_init), |
| 41 | "subtitulo": $trad("8a",g_traducao_init), | 41 | "subtitulo": $trad("8a",g_traducao_init), |
| 42 | "fa": "map-o", | 42 | "fa": "map-o", |
| @@ -85,7 +85,7 @@ botoesIni = [ | @@ -85,7 +85,7 @@ botoesIni = [ | ||
| 85 | "target": "_self" | 85 | "target": "_self" |
| 86 | },{ | 86 | },{ |
| 87 | "img":"openlayersdebug", | 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 | "titulo":$trad(5,g_traducao_init), | 89 | "titulo":$trad(5,g_traducao_init), |
| 90 | "subtitulo": $trad("5a",g_traducao_init), | 90 | "subtitulo": $trad("5a",g_traducao_init), |
| 91 | "fa": "cogs", | 91 | "fa": "cogs", |
ms_criamapa.php
| @@ -287,7 +287,7 @@ if(!isset($dir_tmp)){ | @@ -287,7 +287,7 @@ if(!isset($dir_tmp)){ | ||
| 287 | include_once (dirname(__FILE__)."/ms_configura.php"); | 287 | include_once (dirname(__FILE__)."/ms_configura.php"); |
| 288 | } | 288 | } |
| 289 | if(isset($logExec) && $logExec["init"] == true){ | 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 | if(!empty($restauramapa)){ | 292 | if(!empty($restauramapa)){ |
| 293 | $base = restauraMapaAdmin($restauramapa,$dir_tmp); | 293 | $base = restauraMapaAdmin($restauramapa,$dir_tmp); |
| @@ -438,6 +438,7 @@ $_SESSION["expoeMapfile"] = $expoeMapfile; | @@ -438,6 +438,7 @@ $_SESSION["expoeMapfile"] = $expoeMapfile; | ||
| 438 | $_SESSION["googleApiKey"] = $googleApiKey_; | 438 | $_SESSION["googleApiKey"] = $googleApiKey_; |
| 439 | $_SESSION["mensagemInicia"] = $mensagemInicia_; | 439 | $_SESSION["mensagemInicia"] = $mensagemInicia_; |
| 440 | $_SESSION["interfacePadrao"] = $interfacePadrao_; | 440 | $_SESSION["interfacePadrao"] = $interfacePadrao_; |
| 441 | +$_SESSION["logExec"] = $logExec_; | ||
| 441 | if(isset($interface_)){ | 442 | if(isset($interface_)){ |
| 442 | $_SESSION["interface"] = $interface_; | 443 | $_SESSION["interface"] = $interface_; |
| 443 | } | 444 | } |