GOOGLE
<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php include('onenavbar_history.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">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><i class="icon-user icon-large"></i> One Day Book History <span style="color: white; float: right;"> WELCOME : <?php echo $selName['name'];?> <?php echo $selName['lname'];?></span></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; font-size: 12px;">Sr. No.</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Acc No.</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Borrower Name</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Class</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Book title</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Subject</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Author</th>
<th style="background-color: #267516; color: white; font-size: 12px;">Book Status</th>
</tr>
</thead>
<tbody>
<?php
if($searchm!=""){
$user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `member_id`='".$searchm."'")or die(mysql_error());
}else{
$user_query=mysql_query("SELECT * FROM `one_day_borrow` ORDER BY id DESC")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'];
$reg = mysql_query("SELECT * FROM `registration` WHERE `id`='".$row['member_id']."'");
$selreg = mysql_fetch_array($reg);
?>
<tr class="del<?php echo $id ?>">
<td><?php echo $i; ?></td>
<td><?php echo $selBook['acc_no']; ?></td>
<td><?php echo $selreg['name']; ?> <?php echo $selreg['lname']; ?></td>
<td><?php echo $selreg['class']; ?></td>
<td><?php echo $selBook['book_title']; ?></td>
<td><?php echo $selBook['subject']; ?></td>
<td><?php echo $selBook['author']; ?> </td>
<td>
<?php if($row['borrow_status']=="Send Request"){ ?>
<span style="color: green;"><b><?php echo $row['borrow_status'];?></b></span>
<?php }elseif($row['borrow_status']=="returned"){ ?>
<span style="color: red;"><b><?php echo $row['borrow_status'];?></b></span>
<?php }elseif($row['borrow_status']=="willing"){ ?>
<span style="color: purple;"><b ><?php echo $row['borrow_status'];}elseif($row['borrow_status']=="borrow"){ ?></b><b style="color: green;"> <?php echo "Borrowed";?></b></span>
<?php } ?>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</form>
</div>
</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 -