| 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
ob_start();
extract($_POST);
$matNo=$username;
die($matNo);
if (!isset($username)){
header('location:' . '../studentloginNow.php?id=1');
}
//require_once('../../connect.php');
require_once('../../result_connect.php');
$y=explode('/',$asession);
$year=$y[0];
$s=explode(' ',$asemester);
$semester=$s[0] . '_' . $s[1];
if ($asemester=="Summer"){
$semester="suplimentary_semester";
}
echo $tableName=strtolower($year.'_'.$semester.'_results');
die($asemester);
$rdb=rdb_connect();
echo $query="select * from ".$tableName." where MatricNo='$matNo'";
$sql=$rdb->query($query);
$num=$sql->rowCount();
if ($num > 0) {
$sql_fetch=$sql->fetch(PDO::FETCH_BOTH);
$Level = $sql_fetch['Level'];
$FullNames = $sql_fetch['FullNames'];
$CosCode = $sql_fetch['CosCode'];
$dept=$sql_fetch['dept'];
// $cos=$rdb->query("select ForPortal from courses where cosCode='$CosCode'");
// if ($cos->rowCount()>0){
// $cos_fetch=$cos->fetch(PDO::FETCH_BOTH);
// $dept=strtoupper($CosCode);
// }
// $ProgCode = $sql_fetch['ProgCode'];
// switch ($ProgCode) {
// case 'ND':
// $ProgCode = 'NATIONAL DIPLOMA';
// break;
//
// case 'HND':
// $ProgCode = 'HIGHER NATIONAL DIPLOMA';
// break;
// }
//
// $Mode = $sql_fetch['Mode'];
//================================================== split
$SubjectCodes = $sql_fetch['SubjectCodes'];
$SubjectCodes_split=explode('#',$SubjectCodes);
$count=count($SubjectCodes_split);
$SubjectCodes_split[5];
$SubjectNames = $sql_fetch['SubjectNames'];
$SubjectNames_split=explode('#',$SubjectNames);
$SubjectUnits = $sql_fetch['SubjectUnits'];
$SubjectUnits_split=explode('#',$SubjectUnits);
$Scores = $sql_fetch['Scores'];
$Scores_split=explode('#',$Scores);
$Grades = $sql_fetch['Grades'];
$Grades_split=explode('#',$Grades);
$Points = $sql_fetch['Points'];
$Points_split=explode('#',$Points);
//=======================================end slipt
$prevTNU = $sql_fetch['prevTNU'];
$prevTCP= $sql_fetch['prevTCP'];
$prevCGPA= $sql_fetch['prevCGPA'];
$presTNU = $sql_fetch['presTNU'];
$presTCP= $sql_fetch['presTCP'];
$presGPA= $sql_fetch['presGPA'];
$cumTNU = $sql_fetch['cumTNU'];
$cumTCP= $sql_fetch['cumTCP'];
$CGPA= $sql_fetch['CGPA'];
$cumOUT = $sql_fetch['cumOUT'];
$cumTUP= $sql_fetch['cumTUP'];
$Remark= $sql_fetch['Remark'];
$refNumber = $sql_fetch['RefNumber'];
$Supress = $sql_fetch['Supress'];
$courseUnitTotal = 0;
// }
} else {
header('location:' . '../studentlogin.php?id=1');
}
$mainData='
<!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 | Semester Result</title>
<style type="text/css">
#cen {
text-align: center;
font-style: italic;
font-size: 12px;
}
#cen2 {
text-align: center;
font-size: 18px;
font-weight: bold;
}
</style>
</head>
<body>
<table width="80%" align="center" cellpadding="3" cellspacing="5">
<tr>
<td><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td align="center" colspan="6"><img src="../../images/siwesHead.png" width="741" height="95" /></td>
</tr>
<tr>
<td bgcolor="#3F76B9" id="cen2" colspan="6" >SEMESTER RESULT</td>
</tr>
<tr>
<td id="cen2" colspan="6"><strong>'.strtoupper($ProgCode).' '.$Level. ' '.$asession.'</strong></td>
</tr>
<tr>
<td ><table width="100%" align="left" cellpadding="3" cellspacing="5">
<tr>
<td>NAME</td>
<td><strong>'.$FullNames.'</strong></td><td rowspan="3"><img src="../../passport/Reg'. $matNo.'.jpg" alt="" width="115" height="125" /></td>
</tr>
<tr>
<td>MATRIC NUMBER</td>
<td><strong>'.$matNo.'</strong></td>
</tr>
<tr>
<td>DEPARTMENT</td>
<td><strong>'. $dept.'</strong></td>
</tr>
</table></td>
</tr>
<tr>
<td id="cen">This result DOES NOT serves as replacement for the notification of result or academic transcript being issued by the institution.</td>
</tr>
<tr>
<td><table width="100%" border="1" cellpadding="3" cellspacing="0">
<tr>
<td><strong>SN</strong></td>
<td><strong>CODE</strong></td>
<td><strong>TITLE</strong></td>
<td><strong>UNIT</strong></td>
<td><strong>SCORE</strong></td>
<td><strong>C. POINT</strong></td>
</tr>';
// $sq=$db->query("select distinct(courseCode),score,cpoint,grade from rawscore where matNo='$matNo' and grade<>'--' and level like '%$asemester%'and asession='$asession'");
//$sq_fetch=$sq->fetch(PDO::FETCH_BOTH);
// $nu=$sq->rowCount();
//echo $asession;
$i=1;
$dept1=0;
/*echo $dept;
if ($dept=='SURVEYING AND GEOINFORMATICS') {
$dept='SURVEYING AND GEO-INFORMATICS';
}elseif($dept=='SLT - BIOCHEMISTRY OPTION'){
$dept='BIOCHEMISTRY';
}elseif($dept=='SLT - MICROBIOLOGY OPTION'){
$dept='MICROBIOLOGY';
}elseif($dept=='BUSINESS STUDIES'){
$dept='Business Administration and Mgt.';
}
else{
$dept1 = explode('-', $dept);
if (count($dept1) > 1) {
$dept = trim($dept1[1]);
} else {
$dept = trim($dept1[0]);
}
}
*/
$cpointTotal=0;
// while ($row=$sq->fetch(PDO::FETCH_BOTH)){
for ($kk=0;$kk<$count;++$kk){
$courseCode = $SubjectCodes_split[$kk];
// $res=$db->query("select * from coursepool where coursecode='$courseCode' and dept='$dept'");
// $nus=$res->rowCount();
// $res_fetch=$res->fetch(PDO::FETCH_BOTH);
// if ($nus>0){
$courseTitle=$SubjectNames_split[$kk];
$courseUnit=$SubjectUnits_split[$kk];
// }else{
// $courseTitle="";
// $courseUnit="";
// }
if($Supress<>''){
$score= '***';
$cpoint='***';
$grade='***';
$gpa='***';
$cgpa='***';
$CGPA= '***';
$presGPA='***';
$Remark='***';
}else {
$score = $Scores_split[$kk];
$cpoint = $Points_split[$kk];
$grade = $Grades_split[$kk];
}
$mainData.='
<tr>
<td>'. $i.'</td>
<td>'. $courseCode.'</td>
<td>'. $courseTitle.'</td>
<td>'.$courseUnit; $courseUnitTotal+=$courseUnit; $mainData.='</td>
<td>'. $score.'</td>
<td>'. $cpoint; $cpointTotal+=$cpoint;$mainData.='</td>
</tr>';
++$i;
}
$mainData.='
<tr>
<td colspan="3" align="right"><strong>TOTAL</strong></td>
<td><strong>'. $courseUnitTotal.'</strong></td>
<td> </td>
<td><strong>'.$cpointTotal.'</strong></td>
</tr>
<tr>
<td colspan="3" align="right"> </td>
<td> </td>
<td><strong>GPA:'. $presGPA.'</strong></td>
<td><strong>CGPA:'. $CGPA.'</strong></td>
</tr>
</table>
<p>REMARK: <strong>'. $Remark.'-'.$Supress.'</strong></p>
<p>GPA: Grade Point Aggregate</p>
<p>CGPA: Cummulative Grade Point Aggregate</p></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>';
//echo $mainData;
$dat=date('l, M d, o, h:i:s a');
$customizedFooter='<img src="../../images/siwesfooter.png"><br><div align="right">'. $dat.'</div>';
include("../../mpdf/mpdf.php");
$mpdf=new mPDF('c');
$mpdf->SetWatermarkImage('../../images/logoBack.png');
$mpdf->showWatermarkImage = true;
$mpdf->WriteHTML($mainData);
$mpdf->setFooter($customizedFooter) ;
$mpdf->Output();
exit;
ob_end_flush();
?>