Autenticación de 2 factores
This commit is contained in:
@@ -103,8 +103,3 @@ function preferencias()
|
|||||||
{
|
{
|
||||||
include __DIR__ . '/../../views/configuracion/preferencias.php';
|
include __DIR__ . '/../../views/configuracion/preferencias.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
function seguridad()
|
|
||||||
{
|
|
||||||
include __DIR__ . '/../../views/configuracion/seguridad.php';
|
|
||||||
}
|
|
||||||
@@ -87,13 +87,27 @@ function validar()
|
|||||||
sqlsrv_query($conn, $sqlUpdate, $paramsUpdate);
|
sqlsrv_query($conn, $sqlUpdate, $paramsUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$codigo = rand(100000, 999999);
|
||||||
|
$expiracion = date('Y-m-d H:i:s', strtotime('+1 minutes'));
|
||||||
|
$usuarioId = $row['id_usuario'];
|
||||||
|
|
||||||
|
$sql = "INSERT INTO verificaciones (id_usuario, codigo, expiracion) VALUES (?, ?, ?)";
|
||||||
|
$params = [$usuarioId, $codigo, $expiracion];
|
||||||
|
$stmt = sqlsrv_query($conn, $sql, $params);
|
||||||
|
|
||||||
|
enviarConfirmacion($email, $codigo);
|
||||||
|
|
||||||
|
if (!$stmt) {
|
||||||
|
die('Error al generar código de verificación.');
|
||||||
|
}
|
||||||
|
|
||||||
// Redirección por rol
|
// Redirección por rol
|
||||||
if ($row['tipo_usuario'] === 'importador') {
|
if ($row['tipo_usuario'] === 'importador') {
|
||||||
header('Location: /IMPORTADORES/importadores/dashboard');
|
header('Location: /IMPORTADORES/login/confirmar');
|
||||||
} elseif ($row['tipo_usuario'] === 'agente_aduanal') {
|
} elseif ($row['tipo_usuario'] === 'agente_aduanal') {
|
||||||
header('Location: /IMPORTADORES/AGENTES/dashboard');
|
header('Location: /IMPORTADORES/AGENTES/dashboard');
|
||||||
} else {
|
} else {
|
||||||
header('Location: /IMPORTADORES/importadores/dashboard');
|
header('Location: /IMPORTADORES/login/confirmar');
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
@@ -108,6 +122,101 @@ function validar()
|
|||||||
header('Location: /IMPORTADORES/login');
|
header('Location: /IMPORTADORES/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enviarConfirmacion($email, $codigo)
|
||||||
|
{
|
||||||
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->isSMTP();
|
||||||
|
$mail->Host = 'secure.emailsrvr.com';
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
$mail->Username = 'noreply@aduanasoft.com.mx';
|
||||||
|
$mail->Password = $_ENV['SMTP_PASS'];
|
||||||
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
|
$mail->Port = 587;
|
||||||
|
|
||||||
|
$mail->setFrom('noreply@aduanasoft.com.mx', 'SIIH | AduanaSoft');
|
||||||
|
$mail->addAddress($email);
|
||||||
|
$mail->CharSet = 'UTF-8';
|
||||||
|
$mail->isHTML(true);
|
||||||
|
$mail->Subject = 'Código de verificación';
|
||||||
|
|
||||||
|
$mail->Body = "
|
||||||
|
<div style='font-family: Segoe UI, sans-serif; background-color: #f4f6f9; padding: 40px;'>
|
||||||
|
<div style='max-width: 600px; margin: auto; background: #fff; border: 1px solid #ddd; border-radius: 10px; overflow: hidden;'>
|
||||||
|
<div style='background: linear-gradient(to right, #003366, #0055A5); padding: 20px; text-align: center;'>
|
||||||
|
<h2 style='color: white;'>¿Solicitaste acceso a la plataforma?</h2>
|
||||||
|
</div>
|
||||||
|
<div style='padding: 30px; color: #333; font-size: 16px;'>
|
||||||
|
<p>Se ha intentado iniciar sesión con tu cuenta.</p>
|
||||||
|
<div style='text-align: center; margin: 30px 0;'>
|
||||||
|
<p>Tu código de verificación es:</p>
|
||||||
|
<h2 style='color:#333;'>$codigo</h2>
|
||||||
|
</div>
|
||||||
|
<p>Este código expirará en 10 minutos.</p>
|
||||||
|
</div>
|
||||||
|
<div style='background: #e9ecef; text-align: center; padding: 15px; font-size: 13px; color: #666;'>
|
||||||
|
© " . date('Y') . " SIIH · Desarrollado por AduanaSoft
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>";
|
||||||
|
|
||||||
|
$mail->send();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
error_log("Error al enviar confirmación: {$mail->ErrorInfo}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmarAcceso()
|
||||||
|
{
|
||||||
|
$conn = getConnection(); // Asegúrate que esta función retorne una conexión válida
|
||||||
|
|
||||||
|
$codigoIngresado = trim($_POST['codigo'] ?? '');
|
||||||
|
$usuarioId = $_SESSION['usuario_id'] ?? null;
|
||||||
|
$email = $_SESSION['usuario_email'] ?? ''; // Asegúrate de tenerlo en sesión
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
if (!$usuarioId || !$codigoIngresado) {
|
||||||
|
registrarBitacora($conn, $usuarioId, $email, $ip, 0, 'Código no ingresado o datos incompletos');
|
||||||
|
$_SESSION['codigo_error'] = '❌ Datos incompletos.';
|
||||||
|
header('Location: /IMPORTADORES/login/confirmar');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT codigo, expiracion FROM verificaciones
|
||||||
|
WHERE id_usuario = ? AND codigo = ?
|
||||||
|
ORDER BY id DESC";
|
||||||
|
$stmt = sqlsrv_query($conn, $sql, [$usuarioId, $codigoIngresado]);
|
||||||
|
|
||||||
|
if (!$stmt || !($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC))) {
|
||||||
|
registrarBitacora($conn, $usuarioId, $email, $ip, 0, 'Código incorrecto');
|
||||||
|
$_SESSION['codigo_error'] = '❌ Código incorrecto.';
|
||||||
|
header('Location: /IMPORTADORES/login/confirmar');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validar expiración
|
||||||
|
$expiracion = $row['expiracion'];
|
||||||
|
if ($expiracion instanceof DateTime && $expiracion->getTimestamp() < time()) {
|
||||||
|
registrarBitacora($conn, $usuarioId, $email, $ip, 0, 'Código vencido');
|
||||||
|
$_SESSION['codigo_error'] = '❌ El código ha expirado.';
|
||||||
|
header('Location: /IMPORTADORES/login/index');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Código válido
|
||||||
|
registrarBitacora($conn, $usuarioId, $email, $ip, 1, 'Login exitoso');
|
||||||
|
$_SESSION['pendiente_confirmacion'] = false;
|
||||||
|
$_SESSION['codigo_exito'] = '✅ Código verificado correctamente.';
|
||||||
|
header('Location: /IMPORTADORES/importadores/dashboard');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmar()
|
||||||
|
{
|
||||||
|
include __DIR__ . '/../../views/login/confirmacion.php';
|
||||||
|
}
|
||||||
|
|
||||||
function recuperar()
|
function recuperar()
|
||||||
{
|
{
|
||||||
include __DIR__ . '/../../views/login/recuperar.php';
|
include __DIR__ . '/../../views/login/recuperar.php';
|
||||||
|
|||||||
9
app/controllers/seguridad.php
Normal file
9
app/controllers/seguridad.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
require_once __DIR__ . '/../helpers/session.php';
|
||||||
|
require_once __DIR__ . '/../../config/database.php';
|
||||||
|
require_once __DIR__ . '/../helpers/crypto.php';
|
||||||
|
|
||||||
|
function index()
|
||||||
|
{
|
||||||
|
include __DIR__ . '/../../views/seguridad/dashboard_seguridad.php';
|
||||||
|
}
|
||||||
9
emails_tables.txt
Normal file
9
emails_tables.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE verificaciones (
|
||||||
|
id INT IDENTITY(1,1) PRIMARY KEY,
|
||||||
|
id_usuario INT NOT NULL,
|
||||||
|
codigo VARCHAR(10) NOT NULL,
|
||||||
|
expiracion DATETIME NOT NULL,
|
||||||
|
tipo VARCHAR(50) DEFAULT 'login',
|
||||||
|
creado_en DATETIME DEFAULT GETDATE(),
|
||||||
|
FOREIGN KEY (id_usuario) REFERENCES usuarios_sistema(id_usuario)
|
||||||
|
);
|
||||||
177
views/login/confirmacion.php
Normal file
177
views/login/confirmacion.php
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
<?php
|
||||||
|
$nombre = $config['nombre_plataforma'] ?? 'Sistema Integral para Importadores de Hidrocarburos';
|
||||||
|
$siglas = $config['siglas'] ?? 'SIIH';
|
||||||
|
$logo = $config['logo_url'] ?? 'assets/img/logo_siih.png';
|
||||||
|
$color1 = explode(',', $config['colores_primarios'] ?? '#003366,#0055A5')[0];
|
||||||
|
$color2 = explode(',', $config['colores_primarios'] ?? '#003366,#0055A5')[1];
|
||||||
|
$mantenimiento = $config['modo_mantenimiento'] ?? 0;
|
||||||
|
$mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encuentra en mantenimiento temporal. Por favor, vuelve más tarde.';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title><?= htmlspecialchars($siglas) ?> | Recuperación de Contraseña</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #f4f6f9;
|
||||||
|
font-family: 'Segoe UI', sans-serif;
|
||||||
|
position: relative;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar .nav-link, .navbar-brand {
|
||||||
|
color: <?= $color1 ?> !important;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-siih {
|
||||||
|
height: 90px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-container {
|
||||||
|
max-width: 420px;
|
||||||
|
margin: 80px auto;
|
||||||
|
background: white;
|
||||||
|
padding: 40px;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
|
||||||
|
z-index: 10;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
background-color: #e9ecef;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Contenedor de fondo semitransparente para las vistas */
|
||||||
|
.overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
#mensaje {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
@media (max-height: 600px) {
|
||||||
|
footer {
|
||||||
|
position: static !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navbar institucional -->
|
||||||
|
<nav class="navbar navbar-expand-lg">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand d-flex align-items-center text-dark" href="#">
|
||||||
|
<img src="/IMPORTADORES/public/<?= htmlspecialchars($logo) ?>" alt="Logo" class="logo-siih">
|
||||||
|
| Inicio de Importador
|
||||||
|
</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/IMPORTADORES/">Inicio</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link " aria-current="page" href="/IMPORTADORES/registro">Registro</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" href="/IMPORTADORES/login">Inicio sesión</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<?php if ($mantenimiento): ?>
|
||||||
|
<div class="container mt-4">
|
||||||
|
<div class="alert alert-danger text-center" role="alert">
|
||||||
|
<i class="fas fa-triangle-exclamation me-2"></i>
|
||||||
|
<?= htmlspecialchars($mensajeMantenimiento) ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Overlay (fondo semitransparente) que cubre la pantalla -->
|
||||||
|
<div class="overlay"></div>
|
||||||
|
|
||||||
|
<!-- Formulario de confirmación de acceso -->
|
||||||
|
<div class="login-container">
|
||||||
|
<h4 class="mb-4 text-center text-success">Confirma el Acceso</h4>
|
||||||
|
|
||||||
|
<!-- Formulario para verificar el código -->
|
||||||
|
<form id="formConfirmacion" action="/IMPORTADORES/login/confirmarAcceso" method="POST">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label" for="codigo">Código recibido por correo</label>
|
||||||
|
<input type="text" id="codigo" name="codigo" class="form-control" required pattern="\d{6}" maxlength="6" placeholder="Ej. 123456">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary w-100">Verificar código</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="mensaje" class="mt-3 text-center fw-bold">
|
||||||
|
<?php if (isset($_SESSION['codigo_error'])): ?>
|
||||||
|
<div class="text-danger"><?= $_SESSION['codigo_error'] ?></div>
|
||||||
|
<?php unset($_SESSION['codigo_error']); ?>
|
||||||
|
<?php elseif (isset($_SESSION['codigo_exito'])): ?>
|
||||||
|
<div class="text-success"><?= $_SESSION['codigo_exito'] ?></div>
|
||||||
|
<?php unset($_SESSION['codigo_exito']); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$redirigirA = $_SESSION['redirigir_a'] ?? null;
|
||||||
|
$delayMs = $_SESSION['delay_redireccion'] ?? null;
|
||||||
|
unset($_SESSION['redirigir_a'], $_SESSION['delay_redireccion']);
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const redirigirA = <?= json_encode($redirigirA) ?>;
|
||||||
|
const delay = <?= json_encode($delayMs) ?>;
|
||||||
|
|
||||||
|
if (redirigirA && delay) {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = redirigirA;
|
||||||
|
}, parseInt(delay));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- FOOTER -->
|
||||||
|
<footer class="fixed-bottom">
|
||||||
|
© <?= date('Y') ?> <?= htmlspecialchars($siglas) ?> · <?= htmlspecialchars($nombre) ?>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -74,17 +74,19 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- SEGURIDAD -->
|
<!-- SEGURIDAD -->
|
||||||
<a href="/IMPORTADORES/configuracion/seguridad"
|
<a href="/IMPORTADORES/seguridad/index"
|
||||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/seguridad') ? 'active' : '' ?>">
|
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/seguridad/index') ? 'active' : '' ?>">
|
||||||
🦺 Seguridad
|
🦺 Seguridad
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- BITÁCORAS -->
|
<!-- BITÁCORAS -->
|
||||||
<?php
|
<?php
|
||||||
// Detecta si estamos en alguna ruta de bitácoras
|
|
||||||
$esVistaBitacoras = str_contains($_SERVER['REQUEST_URI'], '/bitacoras');
|
|
||||||
// Detecta si estamos en alguna parte de configuración
|
// Detecta si estamos en alguna parte de configuración
|
||||||
$esConfiguracion = str_contains($_SERVER['REQUEST_URI'], '/configuracion');
|
$esConfiguracion = str_contains($_SERVER['REQUEST_URI'], '/configuracion');
|
||||||
|
// Detecta si estamos en alguna ruta de bitácoras
|
||||||
|
$esVistaBitacoras = str_contains($_SERVER['REQUEST_URI'], '/bitacoras');
|
||||||
|
// Detecta si estamos en alguna parta de seguridad
|
||||||
|
$esVistaSeguridad = str_contains($_SERVER['REQUEST_URI'], '/seguridad')
|
||||||
?>
|
?>
|
||||||
<?php if ($esVistaBitacoras): ?>
|
<?php if ($esVistaBitacoras): ?>
|
||||||
<!-- Estamos en cualquier página relacionada a bitácoras -->
|
<!-- Estamos en cualquier página relacionada a bitácoras -->
|
||||||
@@ -108,6 +110,13 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
|||||||
📖 Bitácoras
|
📖 Bitácoras
|
||||||
<span class="badge bg-secondary">1</span>
|
<span class="badge bg-secondary">1</span>
|
||||||
</a>
|
</a>
|
||||||
|
<?php elseif ($esVistaSeguridad): ?>
|
||||||
|
<!-- Si estamos en configuración, pero no en bitácoras -->
|
||||||
|
<a href="/IMPORTADORES/bitacoras/index"
|
||||||
|
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||||
|
📖 Bitácoras
|
||||||
|
<span class="badge bg-secondary">1</span>
|
||||||
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,16 +144,42 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- SEGURIDAD -->
|
<!-- SEGURIDAD -->
|
||||||
<a href="/IMPORTADORES/configuracion/seguridad"
|
<a href="/IMPORTADORES/seguridad/index"
|
||||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/seguridad') ? 'active' : '' ?>">
|
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/seguridad/index') ? 'active' : '' ?>">
|
||||||
🦺 Seguridad
|
🦺 Seguridad
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- BITÁCORAS -->
|
<!-- BITÁCORAS -->
|
||||||
<a href="/IMPORTADORES/configuracion/bitacoras"
|
<?php if ($esVistaBitacoras): ?>
|
||||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/bitacoras') ? 'active' : '' ?>">
|
<!-- Estamos en cualquier página relacionada a bitácoras -->
|
||||||
📖 Bitácoras
|
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaBitacoras ? 'active' : '' ?>"
|
||||||
</a>
|
data-bs-toggle="collapse" href="#submenuBitacoras" role="button" aria-expanded="true" aria-controls="submenuBitacoras">
|
||||||
|
📖 Bitácoras
|
||||||
|
<span class="badge bg-secondary">1</span>
|
||||||
|
</a>
|
||||||
|
<div class="collapse show" id="submenuBitacoras">
|
||||||
|
<nav class="nav flex-column ms-3">
|
||||||
|
<a href="/IMPORTADORES/bitacoras/lista"
|
||||||
|
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/bitacoras/lista' ? 'active' : '' ?>">
|
||||||
|
• Registro de Accesos
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<?php elseif ($esConfiguracion): ?>
|
||||||
|
<!-- Si estamos en configuración, pero no en bitácoras -->
|
||||||
|
<a href="/IMPORTADORES/bitacoras/index"
|
||||||
|
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||||
|
📖 Bitácoras
|
||||||
|
<span class="badge bg-secondary">1</span>
|
||||||
|
</a>
|
||||||
|
<?php elseif ($esVistaSeguridad): ?>
|
||||||
|
<!-- Si estamos en configuración, pero no en bitácoras -->
|
||||||
|
<a href="/IMPORTADORES/bitacoras/index"
|
||||||
|
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||||
|
📖 Bitácoras
|
||||||
|
<span class="badge bg-secondary">1</span>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,9 +78,44 @@ include __DIR__ . '/../partials/sidebar_configuracion.php';
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h4 class="mb-4">🦺 Seguridad</h4>
|
<h4 class="mb-4">🦺 Seguridad</h4>
|
||||||
|
|
||||||
|
<div class="row g-3">
|
||||||
|
|
||||||
|
<div class="col-md-7">
|
||||||
|
<div class="card shadow-sm p-3">
|
||||||
|
<h4 class="mb-4 text-dark">Recibe Notificaciones</h4>
|
||||||
|
<p>Agrega un correo adicional para recibir notificaciones.</p>
|
||||||
|
<form action="/IMPORTADORES/seguridad/respaldo" method="POST">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Correo electrónico</label>
|
||||||
|
<input type="email" name="email-extra" class="form-control" required value="">
|
||||||
|
</div>
|
||||||
|
<div class="d-grid">
|
||||||
|
<button type="submit" class="btn btn-primary">Registrar</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-7">
|
||||||
|
<div class="card shadow-sm p-3">
|
||||||
|
<h4 class="mb-4 text-dark">Correo de Respaldo</h4>
|
||||||
|
<p>Agrega un correo de respaldo para reuperación de tu cuenta.</p>
|
||||||
|
<form action="/IMPORTADORES/seguridad/respaldo" method="POST">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Correo electrónico respaldo</label>
|
||||||
|
<input type="email" name="email-respaldo" class="form-control" required value="">
|
||||||
|
</div>
|
||||||
|
<div class="d-grid">
|
||||||
|
<button type="submit" class="btn btn-success">Registrar</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user