forked from MT-Wu/unisay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmember_ordered_list.php
208 lines (136 loc) · 4.63 KB
/
member_ordered_list.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
<?php
require __DIR__ . '/__connect_db.php';
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
$mid = $_SESSION['user']['sid'];
//$sql = "SELECT * FROM `orders` JOIN members ON members.sid=orders.member_sid WHERE `member_sid` = $mid";
$sql = "SELECT * FROM `orders` WHERE `member_sid` = $mid ORDER BY `order_date` DESC";
$result = $mysqli->query($sql);
?>
<!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="">訂單查詢</a>
</div>
</div>
<!-- 下方欄位 -->
<div class="downframe2">
<p>ORDERS 訂單查詢</p>
<img src="images/member/line2-01.svg">
</div>
<div class="table_frame">
<table class="table">
<thead>
<tr>
<th>訂購日期</th>
<th>訂購編號</th>
<th>訂單狀態</th>
<th>應付金額</th>
<th>退貨</th>
<th>明細</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $result->fetch_assoc()): ?>
<tr>
<td scope="row"><?=$row['order_date']?></td>
<td>UNISAY000<?=$row['sid']?></td>
<td>已出貨</td>
<td>$ <?=$row['amount']?></td>
<td><a href="#">申請退貨</a></td>
<td><a href="member_ordered_detail.php?oid=<?=$row['sid']?>">查詢</a></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</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>