[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: printdetails.php
<?php include("functions.php"); if(!isset($_SESSION['index_no78897498'])){ header("location:index"); } else { require_once("phpqrcode/qrlib.php"); $myindex_id = $_SESSION['index_no78897498'] ?? ''; $myschoolcode = $_SESSION['myschoolcode'] ?? ''; $schoolID = $_SESSION['student_id0023894'] ?? ''; $enroll_de = mysqli_query($new,"SELECT * FROM enrol_details WHERE index_no = '$myindex_id'"); $enroll_info = mysqli_fetch_array($enroll_de); $class_id1 = $enroll_info['class_id']; $rawscore = $enroll_info['raw_score']; $enrol_code = $enroll_info['enrol_code']; $enrol_form = $enroll_info['enrol_form']; $jhs_attended = $enroll_info['jhs_attended']; $jhs_type = $enroll_info['jhs_type']; $dob = $enroll_info['date_of_birth']; $place = $enroll_info['place_of_birth']; $nationality = $enroll_info['nationality']; $religion = $enroll_info['religion']; $denomination = $enroll_info['religion_denomination']; $address = $enroll_info['address']; $town = $enroll_info['town']; $region = $enroll_info['region']; $district = $enroll_info['district']; $interest = $enroll_info['interest']; $ghana_card = $enroll_info['ghana_card']; $house_residence = $enroll_info['house_residence']; $mobile_num = $enroll_info['mobile_num']; $photo = $enroll_info['photo']; $father_name = $enroll_info['father_name']; $father_occupation = $enroll_info['father_occupation']; $mother_name = $enroll_info['mother_name']; $mother_occupation = $enroll_info['mother_occupation']; $guadian = $enroll_info['guadian']; $guadian_address = $enroll_info['guadian_address']; $house_select = $enroll_info['housename']; $telephone = $enroll_info['telephone']; $programe = $enroll_info['programe']; $surname = $enroll_info['student_name']; $classname = $enroll_info['classname']; $unique_student_code = $enroll_info['unique_student_code']; $getschool = mysqli_query($new, "SELECT * FROM schools WHERE school_code = '$myschoolcode'"); $fetchschcode = mysqli_fetch_array($getschool); $school_name = $fetchschcode['school_name'] ?? ''; $logoo = $fetchschcode['logo']; $school_location = $fetchschcode['school_location']; $phone_num = $fetchschcode['phone_num']; $head_title = $fetchschcode['head_title']; $school_email = $fetchschcode['school_email']; $school_head = $fetchschcode['school_head']; $stype = $fetchschcode['school_type']; $school_head = $fetchschcode['school_head']; $getgeneric = mysqli_query($new, "SELECT * FROM enrol_generic WHERE indexNo = '$myindex_id' and s_code = '$myschoolcode'"); $fetchdata = mysqli_fetch_array($getgeneric); $gender = $fetchdata['gender'] ?? ''; $programme1 = $fetchdata['programme'] ?? ''; $logoPath = empty($logoo) ? "myprofile.png" : "../admin/$logoo"; $profilePicturePath = empty($photo) ? "myprofile.png" : "../admin/uploads/$photo"; // Generate a unique data string for the QR code $qrData = "https://m.shsadmissionportal.com/student/verify.php?code=" . urlencode($enrol_code); // Define file path for generated QR code $qrDir = __DIR__ . '/qr_codes/'; if (!is_dir($qrDir)) { mkdir($qrDir, 0755, true); } $qrFile = $qrDir . $enrol_code . '.png'; // Generate only if not already generated if (!file_exists($qrFile)) { QRcode::png($qrData, $qrFile, QR_ECLEVEL_L, 3); // L = Low error correction, size=3 } // Store file path for HTML display $qr_code = 'qr_codes/' . $enrol_code . '.png'; $qr_code_url = "https://chart.googleapis.com/chart?cht=qr&chs=180x180&chl=" . urlencode($verification_url); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Student Admission Printout</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <style> @page { size: A4; margin: 10mm; } @media print { .no-print { display: none; } body { transform: scale(0.95); /* Auto-scale to fit one page */ transform-origin: top center; font-size: 12px; } .student-card { box-shadow: none; border: none; } } body { font-size: 13px; } .student-card { max-width: 850px; margin: auto; background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 10px; } .profile-img { max-width: 90px; max-height: 90px; border: 1px solid #bbb; border-radius: 6px; } .section-title { font-size: 14px; font-weight: bold; margin-top: 10px; border-bottom: 1px solid #000; padding-bottom: 2px; } .info-table td { padding: 2px 5px; vertical-align: top; font-size: 12px; } .logo { max-width: 70px; } .qr-code { max-width: 90px; max-height: 90px; } .signature-section { margin-top: 12px; display: flex; justify-content: space-between; font-size: 12px; } .signature-box { text-align: center; width: 45%; } .signature-line { margin-top: 30px; border-top: 1px solid #000; width: 100%; } </style> </head> <body class="bg-light"> <div class="student-card"> <!-- Header with logo, title and QR --> <div class="d-flex align-items-center justify-content-between mb-2"> <?php if (!empty($photo)) : ?> <img src="<?php echo htmlspecialchars($photo); ?>" class="profile-img mb-1" alt="Student Photo"> <?php endif; ?> <div class="text-center flex-fill"> <h5 class="mb-0"><?php echo $school_name ;?></h5> <p class="mb-0" style="font-size: 12px;"><?php echo $school_location;?></p> <p class="mb-0" style="font-size: 12px;"><?php echo $phone_num;?></p> <p class="mb-0" style="font-size: 12px;">Official Admission Record</p> </div> <img src="<?php echo htmlspecialchars($logoPath); ?>" class="logo" alt="School Logo"> </div> <hr class="my-2"> <div class="text-center mb-2"> <h6 class="mb-0"><?php echo htmlspecialchars($surname ?? ''); ?> <br/>(<?php echo htmlspecialchars($unique_student_code ?? ''); ?>)</h6> <small><?php echo htmlspecialchars($programme1 ?? ''); ?></small> </div> <div class="section-title">Personal Details</div> <table class="table table-borderless info-table"> <tr><td><strong>Gender:</strong></td><td><?php echo htmlspecialchars($gender ?? ''); ?></td> <td><strong>DOB:</strong></td><td><?php echo htmlspecialchars($dob); ?></td></tr> <tr><td><strong>Place:</strong></td><td><?php echo htmlspecialchars($place); ?></td> <td><strong>Nationality:</strong></td><td><?php echo htmlspecialchars($nationality); ?></td></tr> <tr><td><strong>Religion:</strong></td><td><?php echo htmlspecialchars($religion); ?></td> <td><strong>Denomination:</strong></td><td><?php echo htmlspecialchars($denomination); ?></td></tr> </table> <div class="section-title">Contact</div> <table class="table table-borderless info-table"> <tr><td><strong>Address:</strong></td><td colspan="3"><?php echo htmlspecialchars($address); ?></td></tr> <tr><td><strong>Town:</strong></td><td><?php echo htmlspecialchars($town); ?></td> <td><strong>Region:</strong></td><td><?php echo htmlspecialchars($region); ?></td></tr> <tr><td><strong>District:</strong></td><td><?php echo htmlspecialchars($district); ?></td> <td><strong>Phone:</strong></td><td><?php echo htmlspecialchars($mobile_num); ?></td></tr> <tr><td><strong>Ghana Card:</strong></td><td colspan="3"><?php echo htmlspecialchars($ghana_card); ?></td></tr> </table> <div class="section-title">Academic</div> <table class="table table-borderless info-table"> <tr><td><strong>Raw Score:</strong></td><td><?php echo htmlspecialchars($rawscore); ?></td> <td><strong>Enrol Code:</strong></td><td><?php echo htmlspecialchars($enrol_code); ?></td></tr> <tr><td><strong>JHS:</strong></td><td><?php echo htmlspecialchars(html_entity_decode($jhs_attended), ENT_QUOTES, 'UTF-8'); ?></td> <td><strong>Type:</strong></td><td><?php echo htmlspecialchars($jhs_type); ?></td></tr> <tr><td><strong>Class:</strong></td><td><?php echo htmlspecialchars($classname ?? ''); ?></td> <td><strong>House:</strong></td><td><?php echo htmlspecialchars($house_select); ?></td></tr> </table> <div class="section-title">Parent / Guardian</div> <table class="table table-borderless info-table"> <tr><td><strong>Father:</strong></td><td><?php echo htmlspecialchars($father_name); ?></td> <td><strong>Occupation:</strong></td><td><?php echo htmlspecialchars($father_occupation); ?></td></tr> <tr><td><strong>Mother:</strong></td><td><?php echo htmlspecialchars($mother_name); ?></td> <td><strong>Occupation:</strong></td><td><?php echo htmlspecialchars($mother_occupation); ?></td></tr> <tr><td><strong>Guardian:</strong></td><td><?php echo htmlspecialchars($guadian); ?></td> <td><strong>Tel:</strong></td><td><?php echo htmlspecialchars($telephone); ?></td></tr> <tr><td><strong>Guardian Address:</strong></td><td colspan="3"><?php echo htmlspecialchars($guadian_address); ?></td></tr> </table> <!-- <?php if (!empty($enrol_form)) : ?> <div class="section-title">Enrolment Form</div> <img src="<?php echo htmlspecialchars($enrol_form); ?>" class="img-fluid border p-1 rounded" style="max-width: 300px;"> <?php endif; ?> --> <center> <?php if (!empty($qr_code)) : ?> <img src="<?php echo htmlspecialchars($qr_code); ?>" class="qr-code" alt="QR Code"> <?php endif; ?> </center> <div class="signature-section"> <div class="signature-box"> <div class="signature-line"></div> <span>Parent / Guardian</span> </div> <div class="signature-box"> <?php echo $school_head ;?> <div class="signature-line"></div> <span>Headmaster / Principal</span> </div> </div> <div class="text-center mt-2 no-print"> <button class="btn btn-primary btn-sm" onclick="window.print()">🖨️ Print</button> </div> </div> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.89 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002