Current File : /home/inlingua/public_html/sensoriumpsychologists.com/admin/fee_updation.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_account_renew');
?>
<?php
error_reporting(0);
if(isset($_POST["order"])) {
$usersCount = count($_POST["amount"]);
for($i=0;$i<$usersCount;$i++) {
$sql="UPDATE shristi_account_renew SET amount='".$_POST["amount"][$i]."' WHERE id='".$_POST["id"][$i]."'";
//echo $sql;
$result=$conn->query($sql);
}
if($result){
$message->success();
echo "<meta http-equiv=\"refresh\" content=\"1;URL=fee_updation.php\">";
}
}
?>
<div id="main">
<div class="container-fluid">
<div class="page-header">
<div class="pull-left">
<h1>Fee updation</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>
Fee updation
</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>Ammount</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]['id'];?>"> </td>
<td><?php echo ($i+1)?></td>
<td><?php echo $row[$i]['title'];?></td>
<td>
<input type="text" name="amount[]" value="<?php echo $row[$i]['amount'];?>" size="2" required>
<input type="hidden" name="id[]" value="<?php echo $row[$i]['id'];?>">
</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 !');"></i>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include_once('include/footer.php');?>