| Server IP : 172.64.80.1 / Your IP : 172.70.131.126 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_main/ |
Upload File : |
<?php
session_start();
$countt=0;
$cUnit=0;
?>
<!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>Untitled Document</title>
<link href="../lecturer/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
margin-top: 0px;
margin-bottom: 0px;
}
</style>
</head>
<?php
extract($_POST);
require_once('../connect.php');
$db=db_connect();
$sola="select * from current";
$sola_exe=$db->query($sola);
if ($sola_exe->rowCount()==1){
$sola_exe_fetch=$sola_exe->fetch(PDO::FETCH_BOTH);
$asession=$sola_exe_fetch['asession'];
}
$sql_level="select * from leveltb where levelName='$level'";
$result_level=$db->query($sql_level);
$result_level=$result_level->fetch(PDO::FETCH_BOTH);
$levelID =$result_level['id'];
$sql_dept="select * from dept where sn='$dept'";
$result_dept=$db->query($sql_dept);
$result_dept_fetch=$result_dept->fetch(PDO::FETCH_BOTH);
$course=$result_dept_fetch['dOption'];
$sqlCheck1="select * from realdata where upper(course)=lower('$course') and levelID='$levelID' and graduated<>'Yes'";
$resultCheck=$db->query($sqlCheck1);
$biodata_data=$db->query($sqlCheck1);
//$biodata_data=$resultCheck->fetch(PDO::FETCH_BOTH);
$resultCheck=$resultCheck->rowCount();
//echo $levelID;
if ($resultCheck>0){
if (($levelID=='3') or ($levelID=='4')){
$deptPrefix=$result_dept_fetch['hnd'];
//echo 'HNDDDDDDDDDDDDDDDDD';
}else{
$deptPrefix=$result_dept_fetch['nd'];
//echo 'NDDDDDDDDDDDDDDDDD';
}
$semester=$_SESSION['asemester'];
$session=$_SESSION['asession'];
//echo $deptPrefix;
$sql_course="select distinct courseCode, courseUnit,levelID from coursereg where `matNo` LIKE '$deptPrefix%' and levelID='$levelID' and semester='$semester' order by sn desc";
//die();
$result_course=$db->query($sql_course);
$num_course=$result_course->rowCount();
$j=0;
//while ($j<$num_course){
while($row=$result_course->fetch(PDO::FETCH_BOTH)){
$courseC[$j]=$row['courseCode'];
$Unit[$j]=$row['courseUnit'];
++$j;
}
//die();
$sql="select distinct matNo from coursereg where `matNo` LIKE '$deptPrefix%' and levelID='$levelID' order by matNo";
$result=$db->query($sql);
$num=$result->rowCount();
?>
</td>
</tr>
</table>
<tr>
<td><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td colspan="4"></td>
</tr>
<tr>
<td colspan="7"><center><table width="100%" border="0" align="center" cellpadding="3" cellspacing="5">
<tr>
<td align="center" valign="top"><p><img src="../images/edebanner2.png" width="731" height="95" /></p>
<p id="heading"><strong>TUTORIAL LIST</strong></p></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="8%"><strong>School</strong></td>
<td width="34%"><?php echo $txtschool; ?></td>
<td width="17%"><strong>Department</strong></td>
<td width="41%"><?php echo $course;
// $jm=mysql_query("select dOption from dept where sn='$dept'");
//echo mysql_result($jm,0,'dOption'); ?></td>
</tr>
<td><strong>Session</strong></td>
<td><?php echo $session,'(',$semester.')'; ?></td>
<td><strong>Level</strong></td>
<td><?php echo $level; ?></td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<tr>
<td colspan="4"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr align="center">
<td><em><strong>SN</strong></em></td>
<td><em><strong>Matric Number</strong></em></td>
<td><em><strong><?php for ($j=0;$j<$num_course;++$j){ echo '<td>'.$courseC[$j].'<br>'.$Unit[$j].'</td>';}?>
</strong></em></td>
<td><em><strong>Total</strong></em></td>
<td><em><strong>Result</strong></em></td>
<td><em><strong>e-Unit</strong></em></td>
<td><em><strong>Status</strong></em></td>
</tr>
<tr>
<td colspan="4"></td>
</tr>
<?php
$i=0;
//while ($i<$num){
while($row=$result->fetch(PDO::FETCH_BOTH)){
$countt=0;
$cUnit=0;
?>
<tr>
<td><?php echo $i+1;?></td>
<td><?php echo $matNo= $row['matNo'];?>
</td>
<td><?php for ($j=0;$j<$num_course;++$j){
$cours=$courseC[$j];
$sql_c="select * from coursereg where `matNo`= '$matNo' and levelID='$levelID' and asession='$session' and courseCode='$courseC[$j]'";
$result_c=$db->query($sql_c);
//$sumUnit=mysql_result($sql_c,$j,'courseUnit');
$num_c=$result_c->rowCount();
//echo $j;
if ($num_c>0){
//echo $j;
// mysql_result($result_c,$i,'courseUnit');
echo '<td>'."X".'</td>';
$countt=$countt+1;
$cUnit=$cUnit+$Unit[$j];
}else{
echo '<td>'."0".'</td>';;
}
}
?></td>
<td><?php echo $cUnit;?></td>
<td>
<?php
$prefix=substr($matNo,0,2);
$sql=$db->query("select ndMaxUnit,hndMaxUnit,ndPTMaxUnit from dept where nd='$prefix' or hnd='$prefix'");
$sql_fetch=$sql->fetch(PDO::FETCH_BOTH);
//if ($sql_fetch['ndMaxUnit']>1) {
if (($levelID==1) or($levelID==2)or ($levelID==8)or ($levelID==9)) {
$maxUnit = $sql_fetch['ndMaxUnit'];
}else if (($levelID==5) or($levelID==6)or ($levelID==7)) {
$maxUnit = $sql_fetch['ndPTMaxUnit'];
}else if (($levelID==3) or($levelID==4)) {
$maxUnit = $sql_fetch['hndMaxUnit'];
}
// $asession='2017/2018';
$session_split=explode('/',$asession);
$session_gena=$session_split[0]-1;
$session_genb=$session_split[1]-1;
$session_gen=$session_gena.'/'.$session_genb;
$sq2=$db->query("select * from rawcgpa where matNo='$matNo' and remark like 'Prob%' and asession='$session_gen'");
$sq=$sq2->rowCount();
$rr=$db->query("select * from rawcgpa where matNo='$matNo' and asession='$session_gen'");
$kk_fetch=$rr->fetch(PDO::FETCH_BOTH);
$kk=$kk_fetch['cgpa'];
if ($sq>0) {
switch ($levelID) {
case 1:
$maxUnit = 18;
break;
case 2:
$maxUnit = 18;
break;
case 3:
$maxUnit = 18;
break;
case 4:
$maxUnit = 18;
break;
case 5:
$maxUnit = 15;
break;
case 6:
$maxUnit = 15;
break;
case 7:
$maxUnit = 15;
break;
case 8:
$maxUnit = 18;
break;
case 9:
$maxUnit = 18;
break;
case 10:
$maxUnit = 1;
break;
}
}
echo $kk;
?>
</td>
<td>
<?php
echo $maxUnit;
?>
</td>
<td>
<?php
if($cUnit>$maxUnit){
echo $status1="Overflow";
// echo $maxUnit;
}else{
echo $status1="Normal";
}
?>
</td>
</tr>
<?php
++$i;
}
$sql_sum=$db->query("select distinct courseCode,courseUnit,courseTitle from coursereg where `matNo` LIKE '$deptPrefix%' and levelID='$levelID' and semester='$semester' order by levelID,courseCode");
?>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table border="1" cellspacing="0">
<tr>
<th>S/N</th>
<th>Course Code <?php //echo $dept ;?></th>
<th>Course Title</th>
<th>Course Unit</th>
</tr>
<?php
$sn=1;
while ($row=$sql_sum->fetch(PDO::FETCH_BOTH))
{
echo '
<tr>
<td>'.$sn.'</th>
<td>'.$row['courseCode'].'</td>
<td>'.$row['courseTitle'].'</td>
<td>'.$row['courseUnit'].'</td>
</tr>';
++$sn;
}
}else{
echo '<div align="center"><h2>Select Correct Level</h2><br><a href="javascript:history.go(-1)"> Go to Previous page</a></div>';
}
?>
</table>
</html>