From ac299252cdcd627fec54586a95da10ff107ac954 Mon Sep 17 00:00:00 2001 From: Alexeer Date: Tue, 3 Jun 2025 10:56:59 -0600 Subject: [PATCH] =?UTF-8?q?Validaci=C3=B3n=20correo=20y=20contrase=C3=B1a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/login.php | 9 ++++++--- views/login/index.php | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/app/controllers/login.php b/app/controllers/login.php index 3c818b3..fa5eac8 100644 --- a/app/controllers/login.php +++ b/app/controllers/login.php @@ -135,14 +135,17 @@ function validar() } else { registrarBitacora($conn, $row['id_usuario'], $email, $ip, 0, 'Contraseña incorrecta'); + $_SESSION['login_error'] = '❌ Contraseña incorrecta, intenta nuevamente.'; + header('Location: /IMPORTADORES/login'); + exit; } } else { registrarBitacora($conn, null, $email, $ip, 0, 'Usuario no encontrado'); + $_SESSION['login_error'] = '❌ Correo no encontrado, debe registrarse primero.'; + header('Location: /IMPORTADORES/login'); + exit; } - - $_SESSION['login_error'] = 'Credenciales incorrectas.'; - header('Location: /IMPORTADORES/login'); } /** Función auxiliar para redirección por rol **/ diff --git a/views/login/index.php b/views/login/index.php index 3d937d8..0666b99 100644 --- a/views/login/index.php +++ b/views/login/index.php @@ -72,6 +72,14 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue color: #666; margin-top: 60px; } + #mensaje { + transition: opacity 0.3s ease; + } + @media (max-height: 600px) { + footer { + position: static !important; + } + } @@ -131,6 +139,14 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue + +
+ +
+ + +
+