GOOGLE
<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php include('navbar_history.php'); ?>
<div class="container">
<div class="margin-top">
<div class="row">
<div class="span12">
<?php $username=mysql_query("select * from `registration` where `id`='".$_SESSION['user_id']."'")or die(mysql_error());
$seluser=mysql_fetch_array($username); ?>
<div class="alert alert-info"><strong> Books History</strong><b><span style="float: right;">WELCOME : <?php echo $seluser['name'];?> <?php echo $seluser['lname'];?></span></b></div>
<ul class="nav nav-pills">
<li class="active"> <a href="history.php">All History</a></li>
<li> </li>
<li><a href="return.php">Returned Book</a></li>
<li><a href="request.php">Request for Book</a></li>
<li> </li>
<li><a href="view_borrow.php">View Borrowed Book</a></li>
<li> </li>
<li><a href="books.php" class="btn btn-info btn-xs">Back to Available book list</a></li>
</ul>
<!-- -->
<center class="title">
<h1>Books List</h1>
</center>
<div style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="table table-bordered" id="example">
<thead>
<tr>
<th style="background-color: #0088CC; color: white; font-size: 12px;">Acc No.</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Book Title</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Subject</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Author</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Request Sent on</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Borrowed on</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Request Sent for Return on</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Returned on</th>
<th style="background-color: #0088CC; color: white;font-size: 12px;">Status</th>
</tr>
</thead>
<tbody>
<?php $user_query=mysql_query("select * from `borrowdetails` where `member_id` ='".$_SESSION['user_id']."' ORDER BY borrow_details_id DESC");
$i=1;
while($row=mysql_fetch_array($user_query)){
$book = mysql_query("SELECT * FROM `book` WHERE `book_id`='".$row['book_id']."'");
$selBook = mysql_fetch_array($book);
$id=$row['book_id'];
$cat_id=$row['category_id'];
$cat_query = mysql_query("select * from category where category_id = '$cat_id'")or die(mysql_error());
$cat_row = mysql_fetch_array($cat_query);
$borrow = mysql_query("select * from borrow where borrow_id = '".$row['borrow_id']."'")or die(mysql_error());
$borrow_row = mysql_fetch_array($borrow);
?>
<tr>
<td><?php echo $selBook['acc_no']; ?></td>
<td><?php echo $selBook['book_title']; ?></td>
<td><?php echo $selBook['subject']; ?> </td>
<td><?php echo $selBook['author']; ?> </td>
<td><?php echo $row['request_date']; ?></td>
<td><?php echo $row['date_borrow']; ?></td>
<td><?php echo $row['willing']; ?></td>
<td><?php echo $row['date_return']; ?></td>
<td><b><?php if($row['borrow_status']=="Send Request"){ echo "Request Sent for Borrow";}elseif($row['borrow_status']=="borrow"){ echo "Borrowed"; }elseif($row['borrow_status']=="willing"){ echo "Willing to return"; }else{ echo $row['borrow_status'];}?></b></td>
</tr>
<?php $i++;} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -