forked from vikassinghv34/Book_publish_Management_System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdminManageBook.php
137 lines (116 loc) · 4.33 KB
/
AdminManageBook.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php // include('admin.php'); ?>
<?php
// include('header.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Dashboard</title>
<!-- Bootstrap CSS CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> -->
<!-- Our Custom CSS -->
<link rel="stylesheet" href="style.css">
</head>
<div class="main">
<br><br>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="adminhome.php">Home</a></li>
<li class="breadcrumb-item"><a href="AdminManageBook.php">Book</a></li>
</ul>
</div>
<a href="AddBook.php"><button class="btn btn-primary pull-right">+ Add New</button></a><br>
<div class="col-sm-12" style="background-color:lavender;" align="center">
<div>
<h1>Manage Books</h1>
</div>
<br>
<div>
<div class="card-block">
<div class="table-responsive dt-responsive">
<table class="table table-striped table-bordered nowrap">
<thead>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th>Pages</th>
<th>Size</th>
<th>Language</th>
<th>Description</th>
<th>Autor</th>
<th>Ano de publicação</th>
<th>Arquivo da obra</th>
<th>CapaArquivo</th>
<th>CategoryID</th>
<th></th>
</thead>
<tbody>
<?php
include('conn.php');
$query = mysqli_query($conn, "select * from `books`");
while ($row = mysqli_fetch_array($query)) {
?>
<tr>
<td><?php echo $row['bookId']; ?></td>
<td><?php echo $row['bookName']; ?></td>
<td><?php echo $row['bookPrice']; ?></td>
<td><?php echo $row['bookPages']; ?></td>
<td><?php echo $row['bookSize']; ?></td>
<td><?php echo $row['bookLanguage']; ?></td>
<td><?php echo $row['bookShortDesc']; ?></td>
<td><?php echo $row['bookAuthor']; ?></td>
<td><?php echo $row['bookPublishyear']; ?></td>
<td> <a href="<?php echo $row['bookPdf']; ?>" download>Baixar</a></td>
<td><img style="height: 200px; width:150px" src="<?php echo $row["bookImage"] ?>" alt="Image not found"></td>
<td><?php echo $row['bookCategoryId']; ?></td>
<td>
<a href="AdminUpdateBook.php?id=<?php echo $row['bookId']; ?>" class="btn btn-success">Edit</a>
<a href="AdminDeleteBook.php?id=<?php echo $row['bookId']; ?>" class="btn btn-danger" onclick="return confirm('Você confirma que deseja apagar esse livro da base?')">Apagar</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table><br>
</div>
</div>
</div>
</div>
</div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDCn8TFXGg17HAUcNpkwtxxyT9Io9B_NcM" defer></script>
<script src="assets/plugins/jquery/jquery.min.js"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/plugins/toaster/toastr.min.js"></script>
<script src="assets/plugins/slimscrollbar/jquery.slimscroll.min.js"></script>
<script src="assets/plugins/charts/Chart.min.js"></script>
<script src="assets/plugins/ladda/spin.min.js"></script>
<script src="assets/plugins/ladda/ladda.min.js"></script>
<script src="assets/plugins/jquery-mask-input/jquery.mask.min.js"></script>
<script src="assets/plugins/select2/js/select2.min.js"></script>
<script src="assets/plugins/jvectormap/jquery-jvectormap-2.0.3.min.js"></script>
<script src="assets/plugins/jvectormap/jquery-jvectormap-world-mill.js"></script>
<script src="assets/plugins/daterangepicker/moment.min.js"></script>
<script src="assets/plugins/daterangepicker/daterangepicker.js"></script>
<script src="assets/plugins/jekyll-search.min.js"></script>
<script src="assets/js/sleek.js"></script>
<script src="assets/js/chart.js"></script>
<script src="assets/js/date-range.js"></script>
<script src="assets/js/map.js"></script>
<script src="assets/js/custom.js"></script>
</body>
<!-- <div id="#">
</div>
</div>
</div>
</div>
</div>
</div>
</div> -->
<?php
// include("footer.php"); ?>
</html>