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">
<?php $name = mysql_query("SELECT * FROM `registration` WHERE `id`='".$_SESSION['user_id']."'");
$selName = mysql_fetch_array($name);?>
<div class="row">
<div class="alert alert-info"><strong>Borrowed Books List <span style="color: white; float: right;"> WELCOME : <?php echo $selName['name'];?> <?php echo $selName['lname'];?></span></strong></div>
<ul class="nav nav-pills">
<li><a href="books.php">All Books List</a></li>
<li><a href="view_borrow.php">View Borrowed Books List</a></li>
<li><a href="due_date_list.php">Over Due List</a></li>
<li><a href="return_book_list.php">Returned Book List</a></li>
<li class="active"><a href="penalty.php">All Due / Paid Penalty</a></li>
</ul>
<form method="post">
<div class="span2"><label class="control-label" for="inputEmail"><b>Search Borrower Name</b></label>
</div>
<?php if(isset($_POST['search'])){
extract($_POST);
$search = $_POST['searchmember'];
}
?>
<div class="span3">
<form name="myform" method="POST">
<div class="control-group">
<div class="controls">
<select name="searchmember" class="chzn-select" required/>
<option value="">Select Name Here</option>
<?php $result = mysql_query("SELECT * FROM `registration` ORDER BY `name` ASC")or die(mysql_error());
while ($row=mysql_fetch_array($result)){ ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['name']." ".$row['lname']; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="span1">
<div class="control-group">
<label class="control-label" for="inputEmail"></label>
<div class="controls">
<!-- <input type="text" class="w8em format-d-m-y highlight-days-67 range-low-today" name="due_date" id="sd" maxlength="10" style="border: 3px double #CCCCCC;" required/> -->
<input type="submit" name="search" value="Search" class="btn btn-success">
</div>
</div>
</div>
</form>
<?php if(isset($_POST['accsearch'])){
$accNo = $_POST['accno'];
}?>
<form name="" method="POST">
<div class="span3">
<div class="control-group">
<div class="controls">
<select name="accno" class="chzn-select" required/>
<option>Select Class Here</option>
<?php $result = mysql_query("SELECT DISTINCT `class` FROM `registration` ORDER BY `class` ASC WHERE `class`!=''");
while ($row=mysql_fetch_array($result)){ ?>
<option value="<?php echo $row['class']; ?>"><?php echo $row['class']; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="span1">
<div class="control-group">
<label class="control-label" for="inputEmail"></label>
<div class="controls">
<input type="submit" name="accsearch" value="Search" class="btn btn-warning">
</div>
</div>
</div>
</form>
<div class="span2">
<div class="control-group">
<label class="control-label" for="inputEmail"></label>
<div class="controls">
<!-- <input type="text" class="w8em format-d-m-y highlight-days-67 range-low-today" name="due_date" id="sd" maxlength="10" style="border: 3px double #CCCCCC;" required/> -->
<a href="request_book.php" class="btn btn-info">Back to Request</a>
</div>
</div>
</div>
</form>
<div class="span12">
<table cellpadding="0" cellspacing="0" border="1" class="table" id="example">
<thead>
<tr>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Sr. No.</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Borrower Name</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Class</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Acc. No.</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Book title</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Borrowed On</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Due On</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Returned On</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Days</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Penalty</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Book Status</th>
<th style="background-color: #4267B2; color: white; font-size: 11px;">Image</th>
</tr>
</thead>
<tbody>
<?php
$user_query=mysql_query("SELECT DISTINCT `member_id` FROM `transaction`")or die(mysql_error());
$i=1;
while($row=mysql_fetch_array($user_query)){
$BookId=mysql_query("SELECT * FROM `transaction` WHERE `member_id`='".$row['member_id']."'")or die(mysql_error());
$BookIdSel = mysql_fetch_array($BookId);
$borrowdetails = mysql_query("SELECT * FROM `book` WHERE `book_id`='".$BookIdSel['book_id']."'");
$book_id = mysql_fetch_array($borrowdetails);
$borrowdetailsq = mysql_query("SELECT * FROM `borrowdetails` WHERE `book_id`='".$BookIdSel['book_id']."'");
$borrowdetailswe = mysql_fetch_array($borrowdetailsq);
$reg = mysql_query("SELECT * FROM `registration` WHERE `id`='".$BookIdSel['member_id']."'");
$selreg = mysql_fetch_array($reg);
$sum = "SELECT SUM(penalty) FROM `transaction` WHERE `member_id`='".$BookIdSel['member_id']."'";
$selSum = mysql_fetch_array($sum);
?>
<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 $book_id['acc_no']; ?></td>
<td><?php echo $book_id['book_title']; ?></td>
<td><?php echo date("d-m-Y",strtotime($borrowdetailswe['date_borrow'])); ?></td>
<td><?php echo date("d-m-Y",strtotime($borrowdetailswe['due_date'])); ?></td>
<td><?php echo date("d-m-Y",strtotime($borrowdetailswe['date_return'])); ?></td>
<td><?php echo $BookIdSel['overdue'];?> </td>
<td><?php echo $BookIdSel['penalty']; ?> </td>
<td><b style="color: green;"><?php echo ucfirst($borrowdetailswe['borrow_status']); ?></b></td>
<td><img src="../<?php echo $selreg['image'];?>" width="70" height="70"></td>
</tr>
<?php $i++;} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -