| Current Path : /home/bolconlineco/public_html/aaaaaa/coordinator/ |
| Current File : //home/bolconlineco/public_html/aaaaaa/coordinator/report_final_old.php |
<?php
ob_start();
session_start();
?>
<?php include('includes/header.php'); ?>
<?php
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
?>
<?php
if(isset($_GET['statuschange']))
{
$Update_View = "Update submitted_final_assignment SET viewed = 1 WHERE Sfaid = '".$_GET['statuschange']."' ";
mysql_query($Update_View);
header("location:report_final.php");
}
if(isset($_GET['statusundo']))
{
echo $Update_View = "Update submitted_final_assignment SET viewed = 0 WHERE Sfaid = '".$_GET['statusundo']."' ";
mysql_query($Update_View);
header("location:report_final.php");
}
?>
<script language="javascript" src="includes/jquery.js"></script>
<div id="content">
<div id="frm" style="width:800px">
<table border="1" cellspacing="5" >
<thead>
<tr style="color:#FFFFFF">
<th bgcolor="#000000" width="10px">Sr</th>
<th bgcolor="#000000" width="690px">Report</th>
<th bgcolor="#000000" width="100px">Date</th>
<th bgcolor="#000000" width="100px">Status</th>
</tr>
</thead>
<tbody>
<?php
$countThis = 1;
$selectMynew = "SELECT * FROM submitted_final_assignment ORDER BY Sfaid desc";
$selectMynew2 = mysql_query($selectMynew) or die(mysql_error());
while($selectMynew3 = mysql_fetch_array($selectMynew2)){
?>
<?php if($selectMynew3['viewed'] == 0){ ?>
<tr style=" background-color:#C3FDB8; font-size:16px;">
<? } else{ ?>
<tr style=" background-color:#CCCCCC; font-size:16px;">
<? } ?>
<td width="10px" align="center"><?php echo $countThis; ?></td>
<td width="690px" align="center"><?php
$selectStudentName = "SELECT CONCAT(fname,\" \",lname) AS fullname FROM student WHERE rollno = '".$selectMynew3['StudentId']."'";
$selectStudentName2 = mysql_query($selectStudentName) or die(mysql_error());
$selectStudentName3 = mysql_fetch_array($selectStudentName2);
$selectCourseName = "SELECT courseName FROM course WHERE courseID = '".$selectMynew3['CourseId']."' " ;
$selectCourseName2 = mysql_query($selectCourseName) or die(mysql_error());
$selectCourseName3 = mysql_fetch_array($selectCourseName2);
echo $selectStudentName3['fullname'] . " Submitted Final Assignment on " . $selectCourseName3[0];
// echo;
?></td>
<td width="100px" align="center"><?php echo $selectMynew3['date']; ?></td>
<td width="100px" align="center"> <?php if($selectMynew3['viewed'] == 0){ ?><a href="report_final.php?statuschange=<?php echo $selectMynew3['Sfaid'] ?>" style="text-decoration:none; font-size:12px;">Mark as Viewed</a><? } else{ ?> viewed <a href="report_final.php?statusundo=<?php echo $selectMynew3['Sfaid'] ?>" style="text-decoration:none; font-size:12px;">(undo)</a> <? } ?></td>
</tr>
<? $countThis++;} ?>
</tbody>
</table>
</div>
</div> <!-- end content -->
</div><!-- end wrapper -->
<?php include('../includes/footer.php');?>