Viewing file: view_exam.php (9.85 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
include('includes/header.php');
?>
<?php
// Storing session data
$_SESSION["role"];
if(!isset($_SESSION["role"]))
{
header("location:admin_login.php");
?>
<script type="text/javascript">
window.location.href = "admin_login.php";
</script>
<?php
}
else
{
?>
<style>
.inner-block {
padding: 3em 2em 4em 2em;
}
</style>
<style>
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
</style>
<div class="page-container">
<div class="left-content">
<div class="mother-grid-inner">
<!--header start here-->
<div class="header-main" style="min-height: 80px;">
<div class="header-left">
<div class="logo-name">
<a href="admin_index.php"> <h3>SICS ADMIN</h3>
</br>
</a>
</div>
<div class="clearfix"> </div>
</div>
<!--notification menu end -->
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span class="prfil-img"><img src="images/p1.png" alt=""> </span>
<div class="user-name">
<p>Srishti Innovative</p>
<span><?php echo $_SESSION["name"];?></span>
</div>
<i class="fa fa-angle-down lnr"></i>
<i class="fa fa-angle-up lnr"></i>
<div class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">
<!-- <li> <a href="#"><i class="fa fa-cog"></i> Settings</a> </li>
<li> <a href="#"><i class="fa fa-user"></i> Profile</a> </li> -->
<li> <a href="logout.php"><i class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
</ul>
</div>
</div>
<div class="inner-block">
<h3 style="text-align: left;color: #337ab7;margin-bottom: 1%;">View Sheduled Exam</h3>
<div class="row" style="margin-top:30px;margin-left:5px;">
<form class="forms-sample" id="add_assign" action="view_exam.php" method="post">
<div class="txt-field">
<?php
$query1 = "select * from technologies order by id desc";
$result1 = $con->query($query1);
?>
<label>Technology</label>
<select id="technology" name="technology" required style="width:25%;">
<option value="">------------Select------------</option>
<?php
while ($row1 = $result1->fetch_assoc()) {
?>
<option value="<?php echo $row1["id"]; ?>"><?php echo $row1["name"]; ?></option>
<?php
}
?>
</select>
<label>Package</label>
<select id="semester" placeholder="Package" name="semester" required="">
<option value="">------------Select------------</option>
</select>
<input type="submit" class="logins" name="submit" value="Submit">
</div>
</form>
</div>
</div>
</div>
<!--heder end here-->
<!-- script-for sticky-nav -->
<div class="inner-block" style="padding: 0em 2em 4em 2em;">
<!-- <h3 style="text-align: left;color: #337ab7;margin-bottom: 1%;">Available Syllabus</h3> -->
<?php
$i=1;
$semester=$_POST['semester'];
$technology=$_POST['technology'];
$query= "SELECT *
FROM exam where semester='$semester' and batch_id='$technology' and type='1' ";
$res=$con->query($query);
$count=$res->num_rows;
?>
<table id="technologies" class="table table-striped table-bordered table-condensed">
<?php
if($count>0){
echo " <thead style='background: #7ab9f3;'>
<tr>
<th> Sl no </th>
<th>Package</th>
<th>Exam Title</th>
<th>Exam Date</th>
<th>Action</th>
<th>Guest Status</th>
<th>Student Status</th>
</tr>
</thead>";
while($row=$res->fetch_assoc()){
?>
<tbody>
<tr>
<td><?php echo $i++;?> </td>
<td>
<?php echo $row['semester'];?>
</td>
<td>
<?php echo $row['exam_title'];?>
</td>
<td>
<?php echo $row['exam_date'];?>
</td>
<td><a href="delete_exam_date.php?id=<?php echo $row['exam_id'];?>"><i class="fa fa-trash-o" style="font-size:20px;color:red"></i></a>
</td>
<td>
<?php
if($row['g_status']==0){
echo ' <a href="check_status.php?id='.$row['exam_id'].'&switchStatus=1" id="" class="delete" title="Delete" style="color:red;">Not active</a>';
}
else if($row['g_status']==1){
echo ' <a href="check_status.php?id='.$row['exam_id'].'&switchStatus=0" id="" class="delete" title="Delete" style="color:red;">Active</a>';
}
?>
</td>
<td>
<?php
if($row['stu_status']==0){
echo ' <a href="check_stud_status.php?id='.$row['exam_id'].'&switchStatus=1" id="" class="delete" title="Delete" style="color:red;">Not active</a>';
}
else if($row['stu_status']==1){
echo ' <a href="check_stud_status.php?id='.$row['exam_id'].'&switchStatus=0" id="" class="delete" title="Delete" style="color:red;">Active</a>';
}
?>
</td>
</tr>
</tbody>
<?php
}}?>
</table>
</div>
</div>
</div>
<!--slider menu-->
<?php include('includes/sidebar.php'); ?>
<!--slide bar menu end here-->
<?php include('includes/footer.php'); ?>
<script type="text/javascript">
$(document).ready(function(){
$('#technology').on('change', function(){
// alert('hai');
var technology = $(this).val();
if(technology){
$.ajax({
type:'POST',
url:'ajaxPackage.php',
data:'technology='+technology,
success:function(html){
$('#semester').html(html);
}
});
}else{
$('#semester').html('<option value="">Select </option>');
}
});
$('#semester').on('change', function(){
// alert('hai');
var semester = $(this).val();
// alert(countryID);
if(semester){
$.ajax({
type:'POST',
url:'ajaxSyllabus.php',
data:'semester='+semester,
success:function(html){
$('#subject').html(html);
}
});
}else{
$('#subject').html('<option value="">Select Subject</option>');
}
});
$('#technologies').DataTable();
});
</script>
<?php
}
?>
|