GOOGLE
<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php include('navbar_borrow.php');
date_default_timezone_set('Asia/Kolkata');
$currentDate = date('d-m-Y');?>
<div class="container">
<?php $name = mysql_query("SELECT * FROM `registration` WHERE `id`='".$_SESSION['user_id']."'");
$selName = mysql_fetch_array($name);?>
<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> Teacher Borrow Table <span style="color: white; float: right;"> WELCOME : <?php echo $selName['name'];?> <?php echo $selName['lname'];?></span></strong>
</div>
<div class="span12">
<form method="post" action="onedayborrow_save.php?flag=Teacher">
<div class="span3">
<div class="control-group">
<label class="control-label" for="inputEmail">Borrower Name</label>
<div class="controls">
<select name="member_id" class="chzn-select" required/>
<option>Select Teacher Name Here</option>
<?php $result = mysql_query("SELECT * FROM `registration` WHERE `designation`='Teacher'")or die(mysql_error());
while ($row=mysql_fetch_array($result)){ ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['name']." ".$row['lname']; ?> (<?php echo $row['class']; ?>)</option>
<?php } ?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><b style="color: red;">Due Date</b></label>
<div class="controls">
<?php echo $currentDate; ?> <?php echo "Time: 17:59";?>
</div>
</div>
<div class="control-group">
<div class="controls">
<button name="delete_student" class="btn btn-success"><i class="icon-plus-sign icon-large"></i> Borrow</button>
</div>
</div>
<div class="control-group">
<div class="controls">
<a href="one_dayBorrow_List.php" class="btn btn-primary btn-xs">View List Name Wise</a>
</div>
</div>
<hr/>
<script>
$(document).ready(function() {
$('#example1').dataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"bAutoWidth": false });
});
</script>
<div class="control-group">
<div class="controls">
<table cellpadding="0" cellspacing="0" border="1" class="table" id="example1">
<thead>
<tr>
<th style="background-color: #267516; font-size: 11px; color: white;">Name</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Designation</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Borrow Book</th>
<th style="background-color: #267516; font-size: 11px; color: white;">view</th>
</tr>
</thead>
<tbody>
<?php $borrowBooks=mysql_query("SELECT DISTINCT `member_id` FROM `one_day_borrow` WHERE `borrow_status`='borrow'")or die(mysql_error());
while($borrowBookss=mysql_fetch_array($borrowBooks)){
$selRegs = mysql_query("SELECT * FROM `registration` WHERE `id`='".$borrowBookss['member_id']."'");
$memberSel = mysql_fetch_array($selRegs);
$countBook = mysql_query("SELECT * FROM `one_day_borrow` WHERE `member_id`='".$memberSel['id']."' AND `borrow_status`='borrow'");
$count = mysql_num_rows($countBook);
if($memberSel['designation']=='Teacher'){?>
<tr>
<td><?php echo $memberSel['name']; ?> <?php echo $memberSel['lname']; ?></td>
<td><?php echo $memberSel['designation']; ?></td>
<td><?php echo $count; ?></td>
<td><a href="one_dayBorrow_List.php?id=<?php echo $memberSel['id']; ?>&&flag=Teacher">View</a>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="span8">
<div class="alert alert-success"><strong>Select Book</strong></div>
<table cellpadding="0" cellspacing="0" border="1" class="table" id="example">
<thead>
<tr>
<th style="background-color: #267516; font-size: 11px; color: white;">Add</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Acc No.</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Book title</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Subject</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Author</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Pulication Year</th>
<th style="background-color: #267516; font-size: 11px; color: white;">Book Type</th>
</tr>
</thead>
<tbody>
<?php $user_query=mysql_query("select * from book where book_status='returned'")or die(mysql_error());
$i=1;
while($row=mysql_fetch_array($user_query)){
$id=$row['book_id'];
$cat_id=$row['category_id'];
?>
<tr>
<td>
<input id="" class="uniform_on" name="selector[]" type="checkbox" value="<?php echo $id; ?>" >
</td>
<td><?php echo $row['acc_no']; ?></td>
<td><?php echo $row['book_title']; ?></td>
<td><?php echo $row ['subject']; ?> </td>
<td><?php echo $row['author']; ?> </td>
<td><?php echo $row['publication_date']; ?></td>
<td width=""><?php echo $row['book_type']; ?></td>
</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');
$(".uniform_on:checked").removeAttr('disabled');
}else{
$(".uniform_on").removeAttr('disabled');
}
})
</script>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -