GOOGLE
<?php include('header.php'); date_default_timezone_set('Asia/Calcutta'); ?>
<?php include('session.php'); ?>
<?php include('navbar_borrow.php'); ?>
<div class="container">
<div class="margin-top">
<div class="row">
<div class="span12">
<div class="alert alert-info"><strong>Willing Books List</strong></div>
<table cellpadding="0" cellspacing="0" border="1" class="table" id="example">
<div class="pull-right">
<a href="" onclick="window.print()" class="btn btn-info"><i class="icon-print icon-large"></i> Print</a>
</div>
<thead>
<tr>
<th style="background-color: purple; color: white; font-size: 11px;">Sr.No.</th>
<th style="background-color: purple; color: white; font-size: 11px;">Borrower Name</th>
<th style="background-color: purple; color: white; font-size: 11px;">Class</th>
<th style="background-color: purple; color: white; font-size: 11px;">Acc.No.</th>
<th style="background-color: purple; color: white; font-size: 11px;">Book title</th>
<th style="background-color: purple; color: white; font-size: 11px;">Subject</th>
<th style="background-color: purple; color: white; font-size: 11px;">Borrowed on</th>
<th style="background-color: purple; color: white; font-size: 11px;">Due on</th>
<th style="background-color: purple; color: white; font-size: 11px;" width="120">Willing to Return Request</th>
<th style="background-color: purple; color: white; font-size: 11px;">Over Due</th>
<th style="background-color: purple; color: white; font-size: 11px;">Image</th>
<th style="background-color: purple; color: white; font-size: 11px;">Action</th>
</tr>
</thead>
<tbody>
<?php $user_query=mysql_query("SELECT * FROM `borrowdetails` WHERE borrow_status = 'willing'")or die(mysql_error());
$i=1;
while($row=mysql_fetch_array($user_query)){
$borrowdetails = mysql_query("SELECT * FROM `book` WHERE `book_id`='".$row['book_id']."'");
$selborrowdetails = mysql_fetch_array($borrowdetails);
/*$borrow = mysql_query("SELECT * FROM `borrow` WHERE `member_id`='".$selborrowdetails['member_id']."'");
$borrow1 = mysql_fetch_array($borrow);*/
$reg = mysql_query("SELECT * FROM `registration` WHERE `id`='".$selborrowdetails['member_id']."'");
$selreg = mysql_fetch_array($reg);
?>
<tr>
<td><?php echo $i; ?></td>
<td><b style="color: red;"><?php echo $selreg['name']." ".$selreg['lname']; ?></b></td>
<td><b style="color: red;"><?php echo $selreg['class']; ?></b></td>
<td><?php echo $selborrowdetails['acc_no']; ?></td>
<td><?php echo $selborrowdetails['book_title']; ?></td>
<td><?php echo $selborrowdetails['subject']; ?></td>
<td><?php echo date("d-m-Y",strtotime($row['date_borrow'])); ?></td>
<td><?php echo date("d-m-Y",strtotime($row['due_date'])); ?> </td>
<td style="color: red;"><?php echo date("d-m-Y H:i:s",strtotime($selborrowdetails['willing'])); ?> </td>
<td> <?php $startTimeStamp = strtotime($row['due_date']);
$dates = date("Y-m-d");
$endTimeStamp = strtotime($dates);
$timeDiff = abs($endTimeStamp - $startTimeStamp);
$numberDays = $timeDiff/86400;
$numberDaysss = intval($numberDays); // 86400 seconds in one day
if($row['due_date']<=$dates){
// and you might want to convert to integer
echo $numberDays = intval($numberDays)*10; echo "Rs.";
}else{
echo '0';
}?></td>
<td><img src="../<?php echo $selreg['image'];?>" width='100'></td>
<td>
<?php if($row['due_date']<$dates){?>
<a rel="tooltip" title="Return" onclick="return confirm('Are you sure you want Pay and Return Book?')" href="due_date_list.php?id=<?php echo $row['book_id'];?>&&member_id=<?php echo $selreg['id'];?>" class="btn btn-success btn-xs">Pay Penalty</a>
<?php }else{ ?>
<a rel="tooltip" title="Return" onclick="return confirm('Are you sure you want to Return Book?')" href="return_save_willing.php?id=<?php echo $row['book_id'];?>" class="btn btn-primary btn-xs">Return</a>
<?php } ?>
</td>
</tr>
<?php $i++;} ?>
</tbody>
</table>
</div>
<script>
$(".uniform_on").change(function(){
var max= 3;
if( $(".uniform_on:checked").length == max ){
$(".uniform_on").attr('disabled', 'disabled');
alert('3 Books are allowed per borrow');
$(".uniform_on:checked").removeAttr('disabled');
}else{
$(".uniform_on").removeAttr('disabled');
}
})
</script>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -