EVOLUTION-NINJA
Edit File: certificate_page1.php
<!DOCTYPE html> <html lang="en"> <head> <!-- Google Fonts with Italic Style --> <link href="https://fonts.googleapis.com/css2?family=Courgette:ital@1&family=Lobster:ital@1&family=Pochaevsk:ital@1&display=swap" rel="stylesheet"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Certificate</title> <style> /* Apply Google Font Italic */ .italic-text { font-family: "Pochaevsk", serif; font-style: italic; } /* Exclude Italic for Important Fields */ .name, .details span, .footer span { font-style: normal; } body { margin: 0; padding: 0; background-color: #f5f5f5; display: flex; justify-content: center; align-items: center; height: 100vh; font-family: "Pochaevsk", serif; } .certificate { width: 210mm; height: 297mm; padding: 20px; margin: 0; box-sizing: border-box; position: relative; text-align: center; background-image: url('./img/border-pattern.png'); background-repeat: no-repeat; background-size: 100% 100%; background-position: 0 0; background-color: white; } .logo { width: 250px; margin: 20px auto 30px auto; display: block; } .photo-container { width: 120px; height: 130px; margin: 20px auto; padding: 5px; display: block; } .photo-container img { width: 100%; height: 100%; object-fit: cover; } /* Text Styles */ h2 { font-size: 24px; font-weight: 400; margin-bottom: 10px; } .name { font-size: 30px; font-weight: bold; color: #228B22; margin-bottom: 15px; width: 50%; margin: 0 auto; padding-bottom: 5px; position: relative; top: 20px; } .details { font-size: 24px; line-height: 2.6; margin-bottom: 100px; } .details span { border-bottom: 3px dotted black; display: inline-block; width: 180px; text-align: center; padding-bottom: 5px; height: 52px; cursor: text; } .grade { font-size: 22px; font-weight: bold; color: #228B22; margin-top: -74px; text-align: left; margin-left: 30px; } .footer { font-size: 24px; color: #555; margin-top: 40px; display: flex; justify-content: space-between; align-items: center; width: 100%; } .footer div { flex: 1; } .footer span { border-bottom: 3px dotted black; display: inline-block; width: 138px; text-align: center; padding-bottom: 5px; height: 28px; font-weight: bold; cursor: text; } .head-learning { font-size: 24px; font-weight: bold; text-align: right; margin-right: 0px; } .print-btn { margin-top: 20px; padding: 10px 20px; font-size: 18px; background-color: #007BFF; color: #fff; border: none; border-radius: 5px; cursor: pointer; } .print-btn:hover { background-color: #0056b3; } @media print { .print-btn, #photo-upload { display: none; } body { margin: 0; padding: 0; background-color: #fff; } .certificate { margin: 0; box-shadow: none; } } </style> </head> <body> <div class="certificate"> <!-- Logo --> <img src="<?php echo base_url('public/assets/images/mygtrac logo.png') ?>" alt="Logo" class="logo" style="opacity: 100%;"> <!-- Photo Upload --> <div class="photo-container"> <img id="uploaded-photo" src="photo-placeholder.jpg" alt="Photo"> </div> <input type="file" id="photo-upload" accept="image/*" onchange="previewImage(event)"> <!-- Certificate Details --> <h2 class="italic-text">This Certificate is Awarded To</h2> <div class="name editable" contenteditable="true" style="color: black;"> <?php echo htmlspecialchars($data->first_name); ?></div> <p class="details italic-text"> On the <span class="editable" contenteditable="true"><?php echo htmlspecialchars(date('d', strtotime($data->date)));?></span> day of <span class="editable" contenteditable="true"><?php echo htmlspecialchars(date('F d', strtotime($data->date))); ?></span> month <br> in the year <span class="editable" contenteditable="true"> <?php echo htmlspecialchars(date('Y', strtotime($data->date))); ?> </span>, for successfully completing <br>the training of <span class="editable" contenteditable="true"> <?php echo htmlspecialchars($data->value_name); ?></span>. </p> <div class="grade">Grade: <span class="editable" contenteditable="true">A</span></div> <!-- Footer --> <div class="footer"> <div> CANDIDATE ID: <span class="editable" contenteditable="true"> <?php echo htmlspecialchars($data->admission_no); ?></span> <br> DURATION DATE: <span class="editable" contenteditable="true"><?php echo htmlspecialchars(date('M d', strtotime($data->date)));?> to <?php echo htmlspecialchars(date(' M d', strtotime($data->date)));?> </div> <div class="head-learning"> Head - Learning Services </div> </div> <div style="justify-content: center;"> <p style="font-size: 24px; width: 80%; border-radius: 50px; background-color:rgb(132, 239, 83); display: inline-block;" >Visit our website : www.mygtrac.com</p> </div> <p style="font-size: 20px;">#656/D,16th Main, 5th Cross, Saraswathipuram, Mysuru, - 570009, Karnataka,<br> <b>M:</b> +91 9591343563 <b>P: </b>0821 - 4250222 / <b>E:</b> infomytrac@gmail.com /</p></div> <!-- Print Button --> <button class="print-btn" onclick="window.print()">Print Certificate</button> <script> function previewImage(event) { var reader = new FileReader(); reader.onload = function() { var output = document.getElementById('uploaded-photo'); output.src = reader.result; }; reader.readAsDataURL(event.target.files[0]); } </script> </body> </html>