-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminStock.php
More file actions
145 lines (91 loc) · 3.93 KB
/
adminStock.php
File metadata and controls
145 lines (91 loc) · 3.93 KB
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
138
139
140
141
142
143
144
145
<?php
session_start();
include "connection.php";
if (isset($_SESSION["a"])) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stock - Management</title>
<link rel="stylesheet" href="bootstrap.css" />
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="resource/img/icon1.svg"/>
</head>
<body class="admin-body">
<?php
include "adminNavBar.php";
?>
<div class="container-fluid">
<div class="row">
<div class="col-5 offset-1">
<h2 class="tetx-center">Stock Update</h2>
<select class="form-select" id="selectproduct">
<option value="0">Select Product</option>
<?php
$rs = Database::search("SELECT * FROM `product`");
$num = $rs->num_rows;
for ($x = 0; $x < $num; $x++) {
$data = $rs->fetch_assoc();
?>
<option value="<?php echo ($data["id"]); ?>"><?php echo ($data["name"]); ?></option>
<?php
}
?>
</select>
<div class="mb-3">
<label for="" class="form-label">Qty</label>
<input type="text" class="form-control" id="stockqty" required>
</div>
<div class="mb-3">
<label for="" class="form-label">Unit Price</label>
<input type="text" class="form-control" id="unitprice" required>
</div>
<div class="d-grid">
<button class="btn btn-secondary" onclick="updateStock();">Update Stock</button>
</div>
</div>
<div class="col-5 ">
<!-- Catogary register -->
<div class="mb-3">
<h2 class="text-center">Product Management</h2>
<label for="form-control">Category Name</label>
<input type="text" class="form-control mb-3" id="addnewcategory" />
<div class="mt-3">
<button class="btn btn-secondary col-12" onclick="categoryregister();">Category Register</button>
</div>
<div class="d-none" id="msgDiv2" onclick="reload();">
<div class="alert alert-danger" id="msg2"></div>
</div>
</div>
<!-- Catogary register -->
<!-- size register -->
<div class="mt-3">
<label for="form-control">Size</label>
<input type="text" class="form-control mb-3" id="addnewsize" />
<div class="d-none" id="msgDiv4" onclick="reload();">
<div class="alert alert-danger" id="msg4"></div>
</div>
<div>
<button class="btn btn-secondary col-12" onclick="sizeregister();">Size Register</button>
</div>
</div>
</div>
<!-- size register -->
</div>
</div>
<!--Footer-->
<div class="fixed-bottom col-12">
<p class="text-center">© 2024 FruitVista</p>
</div>
<!--Footer-->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="script.js"></script>
</body>
</html>
<?php
} else {
echo ("Your not an admin");
}
?>