Tul xxx Tul
User / IP
:
216.73.217.33
Host / Server
:
45.84.207.204 / aircan.me
System
:
Linux lt-bnk-web1726.main-hosting.eu 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
u931257429
/
domains
/
aircan.me
/
public_html
/
piscina
/
app
/
views
/
empleados
/
Viewing: asistencia.php
<!-- Mobile-optimized Asistencia CSS --> <style> body { overflow-x: hidden; } .empleados-asistencia { max-width: 100%; overflow-x: hidden; } .card, .card-body, .row, .col { max-width: 100%; } .asistencia-card-mobile { border-radius: 12px; transition: all 0.3s ease; border: 1px solid rgba(0,0,0,0.08); max-width: 100%; margin-bottom: 0.75rem; } .asistencia-card-mobile:active { transform: scale(0.98); } @media (max-width: 767.98px) { html, body { max-width: 100vw; overflow-x: hidden; } .container-fluid { padding-left: 0.75rem !important; padding-right: 0.75rem !important; } .empleados-asistencia { padding: 1rem 0 !important; } .empleados-asistencia h1 { font-size: 1.35rem; } .empleados-asistencia h2 { font-size: 1.1rem; } .btn { font-size: 0.85rem; padding: 0.5rem 0.75rem; white-space: nowrap; } .badge { font-size: 0.7rem; } .card-body { padding: 1rem !important; } .alert { font-size: 0.85rem; padding: 0.75rem; } .row { margin-left: -0.375rem; margin-right: -0.375rem; } .row > * { padding-left: 0.375rem; padding-right: 0.375rem; } } @media (max-width: 575.98px) { .empleados-asistencia h1 { font-size: 1.25rem; } .btn { font-size: 0.8rem; padding: 0.45rem 0.65rem; } } </style> <div class="empleados-asistencia container-fluid py-4"> <?php if (!empty($mensaje)): ?> <div class="alert alert-<?php echo htmlspecialchars($mensaje['tipo'], ENT_QUOTES, 'UTF-8'); ?> border-0 shadow-sm mb-4"> <i class="fa-solid fa-circle-info me-2"></i><?php echo htmlspecialchars($mensaje['mensaje'], ENT_QUOTES, 'UTF-8'); ?> </div> <?php endif; ?> <div class="d-flex flex-column flex-lg-row justify-content-between align-items-start align-items-lg-center gap-3 mb-3 mb-md-4"> <div class="flex-grow-1"> <h1 class="fw-bold mb-1">Control de asistencia</h1> <p class="text-muted mb-0 small">Registra entradas y salidas de los colaboradores en tiempo real.</p> </div> <div class="d-flex flex-column flex-sm-row gap-2 w-100 w-lg-auto"> <a class="btn btn-outline-secondary d-flex align-items-center justify-content-center gap-2" href="<?php echo base_url('empleados'); ?>"> <i class="fa-solid fa-list"></i> <span class="d-none d-sm-inline">Volver al listado</span> <span class="d-sm-none">Volver</span> </a> <a class="btn btn-outline-success d-flex align-items-center justify-content-center gap-2" href="<?php echo base_url('empleados/tareas'); ?>"> <i class="fa-solid fa-clipboard-list"></i> <span class="d-none d-sm-inline">Ver tareas</span> <span class="d-sm-none">Tareas</span> </a> </div> </div> <div class="row g-2 g-md-3 mb-3 mb-md-4"> <div class="col-12 col-xl-4 order-1 order-xl-1"> <div class="card border-0 shadow-sm h-100"> <div class="card-body p-3 p-md-4"> <h2 class="h5 fw-semibold mb-3">En turno ahora</h2> <?php if (empty($enTurno)): ?> <div class="alert alert-light border text-muted mb-0">Ningún colaborador ha marcado entrada.</div> <?php else: ?> <ul class="list-group list-group-flush"> <?php foreach ($enTurno as $empleado): ?> <?php $asistencias = \App\Models\Empleado::asistencias($empleado['id']); $registroHoy = end($asistencias); if (!$registroHoy || $registroHoy['fecha'] !== date('Y-m-d')) { $registroHoy = null; } ?> <li class="list-group-item d-flex align-items-start justify-content-between"> <div> <div class="fw-semibold"><?php echo htmlspecialchars($empleado['nombre'], ENT_QUOTES, 'UTF-8'); ?></div> <?php if ($registroHoy && !empty($registroHoy['entrada'])): ?> <small class="text-muted">Entrada: <?php echo htmlspecialchars($registroHoy['entrada'], ENT_QUOTES, 'UTF-8'); ?></small> <?php endif; ?> </div> <a class="btn btn-sm btn-outline-danger" href="<?php echo base_url('empleados/marcarSalida/' . $empleado['id']); ?>"> <i class="fa-solid fa-door-open"></i> </a> </li> <?php endforeach; ?> </ul> <?php endif; ?> </div> </div> </div> <div class="col-12 col-xl-8 order-2 order-xl-2"> <div class="card border-0 shadow-sm h-100"> <div class="card-body p-3 p-md-4"> <div class="d-flex justify-content-between align-items-center mb-3"> <h2 class="h5 fw-semibold mb-0">Registrar asistencia</h2> <small class="text-muted"><?php echo date('d/m/Y'); ?></small> </div> <!-- Mobile View: Cards --> <div class="d-md-none"> <?php if (empty($empleados)): ?> <div class="alert alert-info d-flex align-items-center" role="alert"> <i class="fa-solid fa-info-circle fa-2x me-3"></i> <div> <h6 class="alert-heading mb-1">No hay empleados</h6> <p class="mb-0 small">No hay empleados activos para mostrar.</p> </div> </div> <?php else: ?> <?php foreach ($empleados as $empleado): ?> <?php $asistencias = \App\Models\Empleado::asistencias($empleado['id']); $registroHoy = null; foreach (array_reverse($asistencias) as $registro) { if ($registro['fecha'] === date('Y-m-d')) { $registroHoy = $registro; break; } } ?> <div class="card border asistencia-card-mobile shadow-sm" id="empleado-<?php echo $empleado['id']; ?>"> <div class="card-body p-3"> <div class="d-flex justify-content-between align-items-start mb-2"> <div class="flex-grow-1"> <h6 class="fw-bold mb-1"><?php echo htmlspecialchars($empleado['nombre'], ENT_QUOTES, 'UTF-8'); ?></h6> <span class="badge bg-light text-muted border small"> <i class="fa-solid fa-id-badge me-1"></i><?php echo htmlspecialchars($empleado['rol'], ENT_QUOTES, 'UTF-8'); ?> </span> </div> </div> <div class="border-top pt-2 mt-2"> <div class="row g-2 small"> <div class="col-6"> <div class="text-muted">Última entrada</div> <div class="fw-semibold"> <?php if (!empty($registroHoy['entrada'])): ?> <?php echo htmlspecialchars($registroHoy['entrada'], ENT_QUOTES, 'UTF-8'); ?> <?php else: ?> — <?php endif; ?> </div> </div> <div class="col-6"> <div class="text-muted">Última salida</div> <div class="fw-semibold"> <?php if (!empty($registroHoy['salida'])): ?> <?php echo htmlspecialchars($registroHoy['salida'], ENT_QUOTES, 'UTF-8'); ?> <?php else: ?> — <?php endif; ?> </div> </div> </div> </div> <div class="d-flex gap-2 mt-3"> <a class="btn btn-sm btn-outline-success flex-fill d-flex align-items-center justify-content-center gap-1" href="<?php echo base_url('empleados/marcarEntrada/' . $empleado['id']); ?>" <?php echo ($registroHoy && $registroHoy['entrada'] && !$registroHoy['salida']) ? 'disabled' : ''; ?>> <i class="fa-solid fa-door-closed"></i> <span>Entrada</span> </a> <a class="btn btn-sm btn-outline-danger flex-fill d-flex align-items-center justify-content-center gap-1" href="<?php echo base_url('empleados/marcarSalida/' . $empleado['id']); ?>" <?php echo !$registroHoy || !$registroHoy['entrada'] || $registroHoy['salida'] ? 'disabled' : ''; ?>> <i class="fa-solid fa-door-open"></i> <span>Salida</span> </a> </div> </div> </div> <?php endforeach; ?> <?php endif; ?> </div> <!-- Desktop View: Table --> <div class="table-responsive d-none d-md-block"> <table class="table align-middle"> <thead class="table-light"> <tr> <th>Empleado</th> <th>Rol</th> <th>Última entrada</th> <th>Última salida</th> <th class="text-end">Acciones</th> </tr> </thead> <tbody> <?php if (empty($empleados)): ?> <tr> <td colspan="5" class="text-center text-muted py-5">No hay empleados activos para mostrar.</td> </tr> <?php else: ?> <?php foreach ($empleados as $empleado): ?> <?php $asistencias = \App\Models\Empleado::asistencias($empleado['id']); $registroHoy = null; foreach (array_reverse($asistencias) as $registro) { if ($registro['fecha'] === date('Y-m-d')) { $registroHoy = $registro; break; } } ?> <tr id="empleado-<?php echo $empleado['id']; ?>"> <td class="fw-semibold"><?php echo htmlspecialchars($empleado['nombre'], ENT_QUOTES, 'UTF-8'); ?></td> <td><span class="badge bg-light text-muted border"><?php echo htmlspecialchars($empleado['rol'], ENT_QUOTES, 'UTF-8'); ?></span></td> <td> <?php if (!empty($registroHoy['entrada'])): ?> <div><?php echo htmlspecialchars($registroHoy['entrada'], ENT_QUOTES, 'UTF-8'); ?></div> <?php if (!empty($registroHoy['fecha_formateada'])): ?> <small class="text-muted"><?php echo htmlspecialchars($registroHoy['fecha_formateada'], ENT_QUOTES, 'UTF-8'); ?></small> <?php endif; ?> <?php else: ?> — <?php endif; ?> </td> <td> <?php if (!empty($registroHoy['salida'])): ?> <div><?php echo htmlspecialchars($registroHoy['salida'], ENT_QUOTES, 'UTF-8'); ?></div> <?php if (!empty($registroHoy['fecha_formateada'])): ?> <small class="text-muted"><?php echo htmlspecialchars($registroHoy['fecha_formateada'], ENT_QUOTES, 'UTF-8'); ?></small> <?php endif; ?> <?php else: ?> — <?php endif; ?> </td> <td class="text-end"> <a class="btn btn-sm btn-outline-success" href="<?php echo base_url('empleados/marcarEntrada/' . $empleado['id']); ?>" <?php echo ($registroHoy && $registroHoy['entrada'] && !$registroHoy['salida']) ? 'disabled' : ''; ?>> <i class="fa-solid fa-door-closed me-1"></i>Entrada </a> <a class="btn btn-sm btn-outline-danger" href="<?php echo base_url('empleados/marcarSalida/' . $empleado['id']); ?>" <?php echo !$registroHoy || !$registroHoy['entrada'] || $registroHoy['salida'] ? 'disabled' : ''; ?>> <i class="fa-solid fa-door-open me-1"></i>Salida </a> </td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> <div class="card border-0 shadow-sm mt-3 mt-md-4"> <div class="card-body p-3 p-md-4"> <div class="d-flex flex-column flex-md-row justify-content-between align-items-start align-items-md-center gap-2 mb-3"> <div> <h2 class="h5 fw-semibold mb-0">Registros recientes</h2> <small class="text-muted">Últimas asistencias capturadas (máx. 25)</small> </div> </div> <?php if (empty($registros)): ?> <div class="alert alert-info d-flex align-items-center" role="alert"> <i class="fa-solid fa-info-circle fa-2x me-3"></i> <div> <h6 class="alert-heading mb-1">Sin registros</h6> <p class="mb-0 small">Aún no se han registrado asistencias.</p> </div> </div> <?php else: ?> <!-- Mobile View: Cards --> <div class="d-md-none"> <?php foreach ($registros as $registro): ?> <div class="card border asistencia-card-mobile shadow-sm"> <div class="card-body p-3"> <div class="d-flex justify-content-between align-items-start mb-2"> <div class="flex-grow-1"> <h6 class="fw-bold mb-1"><?php echo htmlspecialchars($registro['empleado'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></h6> <div class="d-flex align-items-center gap-2"> <span class="badge bg-light text-muted border small"> <?php echo htmlspecialchars($registro['rol'] ?? '—', ENT_QUOTES, 'UTF-8'); ?> </span> <small class="text-muted"><?php echo htmlspecialchars($registro['fecha_formateada'] ?? $registro['fecha'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></small> </div> </div> </div> <div class="border-top pt-2 mt-2"> <div class="row g-2 small"> <div class="col-6"> <div class="text-muted">Entrada</div> <div class="fw-semibold"><?php echo htmlspecialchars($registro['entrada'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></div> </div> <div class="col-6"> <div class="text-muted">Salida</div> <div class="fw-semibold"><?php echo htmlspecialchars($registro['salida'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></div> </div> </div> </div> <form action="<?php echo base_url('empleados/eliminarAsistencia/' . ($registro['id'] ?? 0)); ?>" method="POST" class="mt-3"> <button type="submit" class="btn btn-sm btn-outline-danger w-100" onclick="return confirm('¿Eliminar este registro de asistencia?');"> <i class="fa-solid fa-trash"></i> Eliminar registro </button> </form> </div> </div> <?php endforeach; ?> </div> <!-- Desktop View: Table --> <div class="table-responsive d-none d-md-block"> <table class="table align-middle"> <thead class="table-light"> <tr> <th>Fecha</th> <th>Empleado</th> <th>Rol</th> <th>Entrada</th> <th>Salida</th> <th class="text-end">Acciones</th> </tr> </thead> <tbody> <?php foreach ($registros as $registro): ?> <tr> <td><?php echo htmlspecialchars($registro['fecha_formateada'] ?? $registro['fecha'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></td> <td><?php echo htmlspecialchars($registro['empleado'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></td> <td><span class="badge bg-light text-muted border"><?php echo htmlspecialchars($registro['rol'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></span></td> <td><?php echo htmlspecialchars($registro['entrada'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></td> <td><?php echo htmlspecialchars($registro['salida'] ?? '—', ENT_QUOTES, 'UTF-8'); ?></td> <td class="text-end"> <form action="<?php echo base_url('empleados/eliminarAsistencia/' . ($registro['id'] ?? 0)); ?>" method="POST" class="d-inline"> <button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('¿Eliminar este registro de asistencia?');"> <i class="fa-solid fa-trash"></i> </button> </form> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php endif; ?> </div> </div> </div>
Coded With 💗 by
0x6ick