| Server IP : 172.64.80.1 / Your IP : 172.69.214.9 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_student/print/ |
Upload File : |
<?php
ob_start();
define('FPDF_FONTPATH','font/');
require('../../fpdf/fpdf.php');
session_start();
$formNo=$_SESSION['formNo'];
require_once('../../connect.php');
$db=db_connect();
$sql="select * from admitted where `formNo`='$formNo' or jambNo='$formNo'";
$result=$db->query($sql);
$num=$result->rowCount();
if ($num>0){
$qry=$db->query("select * from remitaorder where regNo='$formNo'and paymentType='Acceptance Fee' and transApproved='True'");
$k=$qry->rowCount();
if ($k>0){
$qry_fetch=$result->fetch(PDO::FETCH_BOTH);
$dept=$qry_fetch['course'];
$mode=$qry_fetch['mode'];
$name=$qry_fetch['names'];
$levelID=$qry_fetch['levelID'];
if ($levelID=='1'){
$progr='NATIONAL DIPLOMA';
$type='FULL TIME';
$k= 'ND - ';
$duration='Minimum 2 years, Maximum 4 years';
}elseif($levelID=='3'){
$progr='HIGHER NATIONAL DIPLOMA';
$type='FULL TIME';
$duration='Minimum 2 years, Maximum 4 years';
$k= 'HND - ';
}elseif($levelID=='5'){
$progr='NATIONAL DIPLOMA';
$type='PART TIME';
$k= 'ND - ';
$duration='Minimum 3 years, Maximum 6 years';
}elseif($levelID=='8'){
$progr='NATIONAL DIPLOMA';
$type='DAILY PART TIME';
$k= 'ND - ';
$duration='Minimum 2 years, Maximum 4 years';
}elseif($levelID=='10'){
$progr='BASIC SCIENCE';
$type='FULL TIME';
$k= '';
$duration='Minimum 1 years, Maximum 1 years';
}
//header and footer
class PDF extends FPDF
{ //Page header
/*function Header()
{
//Logo
$this->Image('../images/edebanner.png',10,8,33);
//Arial bold 15
$this->SetFont('Arial','B',15);
//Move to the right
$this->Cell(80);
//Title
$this->Cell(30,10,'Title',1,0,'C');
//Line break
$this->Ln(20);
}
*/
//Page footer
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial','I',8);
//Page number
//$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
$this->Image('../../images/footer.png',5,280);
$w=date('o');
$this->Cell(0,6,$w,0,0,'R');
}
}
$pdf= new FPDF("P","mm","A4");
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFillColor(255,255,255);
$pdf->Image("../../images/siwesHead.png",8,5,200,24,"PNG");
$pdf->SetTextColor(0,0,0);
$pdf->Ln(35);
$f=strtoupper(substr($dept,0,3));
$sola= '2016/'.$f.'/'.$mode.'/'.$formNo;
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,0,'REF: ADM/'.$sola,0,0,'L');
$pdf->Ln(6);
$pdf->SetFont('Times','B',10);
$datee=date('M d, o');
$pdf->Cell(0,0,$datee,0,0,'R');
$pdf->Ln(10);
$pdf->SetFont('Times','B',10);
$na=explode(' ',$name);
$pdf->Cell(0,0,"Dear ".$na[0].',',0,0,'L');
$pdf->Ln(8);
$pdf->SetFont('Times','BU',10);
//$progr='NATIONAL DIPLOMA';
//$typee='PART TIME';
$pdf->Cell(0,0,"OFFER OF PROVISIONAL ADMISSION INTO ". $progr." (". $type .") PROGRAMME",0,'0','L');
$pdf->Ln(8);
$pdf->SetFont('Times','',10);
$sessiona='2016/2017';
//$dept='COMPUTER SCIENCE';
$word="On behalf of the Academic Board, I am pleased to inform you that you have been offered provisional admission to pursue ".$progr. " programme leading to the award of ".$progr. " in ".$dept. " with effect from ".$sessiona." academic session.";
//$s=wordwrap($word,75,'<br>\n',true);
//$s=wordwrap($word,85,"<br>\n",TRUE);
$pdf->MultiCell(0,7,$word,0,'0','L',true);
$pdf->Ln(8);
$pdf->SetFont('Times','i',10);
$pdf->Cell(0,0,"The details of your admission is as below.",0,0,'L');
$pdf->SetTextColor(0,0,0);
$pdf->Ln(6);
$pdf->SetFont('Times','',10);
$pdf->Cell(45,5,'Surname',1,0,'L',true);
$pdf->Cell(140,5,$na[0],1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Other Name(s)',1,0,'L',true);
$pdf->Cell(140,5,$na[1].' '.$na[2],1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Department',1,0,'L',true);
$pdf->Cell(140,5,$dept,1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Course',1,0,'L',true);
$pdf->Cell(140,5,$k.$dept,1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Mode of Study',1,0,'L',true);
$pdf->Cell(140,5,$type,1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Duration',1,0,'L',true);
$pdf->Cell(140,5,$duration,1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,5,'Academic Conditions',1,0,'L',true);
$pdf->Cell(140,5,'As contained in our Students\' Information Handbook to be issued during registration',1,0,'L',true);
$pdf->Ln(5);
$pdf->Cell(45,35,'Other Conditions',1,0,'L',true);
$pdf->MultiCell(140,7,'In order to confirm your place to study this course, you are required to pay an acceptance fee of Ten Thousand Naira (N10,000.00) only on/before 7th December, 2015. The procedure for the payment of the acceptance fee can be found on the institution\'s website www.federalpolyede.edu.ng. Failure to meet this requirement would lead to forfeiture of this offer of admission.',1);
$pdf->Ln(15);
$pdf->SetFont('Times','',10);
$pdf->Cell(0,0,"Accept our congratulations.",0,0,'L');
$pdf->Ln(15);
$pdf->SetFont('Times','i',10);
$pdf->Cell(0,0,"Yours sincerely,",0,0,'L');
$pdf->Ln(15);
$pdf->SetFillColor(255,255,255);
$pdf->Image("../../images/signature.jpg",10,220,40,15,"jpg");
$pdf->Ln(10);
$pdf->SetFont('Times','b',10);
$pdf->Cell(0,0,"G. B. Omotosho (Mrs.)",0,0,'L');
$pdf->Ln(4);
$pdf->SetFont('Times','',10);
$pdf->Cell(0,0,"Admissions Officer",0,0,'L');
$pdf->Ln(4);
$pdf->SetFont('Times','',10);
$pdf->Cell(0,0,"For Registrar,",0,0,'L');
$pdf->Output();
}else{
echo 'Pay Acceptance Fee First';
}
}else{
echo 'Admission letter not Available';
}
ob_end_flush();
?>