1
0
forked from qwerty/milfs

manejo de tiempo de session

This commit is contained in:
humano 2018-10-21 12:48:02 -05:00
parent fa0da963dd
commit 513c482c61

View File

@ -1,5 +1,7 @@
<?php <?php session_start();
session_start(); $timestamp=time();
setcookie("timestamp",$timestamp,($timestamp + 5000));
$_SESSION['timestamp']= $timestamp;
if($_SESSION['grupo'] != "administrador") { if($_SESSION['grupo'] != "administrador") {
// header("Location: ../"); // header("Location: ../");
} }
@ -184,7 +186,7 @@ legend.legend-area {
</style> </style>
</head> </head>
<body > <body onload="revisarSession()"; >
<?php if($embebido ==1) { <?php if($embebido ==1) {
if($form!=''){ echo formulario_embebido($form,$opciones);} if($form!=''){ echo formulario_embebido($form,$opciones);}
elseif($identificador !='') { echo mostrar_identificador($identificador,$id);} elseif($identificador !='') { echo mostrar_identificador($identificador,$id);}
@ -207,8 +209,12 @@ else{}
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a> <a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a>
</div> </div>
<?php echo milfs() ?> <?php echo milfs() ?>
</div><!-- /.container-fluid --> </div><!-- /.container-fluid -->
@ -220,6 +226,7 @@ else{}
<div id='debug'></div> <div id='debug'></div>
<div class='container' id='contenedor_principal'> <div class='container' id='contenedor_principal'>
<div id='contenido'> <div id='contenido'>
<div class='row'> <div class='row'>
<div id='' class='col-sm-6'> <div id='' class='col-sm-6'>
@ -305,5 +312,11 @@ $(document).ready(function() {
}); });
</script> </script>
<form name='form_session' class='navbar-form navbar-left'>
<div class='input-group'>
<input type='text' name='tiempo_session' size='30' class='form-control input-sm' readonly>
<span class='input-group-addon'><a href='#' onclick="location.reload();" title='Renovar'>Reload</a></span>
</div>
</form><?php echo $_SESSION['timestamp']; ?>
</body> </body>
</html> </html>