-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathissued-books.php
106 lines (95 loc) · 4.47 KB
/
issued-books.php
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
session_start();
include('includes/connect.php');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
?>
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>Online Library Management System | Manage Issued Books</title>
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<link href="assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
<link href="assets/css/style.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<?php include('includes/header.php');?>
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">Manage Issued Books</h4>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
Issued Books
</div>
<div class="panel-body">
<div >
<table class="table table-striped table-bordered table-hover" >
<thead>
<tr>
<th>#</th>
<th>Book Name</th>
<th>ISBN </th>
<th>Issued Date</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$sid = $_SESSION['stdid'];
$sql = "SELECT tblbooks.BookName,tblbooks.ISBNNumber,tblissuedbookdetails.IssuesDate,tblissuedbookdetails.ReturnStatus,tblissuedbookdetails.id as rid from tblissuedbookdetails join tblbooks on tblbooks.ISBNNumber=tblissuedbookdetails.BookId WHERE tblissuedbookdetails.StudentId = '$sid'";
$query = mysqli_query($connect,$sql);
$cnt=1;
if(mysqli_num_rows($query) > 0)
{
while($result = mysqli_fetch_assoc($query))
{ ?>
<tr class="odd gradeX">
<td class="center"><?php echo htmlentities($cnt);?></td>
<td class="center"><?php echo htmlentities($result['BookName']);?></td>
<td class="center"><?php echo htmlentities($result['ISBNNumber']);?></td>
<td class="center"><?php echo htmlentities($result['IssuesDate']);?></td>
<td class="center"><?php if($result['ReturnStatus']==0){?>
<span>
Not Yet Return!
</span>
<?php }
else
{
?>
<span>
Book Returned
</span>
<?php
}?>
</td>
</tr>
<?php $cnt=$cnt+1;}} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/dataTables/jquery.dataTables.js"></script>
<script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>