[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: adminssion-letter.php
<?php // Include the FPDF library require("fpdf/fpdf.php"); include("../functions.php"); $myidex = $_SESSION['index_no78897498']; $indexx = mysqli_query($new,"SELECT * FROM enrol_generic WHERE indexNo = '$myidex'"); $fetchsch = mysqli_fetch_array($indexx); $school_code = $fetchsch['s_code']; $student_name = $fetchsch['stud_name']; $stu_status = $fetchsch['status']; $getlogo = mysqli_query($new,"SELECT * FROM schools WHERE school_code = '$school_code'"); $logocon = mysqli_fetch_array($getlogo); $logoo = $logocon['logo']; $school_name = $logocon['school_name']; $school_location = $logocon['school_location']; $phone_num = $logocon['phone_num']; $head_title = $logocon['head_title']; $school_email = $logocon['school_email']; $school_head = $logocon['school_head']; $indexx1 = mysqli_query($new,"SELECT * FROM enrol_details WHERE index_no = '$myidex' and s_code = '$school_code'"); $fetchschh = mysqli_fetch_array($indexx1); $photo = $fetchschh['photo']; $enrol_code = $fetchschh['enrol_code']; //$enrol_code = $fetchschh['enrol_code']; $indexx11 = mysqli_query($new,"SELECT * FROM admission_info WHERE s_code = '$school_code'"); $fetchschhh = mysqli_fetch_array($indexx11); $ACADEMIC = $fetchschhh['academic_year']; $re_opening_date = $fetchschhh['re_opening_date']; $studentD = mysqli_query($new,"SELECT * FROM enrol_details,class WHERE enrol_details.index_no = '$myidex' and enrol_details.class_id = class.cid"); $getinfo = mysqli_fetch_array($studentD); $c_name = $getinfo['class_name']; $classID = $getinfo['cid']; $classprog = mysqli_query($new,"SELECT * FROM programme,class WHERE class.program_id = programme.progid and class.cid = '$classID'"); $getclassprogg = mysqli_fetch_array($classprog); $programme = $getclassprogg['program_name']; $getHow = mysqli_query($new,"SELECT * FROM enrol_details,house WHERE enrol_details.house_id = house.hid and enrol_details.index_no = '$myidex'"); $hname = mysqli_fetch_array($getHow); $house_name = $hname['house_name']; // Create a new PDF document $pdf = new FPDF(); $pdf->AddPage(); // Define the paths for the images if(empty($logoo)){ $logoPath = "nulllogo.jpg"; } else { $logoPath = "../admin/$logoo"; } if(empty($photo)){ $profilePicturePath = "nulllogo.jpg"; } else { $profilePicturePath = "../admin/$photo"; } //$logoPath = "../admin/$logoo"; // Replace with the path to your logo image //$profilePicturePath = "../admin/$photo"; // Replace with the path to the profile picture // Add the logo image to the top left $pdf->Image($profilePicturePath, 10, 10, 30); // Adjust the X, Y, and size as needed // Add another logo or image at the top right $pdf->Image($logoPath, 170, 10, 30); // Adjust the X, Y, and size as needed // Set font for the header $pdf->SetFont('Arial', 'B', 16); // Centered school name // Header Details $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 8, "$school_name", 0, 1, 'C'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 5, "$school_location", 0, 1, 'C'); $pdf->Ln(3); // School and contact details $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5,"$head_title", 0, 1, 'C'); //$pdf->Cell(0, 5, 'Our Ref. No. GES/AD/StLOUISSHS/23/01', 0, 1, 'C'); //$pdf->Cell(0, 5, 'Your Ref. No. ....................', 0, 1, 'C'); $pdf->Cell(0, 5, "PHONE: $phone_num", 0, 1, 'C'); $pdf->Cell(0, 5, "EMAIL: $school_email", 0, 1, 'C'); $pdf->Ln(3); // Address and date $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 5, '(GHANA EDUCATION SERVICE)', 0, 1, 'C'); //$pdf->Cell(0, 5, 'P. O. BOX 460, KUMASI', 0, 1, 'C'); $pdf->Ln(5); //$pdf->Cell(0, 5, '', 0, 1, 'R'); $pdf->Ln(5); // Salutation and heading $pdf->Cell(0, 8, 'Dear Student,', 0, 1); $pdf->SetFont('Arial', 'B', 12); $pdf->MultiCell(0, 8, 'OFFER OF ADMISSION INTO SENIOR HIGH SCHOOL - '.$ACADEMIC.' ACADEMIC YEAR', 0, 'C'); //$pdf->Ln(3); // Main content $pdf->SetFont('Arial', '', 11); $pdf->MultiCell(0, 7, "ENROLMENT CODE: ".$enrol_code."\nNAME OF CANDIDATE: ".$student_name."\nRESIDENCE STATUS: ".$stu_status."\nPROGRAMME OFFERED: ".$programme." [".$c_name."]\nHOUSE: ".$house_name." ", 0, 'L'); $pdf->Ln(3); $pdf->MultiCell(0, 7, "I am pleased to inform you that you have been offered a place at ".$school_name." to pursue a 3-year Pre-Tertiary programme leading to the West Africa Senior School Certificate Examination.", 0, 'L'); $pdf->Ln(3); $pdf->MultiCell(0, 6, "1. The reporting date for all first-year students is on ".$re_opening_date ." \n 2. You will be required to adhere religiously to all school rules and regulations as a student.\n 3. All students of the school are considered to be on probation throughout their stay in the school and could be withdrawn/dismissed at any time for gross misconduct.\n 4. On the reporting day, you are to submit a printed copy of this Admission Letter to the Senior Housemaster/Housemistress for registration and other admission formalities.\n 5. All students are expected to have active Health Insurance cards and this would be inspected by the Housemaster/Housemistress.\n 6. We congratulate you on your admission and look forward to welcoming you to the ".$school_name.".", 0, 'L'); $pdf->Ln(5); $pdf->Cell(0, 5, 'Sincerely,', 0, 1); $pdf->Ln(8); // Signature and designation $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 5, "$school_head", 0, 1); $pdf->Cell(0, 5, "$head_title", 0, 1); $pdf->Ln(5); // Add footer // $pdf->SetFont('Arial', '', 8); // $pdf->SetY(-15); // $pdf->Cell(0, 10, 'Powered by TCPDF (www.tcpdf.org)', 0, 0, 'C'); // Output the PDF $pdf->Output('I', 'Admission_Letter.pdf'); ?>
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