-
Notifications
You must be signed in to change notification settings - Fork 4
/
member_ordered_detail.php
306 lines (230 loc) · 10.4 KB
/
member_ordered_detail.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
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<?php
require __DIR__ . '/__connect_db.php';
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
//$mid = $_SESSION['user']['sid'];
$order_sid = isset($_GET['oid']) ? $_GET['oid'] : 0;
$sql = "SELECT * FROM `order_details` o JOIN `products` p ON o.`product_sid` = p.`sid` WHERE o.`order_sid` LIKE $order_sid";
$result = $mysqli->query($sql);
$sql2 = "SELECT * FROM `orders` WHERE `sid` = $order_sid";
$result2 = $mysqli->query($sql2);
$row2 = $result2->fetch_assoc()
?>
<!DOCTYPE html>
<html lang="zh-tw">
<head>
<meta charset="UTF-8">
<title>UniSay</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/login_main.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<!-- Icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- fonts -->
<link href="https://fonts.googleapis.com/css?family=Cinzel+Decorative" rel="stylesheet">
<!-- font-family: 'Cinzel Decorative', cursive; -->
<link href="https://fonts.googleapis.com/css?family=Amita" rel="stylesheet">
<!-- font-family: 'Amita', cursive; -->
<link href="https://fonts.googleapis.com/css?family=IM+Fell+English+SC" rel="stylesheet">
<!-- font-family: 'IM Fell English SC', serif; -->
<link href="https://fonts.googleapis.com/css?family=Fredericka+the+Great" rel="stylesheet">
<!-- font-family: 'Fredericka the Great', cursive; -->
</head>
<!-- ====================================================================================== -->
<body>
<!-- 主頁面內容 -->
<div class="wrap">
<header>
<!-- 平板手機會fixed的banner -->
<div class="banner">
<!-- 三明治選單 -->
<div class="sandwich"></div>
<!-- fixed的按鈕 -->
<div class="cart_icon"></div>
<div class="cart_sidebar"></div>
<div class="member_icon"></div>
<div class="member_sidebar"></div>
<div class="totop_icon"></div>
<!-- 中央logo -->
<div class="logo"><img src="images/header/header_logo.svg" alt=""></div>
<!-- 上方選單列 -->
<nav>
<ul>
<!-- 當前頁面掛上here的class -->
<li class="icon_aboutus">
<a href="aboutus.html"></a>
</li>
<li class="icon_product">
<a href="product.html"></a>
</li>
<li class="icon_custom">
<a href="custom.html"></a>
</li>
<li class="icon_inspire">
<a href="inspire.html"></a>
</li>
</ul>
</nav>
<!-- 暗幕的背景 -->
<div class="fixed_shadowbg"></div>
</div><!-- banner包全部 -->
</header>
<!-- ====================================================================================== -->
<content>
<div class="con3">
<!-- 麵包屑 -->
<div class="loginnav">
<p>ACCOUNT-MEMBER</p>
<img src="images/member/line.svg">
</div>
<!-- 上方的bar -->
<div class="upframe">
<div class="up1">
<a href="memberaccountmember.php">會員專區</a>
</div>
<div class="up2">
<a href="memberaccounteditinfopw.php">修改資料</a>
</div>
<div class="up3 here">
<img src="images/member/mushroom.svg">
<a href="member_ordered_list.php">訂單查詢</a>
</div>
</div>
<!-- 下方欄位 -->
<div class="downframe2">
<p>ORDERS 訂單查詢</p>
<img src="images/member/line2-01.svg">
</div>
<div class="member-content clearfix">
<div class="member-content-hd">
<h4>▍ 訂單編號:UNISAY000<?=$row2['sid']?></h4>
</div>
<div class="member-content-bd">
<div class="section">
<table class="table-order table-order--detail">
<tbody>
<tr>
<th width="30%">商品名稱</th>
<th>數量</th>
<th>單價</th>
<th>折扣</th>
<th>規格</th>
<th>小計</th>
</tr>
<?php
while ($row = $result->fetch_assoc()): ?>
<tr>
<td><?=$row['productname']?></td>
<td><?=$row['quantity']?></td>
<td><?=$row['price']?></td>
<td>0</td>
<td>iPhone 6s</td>
<td><?=$row['price'] * $row['quantity']?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<!-- <div class="cart-bill">
<ul>
<li>
<span>總金額</span>
<span>NT.1000</span>
</li>
<li>
<span>運費</span>
<span>NT.0</span>
</li>
<li>
<span>折價卷折扺</span>
<span>NT.0</span>
</li>
<li>
<span>購物金折扺</span>
<span>NT.245</span>
</li>
<li class="last">
<span>應付金額</span>
<span>NT.333</span>
</li>
</ul>
</div> -->
</div>
<!-- /section -->
<div class="section section-order-detail">
<h5>訂購資料</h5>
<table class="table-order">
<tbody>
<tr>
<th>訂購日期</th>
<th>收件人</th>
<th>出貨日期</th>
<th>包裹編號</th>
<th width="25%">備註</th>
</tr>
<tr>
<td><?=$row2['order_date']?></td>
<td><?= $_SESSION['user']['nickname'] ?></td>
<td><?=$row2['order_date']?></td>
<td>UNISAY000<?=$row2['sid']?></td>
<td>已出貨</td>
</tr>
</tbody>
</table>
</div>
<div class="section section-order-detail">
<h5>付款及運送方式</h5>
<table class="table-order">
<tbody>
<tr>
<th>付款方式</th>
<th>付款結果</th>
<th>運送方式</th>
<th>運送地址</th>
</tr>
<tr>
<td>7-11 門市付款</td>
<td> 完成付款 </td>
<td>超商取貨</td>
<td><?= $_SESSION['user']['address'] ?></td>
</tr>
</tbody>
</table>
</div>
<div class="section section-order-detail">
<h5>發票資訊</h5>
<table class="table-order">
<tbody>
<tr>
<th>發票種類</th>
<!-- <th>手機載具條碼</th>
<th>愛心碼</th>
<th>統一編號</th>
<th>抬頭</th> -->
</tr>
<tr>
<td>電子發票</td>
<!-- <td><span>手機載具條碼</span>---</td>
<td><span>愛心碼</span>---</td>
<td><span>統一編號</span>---</td>
<td><span>抬頭</span>---</td> -->
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</content>
<!-- ====================================================================================== -->
<footer>
</footer>
<!-- ====================================================================================== -->
</div><!-- wrap的結尾 -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="js/nav_icon.js"></script>
</body>
</html>