403Webshell
Server IP : 172.64.80.1  /  Your IP : 172.70.127.233
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/admin_student/print/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/admin_student/print/semResult.php
<?php
ob_start();
extract($_POST);
 $matNo=$username;
$y=explode('/',$asession);
echo $year=$y[0];

if ($year>2016){
    header('location:' . '../studentloginNow.php');
    die();
}
require_once('../../connect.php');
$db=db_connect();
$sqlReal=$db->query("select * from realdata where usernamea='$matNo' and passworda='$password'");
$sqlReal_fetch=$sqlReal->fetch(PDO::FETCH_BOTH);
$numReal=$sqlReal->rowCount();
if ($numReal>0){
    $sql=$db->query("select * from rawcgpa where matNo='$matNo' and level like '%$asemester%' and asession='$asession'");
    $sql_fetch=$sql->fetch(PDO::FETCH_BOTH);
    $num=$sql->rowCount();
        if ($num > 0) {
           // while ($sql_fetch=$sql->fetch(PDO::FETCH_BOTH)) {
                $level = $sql_fetch['level'];
                $names = $sql_fetch['names'];
                $dept = $sql_fetch['dept'];
                $gpa = $sql_fetch['gpa'];
                $cgpa = $sql_fetch['cgpa'];
                $remark = $sql_fetch['remark'];
                $supress = $sql_fetch['supress'];
                $courseUnitTotal = 0;
        } else {
            header('location:' . '../studentloginNow.php?id=1');
        }
}else{
    header('location:'.'../studentloginNow.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>'. $level.' ' .$asession.'</strong></td>
      </tr>
      
      <tr>
        <td ><table width="100%" align="left" cellpadding="3" cellspacing="5">
          <tr>
            <td>NAME</td>
            <td><strong>'.$names.'</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>';
//die($asession.$asemester);
		  $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)){
          $courseCode = $row['courseCode'];



              $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=$res_fetch['courseTitle'];
			  $courseUnit=$res_fetch['courseUnit'];
		  }else{
			  $courseTitle="";
			  $courseUnit="";
		  }
		  if($supress<>''){
              $score= '***';
              $cpoint='***';
              $grade='***';
              $gpa='***';
              $cgpa='***';
          }else {
              $score = $row['score'];
              $cpoint = $row['cpoint'];
              $grade = $row['grade'];
          }
        $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>&nbsp;</td>
            <td><strong>'.$cpointTotal.'</strong></td>
          </tr>
         <tr>
           <td colspan="3" align="right">&nbsp;</td>
           <td>&nbsp;</td>
           <td><strong>GPA:'. $gpa.'</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;
//die();
$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();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit