LoginLogoff
Project loginlogoff
Loading...
Searching...
No Matches
vInicioPrivado.php
Go to the documentation of this file.
1<form method="post">
2 <p id="arribaDerecha"><button class="login" name="LOGOFF">LOGOFF</button></p>
3</form>
4<h2 class="mensaje">Bienvenido/a al inicio privado de la aplicacion, <?php echo $avInicioPrivado['descUsuario']; ?></h2>
5 <div class="mensaje">
6<?php
7 if ($avInicioPrivado['numConexiones'] <= 1) {
8 echo "¡Esta es tu primera conexión!<br>";
9 } else {
10 // Si fechaAnterior ya es un objeto DateTime no hace falta hacer el "new DateTime", se puede usar:
11 if ($avInicioPrivado['fechaHoraUltimaConexionAnterior'] instanceof DateTime) {
12 // Formatear la fecha y hora según la configuración regional española
13 //IntlDateFormatter::FULL - muestra la fecha completa (día de la semana, día, mes y año)
14 //IntlDateFormatter::LONG - mostraría la fecha (día, mes y año)
15 //IntlDateFormatter::MEDIUM - mostraría la fecha abreviada (ejemplo:12 ene 2025)
16 //IntlDateFormatter::NONE - no muestra la hora
17 $oFormatoFecha = new IntlDateFormatter('es_ES', IntlDateFormatter::FULL, IntlDateFormatter::NONE);
18
19 $fecha = $oFormatoFecha->format($avInicioPrivado['fechaHoraUltimaConexionAnterior']);
20 $hora = $avInicioPrivado['fechaHoraUltimaConexionAnterior']->format('H:i');
21 echo "Esta es la vez número " . $avInicioPrivado['numConexiones'] . " que se conecta.<br>";
22 echo "Usted se conectó por última vez el <br>";
23 echo $fecha . " a las " . $hora;
24 }
25 }
26?>
27 </div>
28<form method="post">
29 <button class="detalle" name="DETALLE">DETALLE</button>
30</form>
31<form method="post">
32 <button class="detalle" name="WIP">WIP</button>
33</form>
34<form method="post">
35 <button class="detalle" name="ERROR">Error</button>
36</form>
if(empty($_SESSION['usuarioMiAplicacion'])) if(isset( $_REQUEST[ 'LOGOFF'])) if(isset($_REQUEST['DETALLE'])) if(isset( $_REQUEST[ 'WIP'])) if(isset($_REQUEST['ERROR'])) $avInicioPrivado