-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
64 lines (58 loc) · 1.8 KB
/
index.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
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/includes/header.html');
?>
<div style="height: 200px;">
<br>
<h1>Welcome to portal</h1>
</div>
<div class="container" style="height: 50vh;">
<div class="row">
<div class="col-lg-4">
<a href="/" class="btn btn-default">
<button class="btn-block btn btn-basic">
Books inventory
</button>
</a><br>
<a href="/issued/" class="btn btn-default">
<button class="btn-block btn btn-basic">
issued books
</button>
</a><br>
<a href="/return/" class="btn btn-default">
<button class="btn-block btn btn-basic">
Books not returned
</button>
</a>
</div>
<div class="col-lg-8">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Name</th>
<th>book Id</th>
<th>stock</th>
</tr>
</thead>
<tbody>
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/require.php');
$get_books = mysqli_query($connection, "SELECT * from books ORDER by stock");
while ($row = mysqli_fetch_assoc($get_books)){
echo '
<tr>
<td>'.$row['id'].'</td>
<td>'.$row['book_name'].'</td>
<td>'.$row['b_id'].'</td>
<td>'.$row['stock'].'</td>
</tr>
';
}
?>
</tbody></table>
</div>
</div>
</div>
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/includes/footer.html');
?>