-
Notifications
You must be signed in to change notification settings - Fork 1
/
AdminManageItem.php
104 lines (82 loc) · 3.02 KB
/
AdminManageItem.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
<?php include('header1.php'); ?>
<div class="main">
<br><br>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item"><a href="AdminManageItem.php">Product</a></li>
</ul>
</div>
<a href="AddItem.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 Item</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>ProductName</th>
<th>ProductPrice</th>
<th>ProductCategoryID</th>
<th></th>
</thead>
<tbody>
<?php
include('conn.php');
$query = mysqli_query($conn, "select * from `products`");
while ($row = mysqli_fetch_array($query)) {
?>
<tr>
<td><?php echo $row['ProductID']; ?></td>
<td><?php echo $row['ProductName']; ?></td>
<td><?php echo $row['ProductPrice']; ?></td>
<td><?php echo $row['ProductCategoryID']; ?></td>
<td>
<a href="AdminUpdateItem.php?id=<?php echo $row['ProductID']; ?>" class="btn btn-success">Edit</a>
<a href="AdminDeleteItem.php?id=<?php echo $row['ProductID']; ?>" class="btn btn-danger" onclick="return confirm('Are you sure to delete this record?')">Delete</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>