| Server IP : 172.64.80.1 / Your IP : 172.70.50.63 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/eace_admin_student/print/ |
Upload File : |
<?php
ob_start();
session_start();
$asession=$_SESSION['asession'];
$matNo=$_SESSION['matNo'];
$asemester=$_SESSION['asemester'];;
require_once('../../connect.php');
$db=db_connect();
$levelID= $_SESSION['levelID'];
require('../../filetoU/logFile.php');
$logD='Exam Slip: '.$matNo;
logDetail($matNo,$logD);
require_once('check_maxUnit.php');
if (($levelID=='1') or ($levelID=='2')){
$progr='NATIONAL DIPLOMA';
$type='FULL TIME';
$k= 'ND '.$levelID.' FT ';
$duration='Minimum 2 years, Maximum 4 years';
}elseif(($levelID=='3')or ($levelID=='4')){
$progr='HIGHER NATIONAL DIPLOMA';
$type='FULL TIME';
$duration='Minimum 2 years, Maximum 4 years';
$k= 'HND - ';
}elseif(($levelID=='5')or ($levelID=='6')or ($levelID=='7')){
$progr='NATIONAL DIPLOMA';
$type='PART TIME';
$k= 'ND - ';
$duration='Minimum 3 years, Maximum 6 years';
}elseif(($levelID=='8')or ($levelID=='9')){
$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';
}
if ($maxUnit<$sumUnit){
$excessUnit=$sumUnit-$maxUnit;
echo "<div align='center' style='color: red'><h2>You Have Registered More Than Approved Units (".$maxUnit."), Kindly Remove ".$excessUnit." Units Course(s)</h2></div>";
echo '<div align="center"><a href="../courseReg2.php">Click Here to Remove</a></div>';
die();
}
$cgpa=$db->query("select * from rawcgpa where matNo='$matNo' order by sn desc");
$cgpa_count=$cgpa->rowCount();
$cgpa_fetch=$cgpa->fetch(PDO::FETCH_BOTH);
if ($cgpa_count>0){
$raw_cgpa=$cgpa_fetch['cgpa'];
}else{
$raw_cgpa='Not Available';
}
$mainBody='
<!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 | Courses Registered</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>';
$mainBody.='
<table width="100%" align="center" cellpadding="3" cellspacing="5">
<tr>
<td >
<table align="center" cellpadding="1" cellspacing="1">
<tr>
<td valign="top">
<table width="100%" cellspacing="1" cellpadding="1">
<tr>
<td align="center" valign="top"><p><img src="../../images/NCE_eace_LETTER_HEAD.png" width="731" height="95" alt="Federal Polytechnic Ede" /></p></td>
</tr>
<tr>
<td align="center" bgcolor="#ffffff"><h4 style="text-decoration: underline">'.$asession.' ACADEMIC SESSION <br>
'.strtoupper($asemester).' EXAMINATION SLIP</h4></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="7">
<table cellspacing="5" cellpadding="3" align="center" width="100%">
<tr align="center">
<td colspan="1" align="right">MATRIC. NUMBER:</td>
<td > </td>
<td colspan="2"><b>'.strtoupper($matNo).'</b></td>
<td> </td>
<td rowspan="4" colspan="2" align="center"><img src="../../passport/Reg'. $matNo.'.jpg" alt="" width="115" height="125" /></td>
</tr>
<tr>
<td colspan="1" align="right" >FULL NAMES:</td>
<td> </td>
<td colspan="2"><b>'.strtoupper($_SESSION['names']).'</b></td>
</tr>
<tr>
<td id="lab" colspan="1" align="right">COURSE OF STUDY:</td>
<td > </td>
<td colspan="1"><b>'. strtoupper($_SESSION['course']).'</b></td>
</tr>
<tr>
<td id="lab" align="right">PROGRAMME:</td>
<td > </td>
<td><b>'. strtoupper($progr).'</b></td>
</tr>
<tr>
<td id="lab" align="right">LEVEL:</td>
<td > </td>
<td><b>';
$sqlLevel=$db->query("select * from leveltb where id='$levelID'");
$sqlLevel_fetch=$sqlLevel->fetch(PDO::FETCH_BOTH);
$numLevel=$sqlLevel->rowCount();
if ($numLevel>0){
$mainBody.= $sqlLevel_fetch['levelName'];
}else{
$mainBody.= "No Level Attached";
}
$mainBody.='</b></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table border="1" cellpadding="3" cellspacing="0" align="center">
<tr>
<td colspan="6"></td>
</tr>
<tr bgcolor="aqua">
<td ><strong>SN</strong></td>
<td ><strong>CODE</strong></td>
<td colspan="2" ><strong>TITLE</strong></td>
<td ><strong>UNIT</strong></td>
<td ><strong>INVIGILATOR SIGN. & DATE</strong></td>
</tr>
';
$sqlCourse=$db->query("select * from eace_coursereg_nce where matNo='$matNo' and semester='$asemester' and asession='$asession'");
// $sqlCourse=$db->query("select * from coursereg where matNo='$matNo' and semester='First Semester' and asession='$asession'");
$numCourse=$sqlCourse->rowCount();
if ($numCourse>0){
$i=1;
$aTotal=0;
while ($row=$sqlCourse->fetch(PDO::FETCH_BOTH)){
$mainBody.='
<tr>
<td>'. $i.'</td>
<td>'. $row['courseCode'].'</td>
<td colspan="2">'. $row['courseTitle'].'</td>';
$a= $row['courseUnit'];
$aTotal+=$a;
$mainBody.='
<td>'. $a.'</td>
<td> </td>
</tr>';
++$i;
}
$mainBody.='
<tr>
<td colspan="4" align="right"><B>TOTAL UNITS REGISTERED</B></td>
<td colspan="1"><B>'. $aTotal.'</B></td>
<td> </td>
</tr>';
}else{
$mainBody.='
<tr>
<td colspan="6">
No Course Registered Yet!
</td>
</tr>
';
}
$mainBody.=' <tr><td colspan="6">
<table cellspacing="5" cellpadding="3" >
<tr>
<td> PREVIOUS CGPA & REMARK: <strong style="font-size: large">'.$raw_cgpa.'</strong>
</td>
<td></td>
</tr>
</table>
</td>
</tr>
</table><table>
<tr>
<td bgcolor="#FFFFFF" id="headingg2" colspan="5">
<tr>
<td id="headingg" colspan="5" width="90%" align="CENTER"><B>OFFICIAL USE ONLY</B>
<tr>
<td colspan="5"><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td colspan="7" align="left"><strong>OFFICER-IN-CHARGE</strong></td>
</tr>
<tr>
<td colspan="4" id="inst">Name: ___________________________ </td>
<td colspan="3" align="right">Signature & Stamp: ___________________</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>';
//echo $mainBody;
include("../../mpdf/mpdf.php");
//$mpdf=new mPDF('c');
$mpdf=new mPDF('','A4', 0, '', 10, 10, 10, 10, 9, 9,'P');
$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($mainBody);
$mpdf->setFooter($customizedFooter) ;
$mpdf->Output();
exit;
ob_end_flush();
?>