| Server IP : 172.64.80.1 / Your IP : 172.70.50.62 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/ |
Upload File : |
<?php
session_start();
if (!isset($_SESSION['matNo'])){
header('location:../login.php');
}
$s='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ePortal | School Receipt</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>';
$matNo=$_SESSION['matNo'];
require_once('../../connect.php');
$db=db_connect();
$asemester=$_SESSION['asemester'];
$asession=$_SESSION['asession'];
$biodataSQL="select * from realdata where matNo='$matNo'";
$biodataResult=$db->query($biodataSQL);
$biodataResult_fetch=$biodataResult->fetch(PDO::FETCH_BOTH);
$biodataNum=$biodataResult->rowCount();
$formNo=$biodataResult_fetch['formNo'];
//=========================
//echo "select * from remitaorder where regNo='$matNo' and transApproved='True' and paymenttype like '%School Fees' and paymenttype not like '%Summer%' and status<>'Re-fund'and pay_session='$asession'";
$sqlSummer=$db->query("select * from remitaorder where regNo='$matNo' and transApproved='True' and paymenttype like '%School Fees' and paymenttype not like '%Summer%' and status<>'Re-fund'and pay_session='$asession'");
$countSummer=$sqlSummer->rowCount();
if ($countSummer>0){
$sqlSummer_fetch=$sqlSummer->fetch(PDO::FETCH_BOTH);
$sem=$sqlSummer_fetch['paymentType'];
if ($sem=='Summer School Fees'){
$asemester='Summer Semester';
}else{
echo $asemester='First Semester';
}
}
$burSign='<img src="hodSign/burSign.png" alt="" width="85" height="45" />';
//die("select * from remitaorder where regNo='$matNo' and transApproved='True' and paymenttype like '%School Fees' and status<>'Re-fund'and pay_session='$asession'");
//=======================
$s.='<table width="80%" align="center" cellpadding="3" cellspacing="5">
<tr>
<td><table width="100%" cellspacing="1" cellpadding="1">
<tr>
<td valign="top"><table width="100%" cellspacing="1" cellpadding="1">
<tr>
<td align="center" valign="top"><p><img src="../../images/siwesHead.png" width="731" height="95" /><br />
</p></td>
</tr>
<tr>
<td align="center" bgcolor="#CCCCCC"><strong id="cen"><h2>SCHOOL FEE RECEIPT</h2></strong></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td width="27%" colspan="1" id="lab">Matric Number</td>
<td width="3%"> </td>
<td colspan="3">'.$matNo.'</td>
<td width="26%" rowspan="5"><img src="../../passport/Reg'.$matNo.'.jpg" alt="" width="115" height="125" /></td>
</tr>
<tr>
<td colspan="1" id="lab">Jamb Reg No./Form No.</td>
<td> </td>
<td colspan="3">'. $biodataResult_fetch['formNo'].'</td>
</tr>
<tr>
<td colspan="1" id="lab">Name</td>
<td> </td>
<td colspan="3"><b><H3>'.strtoupper($_SESSION['names']).'</H3></b></td>
</tr>
<tr>
<td colspan="1" id="lab">Session</td>
<td> </td>
<td colspan="3"><b></b>'.$asession.'</b></td>
</tr>
<tr>
<td colspan="1" id="lab">Semester</td>
<td> </td>
<td colspan="3">'. $asemester.'</td>
</tr>
<tr>
<td id="lab">Department</td>
<td> </td>
<td width="26%">'. $_SESSION['course'].'</td>
<td width="15%" id="lab">Level</td>
<td width="3%"> </td>
<td>';
$levelID= $_SESSION['levelID'];
$sqlLevel=$db->query("select * from leveltb where id='$levelID'");
$sqlLevel_fetch=$sqlLevel->fetch(PDO::FETCH_BOTH);
$numLevel=$sqlLevel->rowCount();
if ($numLevel>0){
$s.='<b>'.$sqlLevel_fetch['levelName'].'</b>';
}else{
$s.= "No Level Attached";
}
$s.='
</td>
</tr>
<tr>
<td colspan="6" id="lab"> </td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td colspan="5" bgcolor="#999999" id="headingg">PAYMENT DETAILS</td>
</tr>
<tr>
<td colspan="5">
<table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td>
<table width="100%" border="1" cellpadding="3" cellspacing="0">';
$sqlBank="select * from remitaorder where regNo='$matNo' and transApproved='True' and paymenttype like '%School Fees' and status<>'Re-fund'and pay_session='$asession'";
$resultBank=$db->query($sqlBank);
//$resultBank_fetch=$resultBank->fetch(PDO::FETCH_BOTH);
$countBank=$resultBank->rowCount();
$total=0;
if ($countBank>0){
$i=0;
$s.='
<tr>
<td id="heeee">Payment Details</td>
</tr>
<tr>
<td><table width="100%" border="1" cellpadding="3" cellspacing="0">
<tr>
<td><strong>Receipt Number</strong></td>
<td><strong>Remita Retrieval Reference</strong></td>
<td><strong>Date Paid</strong></td>
<td><strong>Payment Type</strong></td>
<td><strong>Amount Paid</strong></td>
</tr>';
while ($row=$resultBank->fetch(PDO::FETCH_BOTH)){
$total=$total+ $row['amtPaid'];
$qrValue='https://www.federalpolyede.edu.ng/qrCheck.php?ID='.$row['orderID'];
$s.='<tr>
<td>'. $row['orderID'].'</td>
<td>'.$row['remitaRRR'].'</td>
<td>'.$row['transDate'].'</td>
<td>'.$row['paymentType'].'</td>
<td>N'.$row['amtPaid'].'</td>
</tr>';
}
// echo $total=$total+ $resultBank_fetch['amtPaid'];
$s.='
<tr><td colspan="4" align="right"><h3>Total</h3></td>
<td><h3>N'.$total.'</h3></td></tr>
</table></td>
</tr>';
}else{
$s.='
<tr>
<td><h3>Payment has not been made</h3></td>
</tr>';
}
$s.=' </table></td>
</tr>
</table>
<p> </p></td>
</tr>
<tr>
<td height="25" colspan="5" bgcolor="#FFFFFF" id="headingg2"> </td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#666666" id="headingg">FOR OFFICIAL USE ONLY
<tr>
<td colspan="5"><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td> </td>
<td id="sch"> </td>
</tr>
<tr>
<td>Account Officer: Mr. ALAO Koleola</td>
<td rowspan="2"> </td>
</tr>
<tr>
<td>Sign./ Date & Stamp: '.$burSign.'</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="right"><hr />'. date('l, M d, o, h:i:s a').'</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>';
$aspoa = '
<h1>adeolu</h1>
';
//echo $s;
//die();
if ($matNo) {
include("../../mpdf/mpdf.php");
$filename='schlReceipt-'.$matNo.'.pdf';
$mpdf = new mPDF('c');
$mpdf->SetWatermarkImage('../../images/logoBack.png');
$mpdf->showWatermarkImage = true;
$dat = date('l, M d, o, h:i:s a');
$customizedFooter = '<img src="../../images/siwesfooter.png"><br><div align="right">' . $dat . '</div>';
$mpdf->WriteHTML($s);
$mpdf->setFooter($customizedFooter);
$mpdf->Output($filename,'D');
exit;
}else{
echo 'An error Occured'. $row['remitaRRR'];
}
?>