-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackstoreOrderEdit.php
113 lines (104 loc) · 5.28 KB
/
backstoreOrderEdit.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
<?php
//include ('index.php');
include('dbcon.php');
include('authenticate.php');
include('session.php');
if($_SESSION['permission'] != 'admin')
{
header('location:home.php');
}
?>
<!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>BackstoreOrder</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="project.css">
</head>
<body>
<!-- Nav bar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<img src="trolley.png" class="navbar-brand" style="width: 40px;">
<a class="navbar-brand" href="#">Online Grocery Shopping</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 mx-auto">
<li class="nav-item active">
<a class="nav-link" href="home.php">Home <span class="sr-only"></span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="AllProducts.php">All Products</a>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Aisles
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="aisles.php?aisle=Meat">Meat</a>
<a id="disabled" class="dropdown-item" href="aisles.php?aisle=Dairy">Dairy</a>
<a id="disabled" class="dropdown-item" href="aisles.php?aisle=Beverages">Beverages</a>
<a id="disabled" class="dropdown-item" href="aisles.php?aisle=Detergents">Detergents</a>
<a id="disabled" class="dropdown-item" href="aisles.php?aisle=Snacks">Snacks</a>
<a id="disabled" class="dropdown-item" href="aisles.php?aisle=Alcohol">Alcohol</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link disabled" href="contact.php">Contact Us</a>
</li>
</ul>
<br>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search" style="background-color: #343A40;">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
<?php if(isset($_SESSION['loggedin'])){ ?>
<a class="btn btn-outline-primary ml-1" href="logout.php">Log Out</a>
<?php }else{ ?>
<a class="btn btn-outline-primary ml-1" href="signinpage.php">Sign in</a>
<?php } ?>
</form>
</div>
</nav>
<!-- section name -->
<div class="d-flex flex-column flex-md-row align-items-center p-2 px-md-4 bg-white border-bottom box-shadow">
<h5 class="my-0 mr-md-auto font-weight-normal" style="margin:auto;">Backstore Order List Editor</h5>
</div>
<!-- Order information table -->
<table class="table">
<form action="backstoreOrder.php?action=edit&order_id=<?php echo $_GET["order_id"]?>" method="post">
<thead>
<tr>
<th scope="col">Order ID</th>
<th scope="col">Products Name</th>
<th scope="col">Product Price</th>
<th scope="col">Products Quantity</th>
<th scope="col">Full Name</th>
<th scope="col">Email</th>
<th scope="col">Address</th>
<th scope="col">Postal</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><input type="text" id="order_id" name="order_id" value="<?php echo $_GET['order_id'] ?>" disabled></th>
<td><input type="text" id="product_name" name="product_name" value="<?php echo $_GET['product_name']?>"></td>
<td><input type="text" id="product_price" name="product_price" value="<?php echo $_GET['product_price']?>"></td>
<td><input type="number" id="product_quantity" name="product_quantity" min="0" value="<?php echo $_GET['product_quantity']?>"></td>
<td><input type="text" id="firstname" name="firstname" value="<?php echo $_GET['firstname']?>" disabled></td>
<td><input type="text" id="email" name="email" value="<?php echo $_GET['email']?>" disabled ></td>
<td><input type="text" id="address" name="address" value="<?php echo $_GET['address']?>" disabled></td>
<td><input type="text" id="postal" name="postal" value="<?php echo $_GET['postal']?>" disabled></td>
</tr>
</tbody>
<input type="submit" name="edit" value="Edit">
</form>
</table>
</body>
</html>