Current File : /home/inlingua/www/sensoriumpsychologists.com/backup/admin/exam_time.php |
<?php
include_once('include/include.script.php');
include_once('include/navigation.php');
//include_once('include/left_menu.php');
include_once('../classes/config.php');
$result=$query->select('shristi_exam_type');
?>
<?php
error_reporting(0);
if(isset($_POST["order"])) {
$usersCount = count($_POST["orders"]);
for($i=0;$i<$usersCount;$i++) {
$sql="UPDATE shristi_exam_type SET time_duration='".$_POST["orders"][$i]."' ,percentage='".$_POST["percentage"][$i]."' WHERE exam_id='".$_POST["exam_id"][$i] . "'";
//echo $sql;
$result=$conn->query($sql);
}
if($result){
$message->success();
echo "<meta http-equiv=\"refresh\" content=\"1;URL=exam_time.php\">";
}
}
?>
<div id="main">
<div class="container-fluid">
<div class="page-header">
<div class="pull-left">
<h1>Exam Time duration</h1>
</div>
<div class="pull-right">
<ul class="stats">
<li class='lightred'>
<i class="icon-calendar"></i>
<div class="details">
<span class="big">February 22, 2013</span>
<span>Wednesday, 13:56</span>
</div>
</li>
</ul>
</div>
</div>
<div class="breadcrumbs">
<ul>
<li>
<a href="home.php">Home</a>
<i class="icon-angle-right"></i>
</li>
</ul>
<div class="close-bread">
<a href="#">
<i class="icon-remove"></i>
</a>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="box box-bordered">
<div class="box-title">
<h3>
<i class="icon-table"></i>
Exam Time duration set
</h3>
</div>
<form method="post">
<div class="box-content nopadding">
<table class="table table-hover table-nomargin dataTable dataTable-tools table-bordered">
<thead>
<tr>
<th class='with-checkbox'><input type="checkbox" name="check_all" id="check_all"></th>
<th>S No</th>
<th>Title</th>
<th>Time</th>
<th>Minimum passing %</th>
<th class='hidden-350'>Status</th>
</tr>
</thead>
<tbody>
<?php
$count=$result->num_rows;
for($i=0;$i<=$count;$i++){
while($row[$i] =$result->fetch_assoc()){
?>
<tr>
<td class="with-checkbox">
<input type="checkbox" name="checkbox[]" value="<?php echo $row[$i]['exam_id'];?>"> </td>
<td><?php echo ($i+1)?></td>
<td><?php echo $row[$i]['name'];?></td>
<td>
<input type="text" name="orders[]" value="<?php echo $row[$i]['time_duration'];?>" size="2"> Time in seconds
<input type="hidden" name="exam_id[]" value="<?php echo $row[$i]['exam_id'];?>">
</td>
<td>
<input type="text" name="percentage[]" value="<?php echo $row[$i]['percentage'];?>" size="2">
</td>
<td class='hidden-350'><?php
if($row[$i]['status']==1){echo "<span class='label label-satgreen'>Active</span>";}
if($row[$i]['status']==0){echo "<span class='label label-lightred'>Inactive</span>";}
?></td>
</tr>
<?php $i++;} }?>
</tbody>
</table>
</div>
<i class="icon-eye-open"> <input type="submit" name="order" value="Update Time" class="btn btn-purple" onclick="return confirm('sure to Update Exam time duration & passing percentage !');"></i>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include_once('include/footer.php');?>