483 lines
14 KiB
PHP
483 lines
14 KiB
PHP
<?php
|
|
require_once __DIR__ . '/../../config/database.php';
|
|
$conn = getConnection();
|
|
|
|
$sql = "SELECT TOP 1 * FROM configuracion_sistema";
|
|
$stmt = sqlsrv_query($conn, $sql);
|
|
$config = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC);
|
|
|
|
// Variables con valores por defecto - Branding moderno
|
|
$nombre = $config['nombre_plataforma'] ?? 'Sistema de Gestión de Importaciones';
|
|
$siglas = $config['siglas'] ?? 'AduanaSoft';
|
|
$logo = $config['logo_url'] ?? 'assets/img/logo_aduanasoft.png';
|
|
$color1 = explode(',', $config['colores_primarios'] ?? '#0f172a,#334155')[0];
|
|
$color2 = explode(',', $config['colores_primarios'] ?? '#0f172a,#334155')[1];
|
|
|
|
// Obtener tipo de confirmación y mensaje
|
|
$tipo = $_GET['tipo'] ?? 'success';
|
|
$mensaje = $_GET['mensaje'] ?? 'Operación completada exitosamente';
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title><?= htmlspecialchars($siglas) ?> | Confirmación</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Confirmación de operación en tu cuenta de importaciones">
|
|
<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">
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--primary: <?= $color1 ?>;
|
|
--secondary: <?= $color2 ?>;
|
|
--accent: #10b981;
|
|
--surface: #ffffff;
|
|
--background: #f8fafc;
|
|
--text: #1e293b;
|
|
--text-muted: #64748b;
|
|
--border: #e2e8f0;
|
|
--success: #16a34a;
|
|
--error: #ef4444;
|
|
--warning: #f59e0b;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
background: linear-gradient(135deg, var(--background) 0%, #e2e8f0 100%);
|
|
font-family: 'Poppins', sans-serif;
|
|
color: var(--text);
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.navbar {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 1rem 0;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-weight: 600;
|
|
font-size: 1.25rem;
|
|
color: var(--primary) !important;
|
|
}
|
|
|
|
.nav-link {
|
|
color: var(--text-muted) !important;
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem !important;
|
|
border-radius: 8px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
color: var(--primary) !important;
|
|
background-color: #f1f5f9;
|
|
}
|
|
|
|
.confirmation-container {
|
|
max-width: 500px;
|
|
margin: 3rem auto;
|
|
background: var(--surface);
|
|
border-radius: 20px;
|
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
|
|
padding: 3rem;
|
|
border: 1px solid var(--border);
|
|
position: relative;
|
|
overflow: hidden;
|
|
text-align: center;
|
|
}
|
|
|
|
.confirmation-container::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 4px;
|
|
background: linear-gradient(90deg, var(--accent), var(--primary));
|
|
}
|
|
|
|
.confirmation-icon {
|
|
width: 100px;
|
|
height: 100px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 2rem;
|
|
color: white;
|
|
font-size: 2.5rem;
|
|
position: relative;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.icon-success {
|
|
background: linear-gradient(135deg, var(--success), #059669);
|
|
}
|
|
|
|
.icon-error {
|
|
background: linear-gradient(135deg, var(--error), #dc2626);
|
|
}
|
|
|
|
.icon-warning {
|
|
background: linear-gradient(135deg, var(--warning), #d97706);
|
|
}
|
|
|
|
.icon-info {
|
|
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
|
|
}
|
|
70% {
|
|
box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
|
|
}
|
|
100% {
|
|
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
|
|
}
|
|
}
|
|
|
|
.confirmation-title {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.confirmation-message {
|
|
color: var(--text-muted);
|
|
font-size: 1.1rem;
|
|
line-height: 1.6;
|
|
margin-bottom: 2.5rem;
|
|
max-width: 400px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.btn-modern {
|
|
padding: 12px 28px;
|
|
border-radius: 12px;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
transition: all 0.3s ease;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.btn-primary-modern {
|
|
background: linear-gradient(135deg, var(--accent), #059669);
|
|
color: white;
|
|
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.btn-primary-modern:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
|
|
color: white;
|
|
}
|
|
|
|
.btn-outline-modern {
|
|
background: transparent;
|
|
color: var(--text-muted);
|
|
border: 2px solid var(--border);
|
|
}
|
|
|
|
.btn-outline-modern:hover {
|
|
background: var(--background);
|
|
color: var(--text);
|
|
border-color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.additional-info {
|
|
background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
|
|
border: 1px solid #38bdf8;
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-top: 2rem;
|
|
color: #0c4a6e;
|
|
text-align: left;
|
|
}
|
|
|
|
.countdown {
|
|
font-weight: 600;
|
|
color: var(--accent);
|
|
margin-top: 1rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
footer {
|
|
background: var(--text);
|
|
color: #94a3b8;
|
|
padding: 2rem 0;
|
|
text-align: center;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.footer-text {
|
|
font-size: 0.9rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.confirmation-container {
|
|
margin: 2rem 1rem;
|
|
padding: 2rem 1.5rem;
|
|
}
|
|
|
|
.confirmation-title {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.confirmation-icon {
|
|
width: 80px;
|
|
height: 80px;
|
|
font-size: 2rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- NAVBAR -->
|
|
<nav class="navbar navbar-expand-lg">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="/IMPORTADORES/">
|
|
<i class="fas fa-shipping-fast me-2"></i><?= htmlspecialchars($siglas) ?>
|
|
</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" href="/IMPORTADORES/registro">Registro</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/IMPORTADORES/login">Iniciar Sesión</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- CONTENEDOR DE CONFIRMACIÓN -->
|
|
<div class="confirmation-container">
|
|
<?php
|
|
// Determinar icono y títulos según el tipo
|
|
$iconClass = 'icon-success';
|
|
$iconSymbol = 'fa-check';
|
|
$title = 'Operación Exitosa';
|
|
|
|
switch($tipo) {
|
|
case 'password_changed':
|
|
$iconClass = 'icon-success';
|
|
$iconSymbol = 'fa-check';
|
|
$title = '¡Contraseña Actualizada!';
|
|
$mensaje = 'Tu contraseña ha sido cambiada exitosamente. Ya puedes iniciar sesión con tu nueva contraseña.';
|
|
break;
|
|
|
|
case 'code_sent':
|
|
$iconClass = 'icon-info';
|
|
$iconSymbol = 'fa-envelope';
|
|
$title = '¡Código Enviado!';
|
|
$mensaje = 'Hemos enviado un código de verificación a tu correo electrónico. Revisa tu bandeja de entrada y spam.';
|
|
break;
|
|
|
|
case 'registration_sent':
|
|
$iconClass = 'icon-success';
|
|
$iconSymbol = 'fa-paper-plane';
|
|
$title = '¡Solicitud Enviada!';
|
|
$mensaje = 'Tu solicitud de registro ha sido enviada correctamente. Recibirás una notificación por correo cuando sea aprobada.';
|
|
break;
|
|
|
|
case 'error':
|
|
$iconClass = 'icon-error';
|
|
$iconSymbol = 'fa-times';
|
|
$title = 'Error en la Operación';
|
|
break;
|
|
|
|
case 'warning':
|
|
$iconClass = 'icon-warning';
|
|
$iconSymbol = 'fa-exclamation-triangle';
|
|
$title = 'Atención Requerida';
|
|
break;
|
|
|
|
default:
|
|
$iconClass = 'icon-success';
|
|
$iconSymbol = 'fa-check';
|
|
$title = 'Operación Completada';
|
|
}
|
|
?>
|
|
|
|
<div class="confirmation-icon <?= $iconClass ?>">
|
|
<i class="fas <?= $iconSymbol ?>"></i>
|
|
</div>
|
|
|
|
<h1 class="confirmation-title"><?= htmlspecialchars($title) ?></h1>
|
|
|
|
<p class="confirmation-message">
|
|
<?= htmlspecialchars($mensaje) ?>
|
|
</p>
|
|
|
|
<div class="action-buttons">
|
|
<?php if ($tipo === 'password_changed'): ?>
|
|
<a href="/IMPORTADORES/login" class="btn-modern btn-primary-modern">
|
|
<i class="fas fa-sign-in-alt"></i>
|
|
Iniciar Sesión
|
|
</a>
|
|
|
|
<?php elseif ($tipo === 'code_sent'): ?>
|
|
<a href="/IMPORTADORES/login/verificar_codigo" class="btn-modern btn-primary-modern">
|
|
<i class="fas fa-key"></i>
|
|
Verificar Código
|
|
</a>
|
|
<a href="/IMPORTADORES/login/recuperar" class="btn-modern btn-outline-modern">
|
|
<i class="fas fa-arrow-left"></i>
|
|
Volver
|
|
</a>
|
|
|
|
<?php elseif ($tipo === 'registration_sent'): ?>
|
|
<a href="/IMPORTADORES/" class="btn-modern btn-primary-modern">
|
|
<i class="fas fa-home"></i>
|
|
Ir al Inicio
|
|
</a>
|
|
<a href="/IMPORTADORES/login" class="btn-modern btn-outline-modern">
|
|
<i class="fas fa-sign-in-alt"></i>
|
|
Iniciar Sesión
|
|
</a>
|
|
|
|
<?php else: ?>
|
|
<a href="/IMPORTADORES/login" class="btn-modern btn-primary-modern">
|
|
<i class="fas fa-sign-in-alt"></i>
|
|
Iniciar Sesión
|
|
</a>
|
|
<a href="/IMPORTADORES/" class="btn-modern btn-outline-modern">
|
|
<i class="fas fa-home"></i>
|
|
Ir al Inicio
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php if ($tipo === 'code_sent'): ?>
|
|
<div class="additional-info">
|
|
<div class="d-flex align-items-start">
|
|
<i class="fas fa-info-circle me-2 mt-1"></i>
|
|
<div>
|
|
<strong>¿No recibiste el código?</strong><br>
|
|
<small>
|
|
• Revisa tu carpeta de spam o correo no deseado<br>
|
|
• El código es válido por 15 minutos<br>
|
|
• Puedes solicitar un nuevo código si es necesario
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($tipo === 'registration_sent'): ?>
|
|
<div class="additional-info">
|
|
<div class="d-flex align-items-start">
|
|
<i class="fas fa-clock me-2 mt-1"></i>
|
|
<div>
|
|
<strong>Proceso de Revisión</strong><br>
|
|
<small>
|
|
• Nuestro equipo revisará tu solicitud en las próximas 24-48 horas<br>
|
|
• Recibirás un correo con el resultado de la evaluación<br>
|
|
• Asegúrate de revisar tu bandeja de entrada regularmente
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (in_array($tipo, ['password_changed', 'registration_sent'])): ?>
|
|
<div class="countdown" id="countdown">
|
|
Serás redirigido automáticamente en <span id="timer">10</span> segundos...
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- FOOTER -->
|
|
<footer>
|
|
<div class="container text-center">
|
|
<div class="footer-text">
|
|
© <?= date('Y') ?> <?= htmlspecialchars($siglas) ?> - <?= htmlspecialchars($nombre) ?><br>
|
|
Plataforma segura de gestión de importaciones
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<script>
|
|
// Redirección automática para ciertos tipos
|
|
<?php if (in_array($tipo, ['password_changed', 'registration_sent'])): ?>
|
|
let timeLeft = 10;
|
|
const timerElement = document.getElementById('timer');
|
|
const countdownElement = document.getElementById('countdown');
|
|
|
|
const countdown = setInterval(() => {
|
|
timeLeft--;
|
|
timerElement.textContent = timeLeft;
|
|
|
|
if (timeLeft <= 0) {
|
|
clearInterval(countdown);
|
|
<?php if ($tipo === 'password_changed'): ?>
|
|
window.location.href = '/IMPORTADORES/login';
|
|
<?php elseif ($tipo === 'registration_sent'): ?>
|
|
window.location.href = '/IMPORTADORES/';
|
|
<?php endif; ?>
|
|
}
|
|
}, 1000);
|
|
|
|
// Permitir cancelar la redirección automática
|
|
document.addEventListener('click', () => {
|
|
if (timeLeft > 0) {
|
|
clearInterval(countdown);
|
|
countdownElement.style.display = 'none';
|
|
}
|
|
});
|
|
<?php endif; ?>
|
|
|
|
// Animación de entrada
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const container = document.querySelector('.confirmation-container');
|
|
container.style.opacity = '0';
|
|
container.style.transform = 'translateY(20px)';
|
|
|
|
setTimeout(() => {
|
|
container.style.transition = 'all 0.5s ease';
|
|
container.style.opacity = '1';
|
|
container.style.transform = 'translateY(0)';
|
|
}, 100);
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|