GOOGLE
<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php include('navbar_oneday.php'); ?>
<div class="container">
<div class="margin-top">
<div class="row">
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><i class="icon-user icon-large"></i> One Day Borrow Books Table</strong>
</div>
<?php if(isset($_POST['search'])){
extract($_POST);
$searchm = $_POST['searchmember'];
}
?>
<form method="post">
<div class="span2"><label class="control-label" for="inputEmail"><b>Search Borrower Name</b></label>
</div>
<div class="span3">
<div class="control-group">
<div class="controls">
<select name="searchmember" class="chzn-select" required/>
<option>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="span3">
<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>
<div class="span12">
<table cellpadding="0" cellspacing="0" border="1" class="table" id="example" >
<thead>
<tr>
<th style="background-color: #267516; color: white;">Sr. No.</th>
<th style="background-color: #267516; color: white;">Acc No.</th>
<th style="background-color: #267516; color: white;">Book title</th>
<th style="background-color: #267516; color: white;">Author</th>
<th style="background-color: #267516; color: white;">Publisher name</th>
<th style="background-color: #267516; color: white;">Borrow Time</th>
<th style="background-color: #267516; color: white;">Return Time</th>
<th style="background-color: #267516; color: white;">Status</th>
<th style="background-color: #267516; color: white;">Return</th>
</tr>
</thead>
<tbody>
<?php
if($searchm!=""){
$user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `member_id`='".$searchm."' AND `borrow_status`='pending' order By `borrow_status`='returned'")or die(mysql_error());
}else{
$user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `borrow_status`='pending'")or die(mysql_error());
}
$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=$selBook['book_id'];
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $selBook['acc_no']; ?></td>
<td><?php echo $selBook['book_title']; ?></td>
<td><?php echo $selBook['author']; ?> </td>
<td><?php echo $selBook['publisher_name']; ?></td>
<td><?php echo $row['start_time']; ?></td>
<td><?php echo $row['end_time']; ?></td>
<td><?php echo $row['borrow_status']; ?></td>
<td>
<?php if($row['borrow_status']=='pending'){?>
<a href="retun_one_day.php?id=<?php echo $row['book_id'];?>" class="btn btn-primary btn-xs" onclick="return confirm('Are you sure you want to Return Book?')">Return</a>
<?php }else{ ?>
Return Done
<?php } ?>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -