| Current Path : /home/bolconlineco/public_html/aaaaaa/demo/admin/ |
| Current File : /home/bolconlineco/public_html/aaaaaa/demo/admin/topicass.php |
<?php
ob_start();
session_start();
include('../includes/header.php');
if(!isset($_SESSION['adminname']) || $_SESSION['adminrole'] != 1)
{
header("location:../index.php");
exit();
}
if(isset($_GET['courseId']) && isset($_GET['topicId']) && isset($_GET['catId'])) {
$catId=sql_strip($_GET['catId']);
$courseId = sql_strip($_GET['courseId']);
$topicId = sql_strip($_GET['topicId']);
} ?>
<h3 class="page-title">Add Assignments </h3>
<ul class="page-breadcrumb breadcrumb">
<li> <i class="fa fa-home"></i> <a href="dashbord.php"> Home </a> <i class="fa fa-angle-right"></i> </li>
<li> <a href="category.php"> Categories </a> <i class="fa fa-angle-right"></i></li>
<li> <a href="course.php?cat_id=<?php echo $catId; ?> "> Courses </a> <i class="fa fa-angle-right"></i></li>
<li> <a href="topic.php?cat_id=<?php echo $catId ; ?>&courseId=<?php echo $courseId; ?>"> Topics </a> <i class="fa fa-angle-right"></i></li>
<li class="active">Assignments</li>
</ul>
<?php
if(isset($_GET['msg'])) {
echo "<div class='alert alert-success'>".$_GET['msg']."</div>";
}
if(isset($_GET['er'])){
echo "<div class='alert alert-success'>".$_GET['er']."</div>";
} ?>
<form id="ID" action="topicasscode.php" method="post" enctype="multipart/form-data" autocomplete="off" class="form-horizental">
<div class="form-group clearfix">
<label for="assigname" class="col-sm-2 control-label"> Name : </label>
<div class="col-sm-6">
<input class="validate[required] form-control" type="text" name="assigname" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="assigment" class="col-sm-2 control-label"> Assignment : </label>
<div class="col-sm-6">
<input class="validate[required] form-control" type="file" name="assigment" value="" />
</div>
</div>
<div class="form-group clearfix">
<div class="col-sm-6 col-sm-offset-2">
<input type="hidden" name="catId" value="<?php echo $catId; ?>" />
<input type="hidden" name="courseId" value="<?php echo $courseId; ?>" />
<input type="hidden" name="topicId" value="<?php echo $topicId; ?>" />
<input class="add2 btn btn-success" type="submit" name="submit" value="Add" />
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-md-12">
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption"> <i class="fa fa-globe"></i>Assignments Managements</div>
</div>
<div class="portlet-body">
<?php
$result=assignment_by_topic_id($topicId);
if(mysql_num_rows($result) > 0 )
{
?>
<table class="tablestyle table table-striped table-bordered table-hover" id="sample_2">
<thead>
<tr>
<th> Name</th>
<th> View Assignment</th>
<th>Action</th>
</tr><!-- end title -->
</thead>
<tbody>
<?php
$result=assignment_by_topic_id($topicId);
while($rowSet=mysql_fetch_array($result)) { ?>
<tr>
<td><?php echo $rowSet['name'];?></td>
<td><a href="../Assignment/<?php echo $rowSet['path'];?>">View Assignment</a></td>
<td>
<a href="delete_assignment.php?catId=<?php echo $catId ;?>&topicId=<?php echo $topicId; ?> & courseId=<?php echo $courseId; ?>&topicass=<?php echo $rowSet['tAId']?>" onclick='return confirm("Are you Sure to delete ?") ' ;> <img src="../images/delete-icon.png" alt="Delete" /> </a>
</td>
</tr><!-- end values -->
<?php
}
} else {
echo "No Assignments inserted for this topic";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div><!-- end data -->
</div> <!-- end content -->
</div><!-- end wrapper -->
<?php include('../includes/footer.php');?>