HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ubuntu-8gb-hel1-1 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: /var/www/html/obaasimaghana/app/views/certificates/print.php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Certificate of Completion</title>
    <style>
        @page {
            size: landscape;
            margin: 0;
        }
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            background: #fff;
        }
        .certificate {
            width: 11.69in;
            height: 8.27in;
            position: relative;
            background: #fff;
            border: 2px solid #000;
            padding: 1in;
            box-sizing: border-box;
        }
        .header {
            text-align: center;
            margin-bottom: 2in;
        }
        .logo {
            max-width: 200px;
            margin-bottom: 1in;
        }
        .title {
            font-size: 36px;
            font-weight: bold;
            color: #000;
            margin-bottom: 0.5in;
        }
        .subtitle {
            font-size: 24px;
            color: #333;
            margin-bottom: 0.25in;
        }
        .content {
            text-align: center;
            margin-bottom: 2in;
        }
        .name {
            font-size: 48px;
            font-weight: bold;
            color: #000;
            margin-bottom: 0.5in;
        }
        .course {
            font-size: 32px;
            color: #333;
            margin-bottom: 0.5in;
        }
        .details {
            display: flex;
            justify-content: space-around;
            margin-bottom: 1in;
        }
        .detail-item {
            text-align: center;
        }
        .detail-label {
            font-size: 16px;
            color: #666;
            margin-bottom: 0.25in;
        }
        .detail-value {
            font-size: 18px;
            color: #000;
        }
        .footer {
            position: absolute;
            bottom: 1in;
            left: 1in;
            right: 1in;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .partner-logos {
            display: flex;
            gap: 1in;
        }
        .partner-logo {
            max-width: 100px;
        }
        .verification {
            text-align: right;
        }
        .qr-code {
            width: 100px;
            height: 100px;
            margin-bottom: 0.25in;
        }
        .qr-code img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
        .verification-text {
            font-size: 12px;
            color: #666;
        }
        @media print {
            body {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
        }
    </style>
</head>
<body>
    <div class="certificate">
        <div class="header">
            <img src="<?php echo SITE_URL; ?>/assets/images/mastercard-logo.png" alt="MasterCard" class="logo">
            <h1 class="title">Certificate of Completion</h1>
            <p class="subtitle">This is to certify that</p>
        </div>

        <div class="content">
            <div class="name"><?php echo htmlspecialchars($certificate->user_name); ?></div>
            <p class="subtitle">has successfully completed the course</p>
            <div class="course"><?php echo htmlspecialchars($certificate->course_title); ?></div>
        </div>

        <div class="details">
            <div class="detail-item">
                <div class="detail-label">Issued On</div>
                <div class="detail-value"><?php echo formatDate($certificate->issued_at); ?></div>
            </div>
            <div class="detail-item">
                <div class="detail-label">Certificate ID</div>
                <div class="detail-value"><?php echo $certificate->id; ?></div>
            </div>
        </div>

        <div class="footer">
            <div class="partner-logos">
                <img src="<?php echo SITE_URL; ?>/assets/images/mcgill.png" alt="McGill" class="partner-logo">
                <img src="<?php echo SITE_URL; ?>/assets/images/agi.png" alt="AGI" class="partner-logo">
            </div>
            <div class="verification">
                <div class="qr-code">
                    <?php if (isset($qrCode) && file_exists($qrCode)): ?>
                        <img src="data:image/png;base64,<?php echo base64_encode(file_get_contents($qrCode)); ?>" alt="QR Code">
                    <?php endif; ?>
                </div>
                <p class="verification-text">Scan to verify this certificate</p>
            </div>
        </div>
    </div>
</body>
</html>