-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate.php
More file actions
262 lines (195 loc) · 11.7 KB
/
update.php
File metadata and controls
262 lines (195 loc) · 11.7 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<html>
<head>
<link rel="icon" type="image/png" href="assets/logo_icon.png">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Dallas Coffee House</title>
<!-- css files -->
<link rel="stylesheet" type="text/css" href="css/menu.css">
<link rel="stylesheet" type="text/css" href="css/footer.css">
<!-- font-styles -->
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link href="https://fonts.googleapis.com/css?family=Dancing+Script" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Pacifico&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Spicy+Rice&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/4983f5ff53.js" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css2?family=Lobster&display=swap" rel="stylesheet">
<!-- templates -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- jquery link -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="crossorigin="anonymous"></script>
<script type="text/javascript" src="js/menu.js"></script>
</head>
<body>
<div class="mySlides fade">
<img src="assets/img_1.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<img src="assets/img_2.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<img src="assets/img_3.jpg" style="width:100%">
</div>
<div class="navigation">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="index.html"><img src="assets/logo.png" style="width: 150px;height: 50px;"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="admin.php" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">Our Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="cart.html" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">My Cart</a>
</li>
<li class="nav-item">
<a class="nav-link" href="update.php" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">Add to Inventory</a>
</li>
<li class="nav-item">
<a class="nav-link" href="deleteitem.php" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">Delete from Inventory</a>
</li>
<li class="nav-item">
<a class="nav-link" href="updateitem.php" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">Update Inventory</a>
</li>
</ul>
<li class="nav-item">
<a class="nav-link" href="#" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;"><?php session_start(); echo"Welcome ".$_SESSION["fname"];?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php" style="font-size: 20px;font-family: 'Spicy Rice', cursive;padding-left: 40px;">Logout</a>
</li>
</div>
</nav>
</div>
<div id = "add_new_item">
<div class="wrapper">
<form class="form-signin" action="additem.php" method="post">
<label for="Item ID:">Enter Item ID:</label>
<input type="number" id="itemid" name="itemid" class="form-control" required="" autofocus=""/>
<br>
<div class="form-group">
<label for="itemtype">Select Item Category:</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span><i></i></span>
<select id="itemtype" name="itemtype" class="form-control-lg">
<option value="drinks">Drinks</option>
<option value="snacks">Snacks</option>
<option value="desserts">Desserts</option>
</select>
</div>
</div>
</div>
<br>
<label for="item_name">Enter Item Name:</label>
<input type="text" id="itemname" name="itemname" class="form-control">
<br>
<label for="type">Enter Item Description:</label>
<input type="text" id="description" name="description" class="form-control">
<br>
<label for="type">Enter Item Quantity:</label>
<input type="text" id="quantity" name="quantity" class="form-control">
<br>
<label for="type">Enter Price:</label>
<input type="text" id="price" name="price" class="form-control">
<br>
<label for="type">Complete the Image Path:</label>
menu//<input type="text" id="imagepath" name="imagepath" class="form-control">.png
<br>
<input type="submit" name="addtoinventory" id="addtoinventory" value="Add Item to Inventory"> <br><br>
<div id="tab"></div>
</form>
</div>
</div>
<br><br>
<div id="#confirmation"></div>
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6">
<h6>About</h6>
<p class="text-justify">Dallas Coffee is a popular coffee shop in Dallas especially famous for its various species of coffee beans,snacks,juices. It is Dallas's favourite hangout for coffee and conversations.Our coffees are sourced from thousands of small coffee planters, who made us who we are today and we're glad to be a part of their lives.We started our cafe in 2018 in Richardson,Texas.Its been an exciting journey till now and we hope it continues in the coming future as well.</p>
</div>
<div class="col-xs-6 col-md-3">
<h6>Contact Us</h6>
<p class="text-justify">7575 Frankford Road<br>Dallas TX 75252<br><i>4699105299</i></p>
</div>
<div class="col-xs-6 col-md-3">
<h6>Quick Links</h6>
<ul class="footer-links">
<li><a href="index.html">Home</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="menu.php">Our Menu</a></li>
<li><a href="popular.html">Popular</a></li>
</ul>
</div>
</div>
<hr>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<p>Copyright © All Rights Reserved</p>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<ul class="social-icons">
<li><a class="facebook" href="https://www.facebook.com"><i class="fa fa-facebook"></i></a></li>
<li><a class="twitter" href="https://www.twitter.com"><i class="fa fa-twitter"></i></a></li>
<li><a class="dribbble" href="https://dribbble.com/"><i class="fa fa-dribbble"></i></a></li>
<li><a class="linkedin" href="https://www.linkedin.com"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<script type=text/javascript>
$(document).ready(function() {
$("#addtoinventory").click(function(){
var item_id_val = $("#itemid").val();
var itemtype_val = $("#itemtype").val();
var itemname_val = $("#itemname").val();
var description_val = $("#description").val();
var quantity_val = $("#quantity").val();
var price_val = $("#price").val();
var imagepath_val = $("#imagepath").val();
$.ajax({
url:"additem.php",
method:"POST",
data: {itemid:itemid_val,itemtype:itemtype_val,itemname:itemname_val,description:description_val,quantity:quantity_val,price:price_val,imagepath:imagepath_val},
dataType:"text",
success:function(html){
$("#confirmation").html = html;
$("#confirmation").show();
$("#confirmation").fadeOut("slow");
}
}
);
});
$("#button").click(function()
{
window.location.href = 'registration.html';
});
});
</script>
<script type="text/javascript">
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
slides[slideIndex-1].style.display = "block";
setTimeout(showSlides, 4000); // Change image every 4 seconds
}
</script>
</body>
</html>