| 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/admin_student/ |
Upload File : |
<?php
ob_start();
include('headMain.php');
//session_start();
if(!isset($_SESSION['matNo'])){
header('location:'.'login.php');
}
require_once('../connect.php');
$db=db_connect();
extract($_POST);
// $courseNum=count($course);
$semester=$_SESSION['asemester'];
$asession=$_SESSION['asession'];
$levelID=$_SESSION['levelID'];
$matNo=$_SESSION['matNo'];
if(isset($_GET['id'])){
if($_GET['id']==1){
echo ' <script> alert("Assignment Uploaded Successfully"); </script>';
}elseif($_GET['id']==2){
echo ' <script> alert("Assignment Failed to Upload");</script>';
}
}
?>
<div id="wrapper">
<td> <form id="form1" name="form1" method="post" action="aaaa.php" role="form">
<tr>
<fieldset>
<legend>
<div class="row">
<div></div>
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
View Course Materials (<?php echo $_SESSION['matNo'].'-'.$semester ;?>)
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-12">
<table width="100%" align="center" cellpadding="3" cellspacing="5">
<tr>
<td><table width="100%" cellspacing="5" cellpadding="3" class="table table-striped">
<tr bgcolor="#999999">
<td><strong>Course Code</strong></td>
<td><strong>Course Title</strong></td>
<td><strong>Lecturer Name</strong></td>
<td><strong>Date Uploaded</strong></td>
<td><strong>Deadline Date</strong></td>
<td><strong>Operator</strong></td>
</tr>
<?php
$levelID=$_SESSION['levelID'];
$dept=$_SESSION['course'];
$courseTotal=0;
$d_time=date("Y-m-d H:i:s");
$levelID_less=$levelID-1;
$adisa="select * from uploading_tb where courseID in (select sn from coursepool where courseCode in (select courseCode from coursereg where matNo='$matNo') and levelID=$levelID and dept='$dept') and mode=2";
// $sql=$db->query("select * from uploading_tb where courseID in (select sn from coursepool where courseCode in (select courseCode from coursereg where matNo='$matNo') and (levelID='$levelID' or levelID='$levelID_less')) and mode=2 ");
$sql=$db->query($adisa);
$num=$sql->rowCount();
$i=0;
if ($num>0){
while ($row=$sql->fetch(PDO::FETCH_BOTH)){
?>
<tr>
<td>
<?php
$courseID=$row['courseID'];
$check=$db->query("select * from assignmentsubmission where matNo='$matNo' and courseID='$courseID'")->rowCount();
$filesx=explode('.',$row['filename']);
$fileasp=$filesx[0];
$sn=$row['sn'];
if ($check>0){
$status='<div style="color: red">[Submitted]</div>';
$adisa='Submitted';
}else{
$status='';
$adisa='|<a href="'.'eClassSubmission.php?matNo='. $matNo .'&courseID='.$courseID.'&sn='.$sn .'&fileN='.$fileasp.'"class="btn btn-primary" >Submit Assignment</a>';
}
$course=$db->query("select * from coursepool where sn='$courseID'");
$course_fetch=$course->fetch(PDO::FETCH_BOTH);
echo $course_fetch['courseCode'].$status;?></td>
<td><?php $courseID=$row['courseID'] ;echo $course_fetch['courseTitle']?></td>
<td><?php
$staffID=$row['staffID'];
$lect=$db->query("select fullname from staff_biodata where staffID='$staffID'");
$lect_fetch=$lect->fetch(PDO::FETCH_BOTH);
echo $lect_fetch['fullname'] ;?></td>
<td><?php echo $row['timeFrom'] ;?></td>
<td><?php echo $row['timeTo'] ;?></td>
<td><a class="btn btn-danger" href="../eClass/<?php echo $filename=$row['filename'];?>">Download</a><?php echo $adisa;?></td>
</tr>
<?php
++$i;
}
?>
<?php
}else{
?>
<tr>
<td colspan="4"><?php echo "No Assignment Given Yet!";
}
?></td>
</tr>
<!-- <tr><td>--><?php //echo "n,sba"; echo $a="select * from uploading_tb where courseID in (select sn from coursepool where courseCode in (select courseCode from coursereg where matNo='$matNo') and (levelID='$levelID' or levelID='$levelID_less')) and mode=2 ";?><!--</td></tr>-->
</table>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</legend>
</fieldset>
</tr>
</form>
</td>
</div>
<div class="col-lg-1"></div>
<?php
include('footMain.php');
ob_end_flush();
?>