-
Notifications
You must be signed in to change notification settings - Fork 2
/
account.php
227 lines (155 loc) · 6.64 KB
/
account.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
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
<?php
include 'conn.php';
session_start();
$user_id = $_SESSION['user_id'];
$sql = "SELECT COUNT(`order_id`) as OrderNumber FROM `order` WHERE `user_id` = :user_id AND `order_status` = '0'";
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare($sql);
$stmt->bindParam(':user_id',$user_id);
$stmt->execute();
$count = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<head>
<title>ETHStore</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" 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>
<style type="text/css">
p{
margin: 0;
}
.content-top{
border: 1px solid #CFCFCF;
border-radius: 10px 10px 0 0;
background-color: #f6f6f6;
margin-top: 10px;
padding: 10px;
}
.content-bottom{
border: 1px solid #CFCFCF;
border-radius: 0 0 10px 10px;
padding: 10px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="index.php">
<img src="img/ou.png" width="30" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="index.php">Home <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="products.php">Products</a>
</div>
<div class="navbar-nav ml-auto">
<?php
if(isset($_SESSION['email'])){
echo '
<a class="nav-item nav-link" href="account.php">Account</a><a class="nav-item nav-link" href="logout.php">Logout</a>
<a class="nav-item nav-link" href="cart.php"><img src="img/online-store.png" width="25px" height="25px" /><span>'.$count['OrderNumber'].'</span></a>
';
}else{
echo '<a class="nav-item nav-link" href="login.php">Login</a>';
}
?>
</div>
</nav>
<div class="container mt-5">
<div class="row text-center" >
<div class="col-sm-4 mb-3">
<a href="order-history.php" style="text-decoration: none;">
<div class="border pt-2" style="border: 1 px solid #aaa">
<img src="img/Box.png" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">Your Orders</h5>
<h6 style="color: #555;font-size: 13px;">Track, return, or buy things again</h6>
</div>
</a>
</div>
<div class="col-sm-4 mb-3">
<a href="security.php" style="text-decoration: none;">
<div class="border pt-2" style="border: 1px solid #aaa">
<img src="img/sign-in-lock.png" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">Login & security</h5>
<h6 style="color: #555;font-size: 13px;">Edit login, name, and mobile number</h6>
</div>
</a>
</div>
<!-- <div class="col-sm-4 mb-3">
<a href="balances.php" style="text-decoration: none;" >
<div class="border pt-2" style="border: 1 px solid #aaa">
<img src="img/wallet.png" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">Balance</h5>
<h6 style="color: #555;font-size: 13px;">View Balance</h6>
</div>
</a>
</div>
-->
<div class="col-sm-4 mb-3">
<a href="address.php" style="text-decoration: none;">
<div class="border pt-2" style="border: 1 px solid #aaa">
<img src="img/address-map.png" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">Your Address</h5>
<h6 style="color: #555;font-size: 13px;">Edit addresses for orders and gifts</h6>
</div>
</a>
</div>
</div>
<div class="row text-center">
<div class="col-sm-4 mb-3">
<a href="addEthAddress.php" style="text-decoration: none;">
<div class="border pt-2" style="border: 1 px solid #aaa">
<img src="img/transactions.png" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">ETH Address</h5>
<h6 style="color: #555;font-size: 13px;">Deposit and Withdrawl</h6>
</div>
</a>
</div>
<div class="col-sm-4 mb-3">
<a href="sellersManagement.php" style="text-decoration: none;">
<div class="border pt-2" style="border: 1 px solid #aaa">
<img src="img/seller.jpg" width="88px" height="66px" alt="">
<h5 style="color: #111;font-size: 17px">Sellers</h5>
<h6 style="color: #555;font-size: 13px;">Seller Management</h6>
</div>
</a>
</div>
</div>
<!-- Footer -->
<footer class="page-footer font-small stylish-color-dark pt-4">
<hr>
<!-- Social buttons -->
<ul class="list-unstyled list-inline text-center">
<li class="list-inline-item">
<a class="btn-floating btn-fb mx-1">
<i class="fab fa-facebook"></i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-tw mx-1">
<i class="fab fa-twitter"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-gplus mx-1">
<i class="fab fa-google-plus-g"> </i>
</a>
</li>
</ul>
<!-- Social buttons -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2018 Copyright:
<a href="https://www.oakland.edu">Oakland University</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
</body>
</html>