-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathborrowedbooks.php
More file actions
67 lines (63 loc) · 2.41 KB
/
borrowedbooks.php
File metadata and controls
67 lines (63 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
require 'includes/snippet.php';
require 'includes/db-inc.php';
include "includes/header.php";
include "includes/nav.php";
?>
<div class="container">
<!-- navbar ends -->
<!-- info alert -->
<div class="alert alert-warning col-lg-7 col-md-12 col-sm-12 col-xs-12 col-lg-offset-2 col-md-offset-0 col-sm-offset-1 col-xs-offset-0" style="margin-top:70px">
<span class="glyphicon glyphicon-book"></span>
<strong>Currently Issued books to students</strong>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">
<div class="row">
<a href="lendbook.php"><button class="btn btn-success col-lg-3 col-md-4 col-sm-11 col-xs-11 button" style="margin-left: 15px;margin-bottom: 5px"><span class="glyphicon glyphicon-plus-sign"></span> Lend Book</button></a>
</div>
</div>
<table class="table table-bordered">
<thead>
<tr>
<th>S.No</th>
<th>Book Id</th>
<th>Book Title</th>
<th>Issue Date</th>
<th>Student ID</th>
<th>Actions</th>
<!-- <th>Actions</th> -->
</tr>
</thead>
<?php
// $sql = "SELECT * FROM borrow";
$sql = "SELECT borrow.borrowDate, borrow.studentId,
books.bookId ,books.bookTitle FROM borrow
LEFT JOIN books ON borrow.bookId = books.bookId";
$query = mysqli_query($conn, $sql);
$counter =1;
while($row = mysqli_fetch_array($query)){
?>
<tbody>
<tr>
<td><?php echo $counter++; ?></td>
<td><?php echo $row['bookId'];?></td>
<td><?php echo $row['bookTitle'];?></td>
<td><?php echo $row['borrowDate']; ?></td>
<td><?php echo $row['studentId']; ?></td>
<td>
<a href="delete_query.php?bookId=<?php echo $row['bookId']?>"> <button class="btn btn-info" data-toggle="modal" >Return</button></a>
</td>
<!-- <td><a href="lendbook.php"> <button class="btn btn-success ">Lend Now</button></a></td> -->
</tr>
</tbody>
<?php }
?>
</table>
<br>
</div>
</div>
<?php include 'includes/footer.php'; ?>