-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyorders.php
196 lines (150 loc) · 6.33 KB
/
myorders.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
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
<?php session_start();
include 'connect.php';
include 'functions.php';
$sql = "SELECT * FROM billingdetails";
$all_products = $con->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Games4U</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<script src="https://kit.fontawesome.com/c035b66456.js" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
<style>
img {
width: 100px;
}
.price {
color: black;
font-size: 22px;
text-align: center;
}
.vidbox {
width: 300px;
height: 200px;
background-color: white;
margin: 5px;
border-radius: 20px;
box-sizing: border-box;
overflow: wrap;
}
h4 {
color: indigo;
}
</style>
</head>
<body>
<!-- MAIN NAV BAR -->
<div class="navbar">
<a href="basicWeb.php"><img src="images/Logo.png" class="logo"></a>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="basicWeb.php">Games</a></li>
<li><a href="aboutUs.php">About Us</a></li>
<li><a href="contactUs.php">Contact Us</a></li>
<li><a href="myorders.php">View My Orders</a></li>
<?php
if (isset($_SESSION["id"])) {
echo "<li><a href='logout.php'>Log Out</a></li>";
} else {
echo "<li><a href='login.php'>Log In</a></li>";
}
if (isset($_SESSION["id"])) {
echo '<li><a href="basket.php"><i class="fa-solid fa-basket-shopping"></i> </a></li>';
} else {
echo '<li><a href="login.php"><i class="fa-solid fa-basket-shopping"></i> </a></li>';
// echo '<li> <script> alert ("You need to login to add to the basket!!!");window.location="basicWeb.php"</script> <i class="fa-solid fa-basket-shopping"></i></li>';
}
?>
</ul>
</div>
<div class="contactBox">
<?php
// $sql = "SELECT email, billingEmail, address, city
// FROM users a inner join billingdetails ON email = billingEmail";
$sql = "Select * from `billingdetails`";
$result = mysqli_query($con, $sql);
if ($result) {
while ($row = mysqli_fetch_assoc($result)) {
$id = $row['id'];
$name = $row['name'];
$email = $row['billingEmail'];
$address = $row['address'];
$nameOnCard = $row['nameOnCard'];
$debitCardNumber = $row['debitCardNumber'];
$city = $row['city'];
$county = $row['county'];
$postcode = $row['postcode'];
$expyear = $row['expyear'];
$expmonth = $row['expmonth'];
$cvv = $row['cvv'];
$product = $row['product'];
$productprice = $row['productprice'];
$date = $row['date'];
echo '
<div class="detailsBoxInvoice">
<h1 style="text-align:center;">Order Number ' . $id . '</h1>
<h2><u>Details</u></h2>
<h3>Full Name:</h3><h4>' . $name . '</h4>
<h3>Email Address:</h3> <h4>' . $email . '</h4>
<p>------------------------------------------------------------------------</p>
<h2><u>Billing Invoice</u></h2>
<h3>Billing Address:</h3><h4>' . $address . '</h4> <h4>' . $city . ',</h4><h4>' . $county . ',</h4><h4>' . $postcode . '</h4>
<p>------------------------------------------------------------------------</p>
<h2><u>Payments</u></h2>
<h3>Name on card:</h3><h4>' . $nameOnCard . '</h4>
<h3>Card Number:</h3><h4>' . $debitCardNumber . '</h4>
<h3>Expiration Month:</h3><h4>' . $expmonth . '</h4>
<h3>Expiration Year:</h3><h4>' . $expyear . '</h4>
<h3>CVV:</h3><h4>' . $cvv . '</h4>
<p>------------------------------------------------------------------------</p>
<h2><u>Product</u></h2>
<h3>Product</h3><h4>' . $product . '</h4>
<h3>Price</h3><h4>£' . $productprice . '</h4>
<h5>' . $date . '</h5>
</br>
</div>
';
}
}
?>
</tbody>
</div>
<!---Footer--->
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<h4>find us</h4>
<ul>
<li>Store location:</li>
<li>59-61 Station St, Birmingham B5 4DY</li>
</ul>
</div>
<div class="footer-col">
<h4>follow us</h4>
<div class="social-links">
<a href="#"><i class="fab fa-facebook-f"></i></a>
<a href="#"><i class="fab fa-twitter"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
<div class="footer-col">
<h4>help</h4>
<ul>
<li><a href="/aboutUs.php">about us</a></li>
<li><a href="/contactUs.php">Contact Us</a></li>
<br>
<li>Games4U.org</li>
<li>DISCLAIMER: We do not own these pictures, they belong to their own sources, respectivly.</li>
</ul>
</div>
</div>
</div>
</footer>
<!-- end of footer -->
</body>
</html>