[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: printme.php
<?php error_reporting(0); include("functions.php"); if(!isset($_SESSION['index_no78897498'])){ header("location:index"); } else { $s_code = $_SESSION['index_no78897498']; $indexx = mysqli_query($new,"SELECT * FROM enrol_generic WHERE indexNo = '$s_code'"); $fetchsch = mysqli_fetch_array($indexx); $school_code = $fetchsch['s_code']; $getschool = mysqli_query($new,"SELECT short_code FROM schools WHERE school_code = '$school_code'"); $fetchschcode = mysqli_fetch_array($getschool); $shortcode = $fetchschcode['short_code']; $select_pay = mysqli_query($new,"SELECT * FROM stud_payment WHERE indexNumber = '$s_code' and s_code = '$school_code'"); $getpay = mysqli_fetch_array($select_pay); $pstatus = $getpay['pstatus']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Personal Data Printout</title> <style> /* General reset for print */ @media print { body { margin: 0; padding: 0; font-family: Arial, sans-serif; color: #000; -webkit-print-color-adjust: exact; /* Ensures colors are preserved */ } .container { width: 100%; max-width: 1000px; margin: auto; padding: 10px; border: 1px solid #000; box-sizing: border-box; } h1 { text-align: center; font-size: 22px; margin-bottom: 15px; text-transform: uppercase; border-bottom: 2px solid #000; padding-bottom: 5px; } .form-section { display: flex; flex-wrap: wrap; justify-content: space-between; } .form-group { width: 48%; /* Two columns */ margin-bottom: 10px; box-sizing: border-box; } .form-group label { font-weight: bold; display: block; margin-bottom: 3px; } .form-group .value { padding: 6px 0; font-size: 16px; color: #333; background-color: #f5f5f5; border-radius: 4px; } /* Adjust the page to fit A4 size */ @page { size: A4; margin: 10mm; } /* Hide the print button when printing */ .print-button { display: none; } } /* Styling for screen view */ body { font-family: Arial, sans-serif; background-color: #f2f2f2; } .container { margin-top: 20px; background-color: #fff; padding: 20px; } button { margin-top: 20px; display: block; width: 100%; padding: 10px; background-color: #007bff; color: #fff; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; } button:hover { background-color: #0056b3; } </style> <script> function showDataAndPrint() { // Show the data section document.getElementById('dataToPrint').style.display = 'block'; window.print(); document.getElementById('dataToPrint').style.display = 'none'; } </script> </head> <body> <?php $code = $_SESSION['index_no78897498']; $studentID = mysqli_query($new,"SELECT * FROM enrol_generic WHERE indexNo = '$code'"); $stud = mysqli_fetch_array($studentID); $getschol = $stud['s_code']; $name = $stud['stud_name']; $programme = $stud['programme']; $stmt = $con->prepare("Select * from schools where school_code = ?"); $stmt->execute(array($getschol)); $row = $stmt->fetch(); $logo = $row['logo']; $school_name = $row['school_name']; $enroll_de = mysqli_query($new,"SELECT * FROM enrol_details WHERE index_no = '$code'"); $enroll_info = mysqli_fetch_array($enroll_de); $rawscore1 = $enroll_info['raw_score']; $enrol_code1 = $enroll_info['enrol_code']; $studentID = $enroll_info['schoolID']; $jhs_attended1 = $enroll_info['jhs_attended']; $jhs_type1 = $enroll_info['jhs_type']; $dob1 = $enroll_info['date_of_birth']; $place1 = $enroll_info['place_of_birth']; $nationality1 = $enroll_info['nationality']; $religion1 = $enroll_info['religion']; $denomination1 = $enroll_info['religion_denomination']; $address1 = $enroll_info['address']; $town1 = $enroll_info['town']; $region1 = $enroll_info['region']; $district1 = $enroll_info['district']; $interest1 = $enroll_info['interest']; $ghana_card1 = $enroll_info['ghana_card']; $house_residence1 = $enroll_info['house_residence']; $class_id1 = $enroll_info['class_id']; $mobile_num1 = $enroll_info['mobile_num']; $photo1 = $enroll_info['photo']; $father_name1 = $enroll_info['father_name']; $father_occupation1 = $enroll_info['father_occupation']; $mother_name1 = $enroll_info['mother_name']; $mother_occupation1 = $enroll_info['mother_occupation']; $guadian1 = $enroll_info['guadian']; $guadian_address1 = $enroll_info['guadian_address']; $house_select1 = $enroll_info['house_select']; ?> <div class="container"> <h1>School name : <?php echo $school_name;?> <br/> Student name : <?php echo $name;?> <br/> Student ID : <?php echo $studentID;?></h1> <div id="dataToPrint" style="display: none;"> <div class="form-section"> <div class="form-group"> <label>Index Number</label> <div class="value"><?php echo $code;?></div> </div> <div class="form-group"> <label>J.H.S</label> <div class="value"><?php echo $jhs_attended1;?></div> </div> <div class="form-group"> <label>Gender</label> <div class="value"><?php echo $stud['gender'];?></div> </div> <div class="form-group"> <label>Programme</label> <div class="value"><?php echo $programme;?></div> </div> <div class="form-group"> <label>Residential Status</label> <div class="value"><?php echo $stud['status'];?></div> </div> <div class="form-group"> <label>Date of Birth</label> <div class="value"><?php echo $dob1;?></div> </div> <div class="form-group"> <label>Place of Birth</label> <div class="value"><?php echo $place1;?></div> </div> <div class="form-group"> <label>Nationality</label> <div class="value"><?php echo $nationality1;?></div> </div> <div class="form-group"> <label>Religion</label> <div class="value"><?php echo $religion1;?></div> </div> <div class="form-group"> <label>Religious Denomination</label> <div class="value"><?php echo $denomination1;?></div> </div> <div class="form-group"> <label>Town</label> <div class="value"><?php echo $town1;?></div> </div> <div class="form-group"> <label>Region</label> <div class="value"><?php echo $region1;?></div> </div> <div class="form-group"> <label>District</label> <div class="value"><?php echo $district1;?></div> </div> <div class="form-group"> <label>Permanent Address</label> <div class="value"><?php echo $address1;?></div> </div> <div class="form-group"> <label>Phone Number</label> <div class="value"><?php echo $mobile_num1;?></div> </div> <div class="form-group"> <label>Ghana Card/NHIS No</label> <div class="value"><?php echo $ghana_card1;?></div> </div> <div class="form-group"> <label>Interest(s)</label> <div class="value"><?php echo $interest1;?></div> </div> </div> </div> <button class="print-button" onclick="showDataAndPrint()">Print</button> </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.81 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