Tul xxx Tul
User / IP
:
216.73.216.159
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
/
vnet
/
app
/
views
/
reportes
/
Viewing: index.php
<?php declare(strict_types=1); // Vista: Reportes. ?> <section class="page"> <header class="page__header"> <div> <h1 class="page__title">Reportes y exportación</h1> <p class="page__subtitle">Genera reportes y exporta a PDF o Excel (CSV)</p> </div> </header> <?php if (!empty($flash) && is_array($flash)) : ?> <?php if (($flash['type'] ?? '') === 'success') : ?> <div class="alert alert--success"><?= htmlspecialchars((string)($flash['message'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div> <?php else : ?> <div class="alert alert--error"><?= htmlspecialchars((string)($flash['message'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div> <?php endif; ?> <?php endif; ?> <?php $active = (string)($activeReport ?? ''); $tot = is_array($totals ?? null) ? (array)$totals : []; ?> <section class="panel" style="margin-bottom: 14px; border-left: 4px solid var(--primary);"> <h2 style="margin: 0 0 10px; font-size: 16px; color: var(--primary);">Informe General</h2> <p style="margin: 0 0 12px; color: var(--muted); font-size: 13px;">Vista consolidada de todas las secciones del sistema</p> <form method="get" action="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes/general" class="form"> <div class="form-actions"> <button class="btn btn--secondary" type="submit">Ver informe</button> <button class="btn btn--primary" type="submit" name="format" value="pdf">Exportar PDF</button> <button class="btn btn--primary" type="submit" name="format" value="csv">Exportar Excel</button> </div> </form> </section> <section class="panel" style="margin-bottom: 14px;"> <h2 style="margin: 0 0 10px; font-size: 16px;">EPP</h2> <form method="get" action="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes/epp" class="form"> <div class="form-grid"> <label class="field"> <span class="field__label">Estado</span> <?php $estadoSel = (string)($filtersEpp['estado'] ?? ''); ?> <select class="field__input" name="estado"> <option value="" <?= $estadoSel === '' ? 'selected' : '' ?>>Todos</option> <option value="1" <?= $estadoSel === '1' ? 'selected' : '' ?>>Disponible</option> <option value="0" <?= $estadoSel === '0' ? 'selected' : '' ?>>No disponible</option> </select> </label> <label class="field"> <span class="field__label">Categoría</span> <?php $catSel = (string)($filtersEpp['categoria'] ?? ''); ?> <select class="field__input" name="categoria"> <option value="" <?= $catSel === '' ? 'selected' : '' ?>>Todas</option> <?php foreach ((array)($categoriasEpp ?? []) as $cat) : ?> <?php $cat = (string)$cat; ?> <option value="<?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?>" <?= $catSel === $cat ? 'selected' : '' ?>> <?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?> </option> <?php endforeach; ?> </select> </label> <label class="field"> <span class="field__label">Desde</span> <input class="field__input" type="date" name="from" value="<?= htmlspecialchars((string)($filtersEpp['from'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> <label class="field"> <span class="field__label">Hasta</span> <input class="field__input" type="date" name="to" value="<?= htmlspecialchars((string)($filtersEpp['to'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> </div> <div class="form-actions"> <a class="btn btn--secondary" href="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes">Limpiar</a> <button class="btn btn--secondary" type="submit">Ver reporte</button> <button class="btn btn--primary" type="submit" name="format" value="pdf">Exportar PDF</button> <button class="btn btn--primary" type="submit" name="format" value="csv">Exportar Excel</button> </div> </form> </section> <section class="panel" style="margin-bottom: 14px;"> <h2 style="margin: 0 0 10px; font-size: 16px;">Uniformes</h2> <form method="get" action="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes/uniformes" class="form"> <div class="form-grid"> <label class="field"> <span class="field__label">Estado</span> <?php $estadoSel = (string)($filtersUniformes['estado'] ?? ''); ?> <select class="field__input" name="estado"> <option value="" <?= $estadoSel === '' ? 'selected' : '' ?>>Todos</option> <option value="1" <?= $estadoSel === '1' ? 'selected' : '' ?>>Activo</option> <option value="0" <?= $estadoSel === '0' ? 'selected' : '' ?>>Inactivo</option> </select> </label> <label class="field"> <span class="field__label">Categoría</span> <?php $catSel = (string)($filtersUniformes['categoria'] ?? ''); ?> <select class="field__input" name="categoria"> <option value="" <?= $catSel === '' ? 'selected' : '' ?>>Todas</option> <?php foreach ((array)($categoriasUniformes ?? []) as $cat) : ?> <?php $cat = (string)$cat; ?> <option value="<?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?>" <?= $catSel === $cat ? 'selected' : '' ?>> <?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?> </option> <?php endforeach; ?> </select> </label> <label class="field"> <span class="field__label">Desde</span> <input class="field__input" type="date" name="from" value="<?= htmlspecialchars((string)($filtersUniformes['from'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> <label class="field"> <span class="field__label">Hasta</span> <input class="field__input" type="date" name="to" value="<?= htmlspecialchars((string)($filtersUniformes['to'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> </div> <div class="form-actions"> <a class="btn btn--secondary" href="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes">Limpiar</a> <button class="btn btn--secondary" type="submit">Ver reporte</button> <button class="btn btn--primary" type="submit" name="format" value="pdf">Exportar PDF</button> <button class="btn btn--primary" type="submit" name="format" value="csv">Exportar Excel</button> </div> </form> </section> <section class="panel" style="margin-bottom: 14px;"> <h2 style="margin: 0 0 10px; font-size: 16px;">Herramientas</h2> <form method="get" action="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes/herramientas" class="form"> <div class="form-grid"> <label class="field"> <span class="field__label">Estado</span> <?php $estadoSel = (string)($filtersHerramientas['estado'] ?? ''); ?> <select class="field__input" name="estado"> <option value="" <?= $estadoSel === '' ? 'selected' : '' ?>>Todos</option> <option value="1" <?= $estadoSel === '1' ? 'selected' : '' ?>>Disponible</option> <option value="0" <?= $estadoSel === '0' ? 'selected' : '' ?>>No disponible</option> </select> </label> <label class="field"> <span class="field__label">Categoría</span> <?php $catSel = (string)($filtersHerramientas['categoria'] ?? ''); ?> <select class="field__input" name="categoria"> <option value="" <?= $catSel === '' ? 'selected' : '' ?>>Todas</option> <?php foreach ((array)($categoriasHerramientas ?? []) as $cat) : ?> <?php $cat = (string)$cat; ?> <option value="<?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?>" <?= $catSel === $cat ? 'selected' : '' ?>> <?= htmlspecialchars($cat, ENT_QUOTES, 'UTF-8') ?> </option> <?php endforeach; ?> </select> </label> <label class="field"> <span class="field__label">Desde</span> <input class="field__input" type="date" name="from" value="<?= htmlspecialchars((string)($filtersHerramientas['from'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> <label class="field"> <span class="field__label">Hasta</span> <input class="field__input" type="date" name="to" value="<?= htmlspecialchars((string)($filtersHerramientas['to'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> </div> <div class="form-actions"> <a class="btn btn--secondary" href="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes">Limpiar</a> <button class="btn btn--secondary" type="submit">Ver reporte</button> <button class="btn btn--primary" type="submit" name="format" value="pdf">Exportar PDF</button> <button class="btn btn--primary" type="submit" name="format" value="csv">Exportar Excel</button> </div> </form> </section> <section class="panel" style="margin-bottom: 14px;"> <h2 style="margin: 0 0 10px; font-size: 16px;">Movimientos</h2> <form method="get" action="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes/movimientos" class="form"> <div class="form-grid"> <label class="field"> <span class="field__label">Módulo</span> <?php $modSel = (string)($filtersMovimientos['modulo'] ?? ''); ?> <select class="field__input" name="modulo"> <option value="" <?= $modSel === '' ? 'selected' : '' ?>>Todos</option> <option value="uniformes" <?= $modSel === 'uniformes' ? 'selected' : '' ?>>Uniformes</option> <option value="herramientas" <?= $modSel === 'herramientas' ? 'selected' : '' ?>>Herramientas</option> <option value="epp" <?= $modSel === 'epp' ? 'selected' : '' ?>>EPP</option> </select> </label> <label class="field"> <span class="field__label">Tipo de movimiento</span> <?php $tipoSel = (string)($filtersMovimientos['tipo'] ?? ''); ?> <select class="field__input" name="tipo"> <option value="" <?= $tipoSel === '' ? 'selected' : '' ?>>Todos</option> <option value="entrada" <?= $tipoSel === 'entrada' ? 'selected' : '' ?>>Entrada</option> <option value="salida" <?= $tipoSel === 'salida' ? 'selected' : '' ?>>Salida</option> </select> </label> <label class="field"> <span class="field__label">Desde</span> <input class="field__input" type="date" name="from" value="<?= htmlspecialchars((string)($filtersMovimientos['from'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> <label class="field"> <span class="field__label">Hasta</span> <input class="field__input" type="date" name="to" value="<?= htmlspecialchars((string)($filtersMovimientos['to'] ?? ''), ENT_QUOTES, 'UTF-8') ?>"> </label> </div> <div class="form-actions"> <a class="btn btn--secondary" href="<?= htmlspecialchars((string)BASE_URL, ENT_QUOTES, 'UTF-8') ?>/reportes">Limpiar</a> <button class="btn btn--secondary" type="submit">Ver reporte</button> <button class="btn btn--primary" type="submit" name="format" value="pdf">Exportar PDF</button> <button class="btn btn--primary" type="submit" name="format" value="csv">Exportar Excel</button> </div> </form> </section> <?php if ($active !== '' && is_array($preview ?? null)) : ?> <section class="panel" id="reportPreview"> <h2 style="margin: 0 0 10px; font-size: 16px;">Vista previa</h2> <div class="alert" style="margin-bottom: 12px;"> <strong>Registros:</strong> <?= (int)($tot['registros'] ?? 0) ?> <?php if (($tot['cantidad'] ?? 0) > 0) : ?> | <strong>Total cantidad:</strong> <?= (int)($tot['cantidad'] ?? 0) ?> <?php endif; ?> </div> <div class="table-wrap"> <table class="table"> <thead> <tr> <?php if ($active === 'general') : ?> <th>Sección</th> <th class="th-right">Total</th> <th class="th-right">Activos/Disponibles</th> <th class="th-right">Inactivos/No disponibles</th> <th class="th-right">Cantidad Total</th> <?php elseif ($active === 'uniformes') : ?> <th>Código</th> <th>Nombre</th> <th>Talla</th> <th>Color</th> <th>Categoría</th> <th class="th-right">Cantidad</th> <th>Estado</th> <?php elseif ($active === 'herramientas') : ?> <th>Código</th> <th>Nombre</th> <th>Descripción</th> <th>Categoría</th> <th class="th-right">Cantidad</th> <th>Estado</th> <?php elseif ($active === 'epp') : ?> <th>Código</th> <th>Nombre</th> <th>Descripción</th> <th>Categoría</th> <th class="th-right">Cantidad</th> <th>Estado</th> <?php else : ?> <th>Tipo</th> <th>Módulo</th> <th>Item</th> <th class="th-right">Cantidad</th> <th>Usuario</th> <th>Fecha</th> <th>Descripción</th> <?php endif; ?> </tr> </thead> <tbody> <?php if (empty($preview)) : ?> <?php $colspan = 7; if ($active === 'general') { $colspan = 5; } elseif ($active === 'herramientas') { $colspan = 6; } elseif ($active === 'epp') { $colspan = 6; } ?> <tr> <td colspan="<?= $colspan ?>" class="td-muted">No hay resultados con los filtros seleccionados.</td> </tr> <?php else : ?> <?php foreach ((array)$preview as $r) : ?> <tr> <?php if ($active === 'general') : ?> <td data-label="Sección"><strong><?= htmlspecialchars((string)($r['Sección'] ?? ''), ENT_QUOTES, 'UTF-8') ?></strong></td> <td data-label="Total" class="td-right"><?= htmlspecialchars((string)($r['Total'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Activos/Disponibles" class="td-right"><?= htmlspecialchars((string)($r['Activos/Disponibles'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Inactivos/No disponibles" class="td-right"><?= htmlspecialchars((string)($r['Inactivos/No disponibles'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Cantidad Total" class="td-right"><?= htmlspecialchars((string)($r['Cantidad Total'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <?php elseif ($active === 'uniformes') : ?> <td data-label="Código"><?= htmlspecialchars((string)($r['codigo'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Nombre"><?= htmlspecialchars((string)($r['nombre'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Talla"><?= htmlspecialchars((string)($r['talla'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Color"><?= htmlspecialchars((string)($r['color'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Categoría"><?= htmlspecialchars((string)($r['categoria'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Cantidad" class="td-right"><?= (int)($r['cantidad'] ?? 0) ?></td> <td data-label="Estado"><?= (int)($r['estado'] ?? 0) === 1 ? 'Activo' : 'Inactivo' ?></td> <?php elseif ($active === 'herramientas') : ?> <td data-label="Código"><?= htmlspecialchars((string)($r['codigo'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Nombre"><?= htmlspecialchars((string)($r['nombre'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Descripción"><?= htmlspecialchars((string)($r['descripcion'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Categoría"><?= htmlspecialchars((string)($r['categoria'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Cantidad" class="td-right"><?= (int)($r['cantidad'] ?? 0) ?></td> <td data-label="Estado"><?= (int)($r['estado'] ?? 0) === 1 ? 'Disponible' : 'No disponible' ?></td> <?php elseif ($active === 'epp') : ?> <td data-label="Código"><?= htmlspecialchars((string)($r['codigo'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Nombre"><?= htmlspecialchars((string)($r['nombre'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Descripción"><?= htmlspecialchars((string)($r['descripcion'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Categoría"><?= htmlspecialchars((string)($r['categoria'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Cantidad" class="td-right"><?= (int)($r['cantidad'] ?? 0) ?></td> <td data-label="Estado"><?= (int)($r['estado'] ?? 0) === 1 ? 'Disponible' : 'No disponible' ?></td> <?php else : ?> <?php $fechaRaw = (string)($r['created_at'] ?? ''); $fecha = $fechaRaw !== '' ? date('Y-m-d H:i', strtotime($fechaRaw)) : ''; $itemNombre = trim((string)($r['item_nombre'] ?? '')); $itemId = (int)($r['item_id'] ?? 0); ?> <td data-label="Tipo"><?= htmlspecialchars((string)($r['tipo'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Módulo"><?= htmlspecialchars((string)($r['modulo'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Item"><?= htmlspecialchars($itemNombre !== '' ? $itemNombre : ('#' . $itemId), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Cantidad" class="td-right"><?= (int)($r['cantidad'] ?? 0) ?></td> <td data-label="Usuario"><?= htmlspecialchars((string)($r['usuario_nombre'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Fecha"><?= htmlspecialchars($fecha, ENT_QUOTES, 'UTF-8') ?></td> <td data-label="Descripción"><?= htmlspecialchars((string)($r['descripcion'] ?? ''), ENT_QUOTES, 'UTF-8') ?></td> <?php endif; ?> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> </section> <?php endif; ?> </section> <script> (function() { 'use strict'; // Detectar si hay una vista previa activa y hacer scroll automático function scrollToPreview() { const previewSection = document.getElementById('reportPreview'); if (previewSection) { // Pequeño delay para asegurar que el DOM esté completamente renderizado setTimeout(function() { previewSection.scrollIntoView({ behavior: 'smooth', block: 'start' }); // Agregar un pequeño offset visual para que no quede pegado al borde const offset = 80; const elementPosition = previewSection.getBoundingClientRect().top; const offsetPosition = elementPosition + window.pageYOffset - offset; window.scrollTo({ top: offsetPosition, behavior: 'smooth' }); }, 100); } } // Ejecutar al cargar la página if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', scrollToPreview); } else { scrollToPreview(); } })(); </script>
Coded With 💗 by
0x6ick