tieneAcceso()){ $objSesion->terminaSesion(); }*/ session_start(); if(!isset($_SESSION["usuario_id"])){ session_destroy(); $pag = "salir.php?expired=1"; header("Location: ".$pag); exit(); } $session_life = 1*60*60;//convertido a segundos if (isset($_SESSION["timeout"])) { // calculate the session's "time to live" $sessionTTL = time() - $_SESSION["timeout"]; if ($sessionTTL > $session_life) { $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/salir.php?expired=1"; header("Location: http://".$pag); exit(); } }else{ $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/salir.php?expired=1"; header("Location: http://".$pag); exit(); } $_SESSION["timeout"] = time(); $stmt = $pdo->prepare('Select * from fs_sistemausuarioacceso(:usr)'); $stmt->bindParam(":usr", $_SESSION["usuario_id"]); if(!$stmt->execute()){ print_r($stmt->errorInfo()); $errorDesc = "Ocurrió un errror al leer los datos de usuario"; }else $sistema_rs = $stmt->fetchAll(); $stmt->closeCursor(); //--Manejo de errores y mensajes de exito /*if(isset($_GET["error"]) && is_numeric($_GET["error"])){ switch ($_GET["error"]){ case 0: $errorDesc = "No se recibó ningún dato para actualizar."; break; case 1: $errorDesc = "Ocurrió un error al actualizar los datos."; break; case 2: $errorDesc = "La contraseña no es válida. Debe contener al menos 1 letra, 1 número, 1 caracter especial y tener una longitud de 5 caracteres."; break; } }*/ ?>