GOOGLE

aku nok ndi : /home/astwardha/public_html/polylibrary/librarian/
File Up :
aku nok ndi : /home/astwardha/public_html/polylibrary/librarian/one_dayBorrow_List.php

<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php include('navbar_onedayB.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">&times;</button>
                <strong><i class="icon-user icon-large"></i>&nbsp;One Day Borrow Books Table <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" action="onedayreturnbook.php">
			<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="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/> -->
					<input type="submit" name="search" value="Search"  class="btn btn-success">
					</div>
				</div>
				</div>
				<div class="span2">
				<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>
		</div>
					<div class="span3">
			<div class="control-group">
					<div class="controls">
						<?php if($_GET['flag']!='Teacher'){?>
					<a href="oneday_borrow.php" class="btn btn-info btn-xs">Back to One Day Borrow</a>
					<?php }else{ ?>
					<a href="teacher_borrow.php" class="btn btn-info btn-xs">Back to Teacher Borrow</a>
					<?php } ?>
				</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;">Status</th>
										<th style="background-color: #267516; color: white; font-size: 12px;">Borrowed Time</th>
										<th style="background-color: #267516; color: white; font-size: 12px;">Returned Time</th>
										<th style="background-color: #267516; color: white; font-size: 12px;">Status</th>
										<?php if($_GET['id']==''){?>
										<th style="background-color: #267516; color: white; font-size: 12px;">Action</th>
										<?php }else{ ?>
										<th style="background-color: #267516; color: white; font-size: 12px;">Tick Here</th>
										<?php } ?>
                                    </tr>
                                </thead>
                                <tbody>
                                  <?php  
                                  if($searchm!=""){
                                    $user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `member_id`='".$searchm."' AND `borrow_status`='borrow'");
                                  }elseif($_GET['id']!=""){
                                   $user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `member_id`='".$_GET['id']."' AND `borrow_status`='borrow'");
                                  }else{
                                  $user_query=mysql_query("SELECT * FROM `one_day_borrow` WHERE `borrow_status`='borrow'  ORDER BY 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);
									$class = mysql_query("SELECT * FROM `registration` WHERE `id`='".$row['member_id']."'");
									$selClass = mysql_fetch_array($class);
									$id=$selBook['book_id']; 
									if($selClass['designation']=="Student") {?>
									<tr>
                                    <td><?php echo $i; ?></td>
                                    <td><?php echo $selBook['acc_no']; ?></td>
                                    <td><b style="color: red;"><?php echo $selClass['name']; ?> <?php echo $selClass['lname']; ?></b></td>
                                    <td><b style="color: red;"><?php echo $selClass['class']; ?></b></td>
                                    <td><?php echo $selBook['book_title'];?></td>
                                    <td><?php echo $selBook['subject'];?></td>
                                    <td><?php echo $selBook['author'];?></td> 
                                    <td><?php echo ucfirst($row['borrow_status']);?></td> 
									<td><?php echo $row['start_date']; ?> <?php echo $row['start_time']; ?></td> 
									<td><?php echo $row['end_date']; ?> <?php echo $row['end_time']; ?></td> 
									<td><b style="color: green;"><?php if($row['borrow_status']=='borrow'){ echo "Issued for a Day"; }?></b></td>
									<td>
										<?php if($_GET['id']==''){?>
									<a href="retun_one_dayBook.php?id=<?php echo $row['book_id'];?>&&flag='Teacher'" class="btn btn-primary btn-xs" onclick="return confirm('Are you sure you want to Return Book?')">Return</a>
									<?php }else{?>
									  <input type="hidden" name="member_id" value="<?php echo $row['member_id'];?>">
                                      <input type="checkbox" name="return[]" value="<?php echo $row['book_id'];?>">
										<?php } ?>
									</td> 
                                    </tr>
									<?php } $i++;  }  ?>
                                </tbody>
                            </table>
                            <?php if($_GET['id']!=''){?>
							<input type="submit" class="btn btn-primary btn-xs" value="Return Book" onclick="return confirm('Are you sure you want to Return Book?')">
							<?php } ?>
			    </form>
			</div>		
			</div>			
			</div>
		</div>
    </div>
<?php include('footer.php') ?>

Copyright © 1945 - 2024 GOOGLE