Correo respaldo y notificaciones
This commit is contained in:
@@ -55,6 +55,16 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
<div class="d-none d-md-block bg-dark text-white position-fixed h-100 pt-5" style="width: 250px;">
|
||||
<nav class="nav flex-column">
|
||||
|
||||
<!-- Definimos variables de ubicación -->
|
||||
<?php
|
||||
// Detecta si estamos en alguna parte de configuración
|
||||
$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');
|
||||
?>
|
||||
|
||||
<!-- INFORMACIÓN GENERAL -->
|
||||
<a href="/IMPORTADORES/configuracion/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/dashboard_configuracion') ? 'active' : '' ?>">
|
||||
@@ -74,24 +84,41 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
|
||||
<!-- SEGURIDAD -->
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/seguridad/index') ? 'active' : '' ?>">
|
||||
🦺 Seguridad
|
||||
</a>
|
||||
|
||||
<?php if ($esVistaSeguridad): ?>
|
||||
<?php $enDashboardSeguridad = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/seguridad/index'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaSeguridad ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardSeguridad ? '#submenuSeguridad' : '/IMPORTADORES/seguridad/index' ?>"
|
||||
<?= $enDashboardSeguridad ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuSeguridad"
|
||||
onclick="<?= $enDashboardSeguridad ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/seguridad/index\';' ?>">
|
||||
👮 Seguridad
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuSeguridad">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/seguridad/opciones"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/seguridad/opciones' ? 'active' : '' ?>">
|
||||
• Opciones de Seguridad
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
👮 Seguridad
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- BITÁCORAS -->
|
||||
<?php
|
||||
// Detecta si estamos en alguna parte de configuración
|
||||
$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 $enDashboardBitacoras = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/bitacoras/index'; ?>
|
||||
<!-- Estamos en cualquier página relacionada a bitácoras -->
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaBitacoras ? 'active' : '' ?>"
|
||||
data-bs-toggle="collapse" href="#submenuBitacoras" role="button" aria-expanded="true" aria-controls="submenuBitacoras">
|
||||
href="<?= $enDashboardBitacoras ? '#submenuBitacoras' : '/IMPORTADORES/bitacoras/index' ?>"
|
||||
<?= $enDashboardBitacoras ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuBitacoras"
|
||||
onclick="<?= $enDashboardBitacoras ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/bitacoras/index\';' ?>">
|
||||
📖 Bitácoras
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
@@ -103,14 +130,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</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): ?>
|
||||
<?php elseif ($esConfiguracion || $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">
|
||||
@@ -118,6 +138,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -144,16 +165,41 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
|
||||
<!-- SEGURIDAD -->
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/seguridad/index') ? 'active' : '' ?>">
|
||||
🦺 Seguridad
|
||||
</a>
|
||||
<?php if ($esVistaSeguridad): ?>
|
||||
<?php $enDashboardSeguridad = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/seguridad/index'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaSeguridad ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardSeguridad ? '#submenuSeguridad' : '/IMPORTADORES/seguridad/index' ?>"
|
||||
<?= $enDashboardSeguridad ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuSeguridad"
|
||||
onclick="<?= $enDashboardSeguridad ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/seguridad/index\';' ?>">
|
||||
👮 Seguridad
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuSeguridad">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/seguridad/opciones"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/seguridad/opciones' ? 'active' : '' ?>">
|
||||
• Opciones de Seguridad
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
👮 Seguridad
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- BITÁCORAS -->
|
||||
<?php if ($esVistaBitacoras): ?>
|
||||
<?php $enDashboardBitacoras = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/bitacoras/index'; ?>
|
||||
<!-- Estamos en cualquier página relacionada a bitácoras -->
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaBitacoras ? 'active' : '' ?>"
|
||||
data-bs-toggle="collapse" href="#submenuBitacoras" role="button" aria-expanded="true" aria-controls="submenuBitacoras">
|
||||
href="<?= $enDashboardBitacoras ? '#submenuBitacoras' : '/IMPORTADORES/bitacoras/index' ?>"
|
||||
<?= $enDashboardBitacoras ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuBitacoras"
|
||||
onclick="<?= $enDashboardBitacoras ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/bitacoras/index\';' ?>">
|
||||
📖 Bitácoras
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
@@ -165,14 +211,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</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): ?>
|
||||
<?php elseif ($esConfiguracion || $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">
|
||||
|
||||
Reference in New Issue
Block a user