-
Notifications
You must be signed in to change notification settings - Fork 0
/
storeOwner.php
85 lines (77 loc) · 2.68 KB
/
storeOwner.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
<?php
$conn = mysqli_connect("localhost", "root", "", "grocer");
$sql = "SELECT * FROM product";
$result = mysqli_query($conn, $sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grocer | Store Owner Menu</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<script src="http://localhost/myFolder/script.js"></script>
</head>
<body>
<div class="loaderStoreOwner hidden" id="loader">
<i class="fas fa-seedling"></i>
</div>
<nav class="navbar">
<div class="nav">
<i class="fas fa-seedling"></i>
<h1 class="heading"><a href="index.html">Grocer</a></h1>
</div>
<div class="links">
<a href="login.php" class="navButton">Switch to Customer</a>
</div>
</nav>
<div class="customerSection">
<div class="customerBox box">
<?php
if (mysqli_num_rows($result) > 0) {
?>
<table class="table">
<thead>
<tr class="tableHead">
<th>Product ID</th>
<th>Products</th>
<th>Price</th>
<th>Remaining Stock (in KG)</th>
</tr>
</thead>
<tbody class="customerTable">
<?php
while ($row = mysqli_fetch_assoc($result)) {
echo "<tr>";
echo "<td>".$row['Pid']."</td>";
echo "<td>".$row['Pname']."</td>";
echo "<td>".$row['Pprice']."</td>";
echo "<td>".$row['Pstock']."</td>";
echo "</tr>";
} ?>
</tbody>
</table>
</div>
<div class="rightScreenOptions">
<div class="employeeMenu">
<a href="employee.php" class="optionButton">Employee Menu</a>
</div>
<div class="stockRefill">
<a href="stockManagement.php" class="optionButton">Stock Management</a>
</div>
<div class="totalSales">
<a href="customerDetails.php" class="optionButton">Customer Management</a>
</div>
</div>
</div>
<footer class="copyright">
<h1 class="cpyrght">Developed by Akhin Abraham & Avlin Antony</h1>
</footer>
<?php
}
mysqli_close($conn);
?>
</body>
</html>