-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
413 lines (398 loc) · 22.2 KB
/
index.html
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<!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">
<title>Smart Book</title>
<link rel="icon" type="image/x-icon" href="/assets/images/logo.png">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/login.css">
<link rel="stylesheet" href="assets/icons/all.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="js/script.js"></script>
<script src="js/account.js"></script>
</head>
<body>
<script>
window.onload = function() {
createAdmin();
initBanner();
createBook();
createBestSeller();
createCart();
createOrder();
renderBestseller(getBestseller());
loadPage();
}
</script>
<div>
<div id="header">
<div id="logo">
<a href="index.html"><img src="/assets/images/logo.png" alt="Smart Book Logo"></a>
</div>
<ul id="topmenu">
<li class="parent-menu">
<a href="index.html"><div>Trang Chủ</div></a>
</li>
<li class="parent-menu">
<a href="index.html" title="Sách"><div>Sách <i class="fas fa-solid fa-caret-down"></i></div></a>
<ul class="sub-topmenu">
<li>
<a href="/index.html?giaoduc">Giáo dục <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook1">
<li><a href="/index.html?giaoduc&sachgiaokhoa">Sách giáo khoa</a></li>
<li><a href="/index.html?giaoduc&sachthamkhao">Sách tham khảo</a></li>
<li><a href="/index.html?giaoduc&tudien">Từ điển</a></li>
</ul>
</li>
<li>
<a href="/index.html?vanhoc">Văn học <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook2">
<li><a href="/index.html?vanhoc&truyenngan">Truyện ngắn</a></li>
<li><a href="/index.html?vanhoc&truyendai">Truyện dài</a></li>
<li><a href="/index.html?vanhoc&tho">Thơ</a></li>
<li><a href="/index.html?vanhoc&khac">Khác</a></li>
</ul>
</li>
<li>
<a href="/index.html?tieuthuyet">Tiểu thuyết <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook3">
<li><a href="/index.html?tieuthuyet&ngontinh">Ngôn tình</a></li>
<li><a href="/index.html?tieuthuyet&giatuong">Giả tưởng</a></li>
<li><a href="/index.html?tieuthuyet&lichsu">Lịch sử</a></li>
</ul>
</li>
<li>
<a href="/index.html?kinhte">Kinh tế <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook4">
<li><a href="/index.html?kinhte&quantri">Quản trị</a></li>
<li><a href="/index.html?kinhte&marketing">Marketing</a></li>
<li><a href="/index.html?kinhte&nhanvat">Nhân vật</a></li>
<li><a href="/index.html?kinhte&khoinghiep">Khởi nghiệp</a></li>
<li><a href="/index.html?kinhte&chungkhoan">Chứng khoán</a></li>
</ul>
</li>
<li>
<a href="/index.html?tamly/kynangsong">Tâm lý/Kỹ năng sống <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook5">
<li><a href="/index.html?tamly/kynangsong&tamly">Tâm lý</a></li>
<li><a href="/index.html?tamly/kynangsong&kynangsong">Kỹ năng sống</a></li>
<li><a href="/index.html?tamly/kynangsong&hatgiongtamhon">Hạt giống tâm hồn</a></li>
</ul>
</li>
<li>
<a href="/index.html?lichsu">Lịch sử <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook6">
<li><a href="/index.html?lichsu&vietnam">Việt Nam</a></li>
<li><a href="/index.html?lichsu&thegioi">Thế Giới</a></li>
</ul>
</li>
<li>
<a href="/index.html?thieunhi">Thiếu nhi <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenubook7">
<li><a href="/index.html?thieunhi&truyenthieunhi">Truyện thiếu nhi</a></li>
<li><a href="/index.html?thieunhi&tomau">Tô màu</a></li>
<li><a href="/index.html?thieunhi&luyenchu">Luyện chữ</a></li>
</ul>
</li>
</ul>
</li>
<!-- <li class="parent-menu">
<a href="index.html" title="Dụng Cụ"><div>Dụng Cụ <i class="fas fa-solid fa-caret-down"></i></div></a>
<ul class="sub-topmenu">
<li>
<a href="/index.html">Dụng cụ học sinh <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenudevice1">
<li><a href="/index.html?dungcuhocsinh&butviet">Bút viết</a></li>
<li><a href="/index.html?dungcuhocsinh&tay">Tẩy</a></li>
<li><a href="/index.html?dungcuhocsinh&thuocke">Thước kẻ</a></li>
<li><a href="/index.html?dungcuhocsinh&maytinhcamtay">Máy tính cầm tay</a></li>
</ul>
</li>
<li>
<a href="/index.html">Dụng cụ văn phòng <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenudevice2">
<li><a href="/index.html?dungcuvanphong&sotay/ghichu">Sổ tay/Ghi chú</a></li>
<li><a href="/index.html?dungcuvanphong&tui/biadung">Túi/Bìa đụng hồ sơ</a></li>
<li><a href="/index.html?dungcuvanphong&cat/dan">Cắt/Dán</a></li>
<li><a href="/index.html?dungcuvanphong&khac">Khác</a></li>
</ul>
</li>
<li>
<a href="/index.html">Dụng cụ vẽ <i class="fas fa-solid fa-caret-down"></i></a>
<ul class="sub-topmenu" id="sub-topmenudevice3">
<li><a href="/index.html?dungcuve&bangve">Bảng vẽ</a></li>
<li><a href="/index.html?dungcuve&butve">Bút vẽ</a></li>
<li><a href="/index.html?dungcuve&butmau">Bút màu</a></li>
<li><a href="/index.html?dungcuve&maunuoc">Màu nước</a></li>
<li><a href="/index.html?dungcuve&cove">Cọ vẽ</a></li>
<li><a href="/index.html?dungcuve&khac">Khác</a></li>
</ul>
</li>
<li><a href="/index.html?dungcukhac">Khác</a></li>
</ul>
</li> -->
<li class="parent-menu">
<a href="" title="Khuyến Mãi"><div>Khuyến Mãi</div></a>
</li>
<li class="parent-menu">
<a href="/index.html?support" title="Hỗ Trợ"><div>Hỗ Trợ</div></a>
</li>
</ul>
<div id="search">
<i style="cursor: pointer;" class="fas fa-solid fa-magnifying-glass" title="Tìm kiếm" onclick="search()"></i>
<input id="searchPro" type="text" size="20%" placeholder="Tìm kiếm" >
</div>
<div id="user">
<p id="username">
<script>
var user = JSON.parse(localStorage.getItem('userActive'));
if (user) {
document.getElementById("username").innerText = "Hi, " + user.name;
}
</script>
</p>
<a href="admin.html" id="admin"><i class="fas fa-duotone fa-gear" title="Quản lý"></i> </a>
<a href="/index.html?shoppingcart"><i class="fas fa-solid fa-cart-shopping" title="Giỏ hàng"></i> </a>
<i class="fas fa-solid fa-bell" title="Thông báo"></i>
<i class="fas fa-solid fa-user" id="icon-login" title="Đăng nhập" onclick="showLogin()"></i>
<i class="fas fa-solid fa-right-from-bracket" id="icon-logout" title="Đăng xuất" onclick="logout()"></i>
</div>
</div>
<script>
var user = JSON.parse(localStorage.getItem('userActive'));
if (user == null) {
document.getElementById("icon-login").style.display = "inline";
document.getElementById("icon-logout").style.display = "none";
document.getElementById("admin").style.display = "none";
} else {
if (user.type == "Admin") {
document.getElementById("admin").style.display = "inline";
} else {
document.getElementById("admin").style.display = "none";
}
document.getElementById("icon-login").style.display = "none";
document.getElementById("icon-logout").style.display = "inline";
}
</script>
<div id="banner">
<div id="previous-banner">
<i class="fas fa-regular fa-angle-left" title="Ảnh trước" onclick="prevBanner()"></i>
</div>
<div id="next-banner">
<i class="fas fa-regular fa-angle-right" title="Ảnh sau" onclick="nextBanner()"></i>
</div>
</div>
<div class="filterAndSort" id="filterAndSort">
<div class="tittleFilter">
<h4>
<span>Lọc & Sắp xếp</span>
<i class="fas fa-solid fa-xmark" onclick="closeFilterAndSort()"></i>
</h4>
</div>
<div class="mainFilter">
<div class="sort" id="sort">
<div class="tittleFilter">
<h4>
<span>Sắp xếp theo</span>
<i class="fa-solid fa-chevron-down" onclick="showSortBy()"></i>
</h4>
</div>
<div class="options" id="options">
<div class="sort1" id="sort1" onclick="sortLow_HighPrice()"><span>Giá (thấp - cao)</span></div>
<div class="sort2" id="sort2" onclick="sortHigh_LowPrice()"><span>Giá (cao - thấp)</span></div>
</div>
</div>
<div class="filter" id="filter">
<div class="tittleFilter">
<h4>
<span>Lọc theo</span>
<i class="fa-solid fa-chevron-down" onclick="showFilter()"></i>
</h4>
</div>
<div class="options">
<div class="filter1" id="filter1">
<div class="tittleFilter1">
<h4>Giá</h4>
<i class="fa-solid fa-chevron-down" onclick="showPriceFilter()"></i>
</div>
<div class="option1">
<div onclick="filterOption1()"><span><500.000 vnd</span></div>
<div onclick="filterOption2()"><span>500.000 vnd - 1.000.000 vnd</span></div>
<div onclick="filterOption3()"><span>> 1.000.000 vnd</span></div>
</div>
</div>
<div class="filter3" id="filter3">
<div class="tittleFilter1">
<h4>Loại</h4>
<i class="fa-solid fa-chevron-down" onclick="showCategoryFilter()"></i>
</div>
<div class="option2">
<div onclick="filterOption5()"><span>Sách giáo khoa</span></div>
<div onclick="filterOption6()"><span>Sách tham khảo</span></div>
<div onclick="filterOption7()"><span>Từ điển</span></div>
<div onclick="filterOption8()"><span>Truyện ngắn</span></div>
<div onclick="filterOption9()"><span>Truyện dài</span></div>
<div onclick="filterOption10()"><span>Thơ</span></div>
<div onclick="filterOption11()"><span>Văn học khác</span></div>
<div onclick="filterOption12()"><span>Tiểu thuyết ngôn tình</span></div>
<div onclick="filterOption13()"><span>Tiểu thuyết giả tưởng</span></div>
<div onclick="filterOption14()"><span>Tiểu thuyết Lịch sử</span></div>
<div onclick="filterOption15()"><span>Quản trị</span></div>
<div onclick="filterOption16()"><span>Marketing</span></div>
<div onclick="filterOption17()"><span>Nhân vật</span></div>
<div onclick="filterOption18()"><span>Khởi nghiệp</span></div>
<div onclick="filterOption19()"><span>Chứng khoán</span></div>
<div onclick="filterOption20()"><span>Tâm lý</span></div>
<div onclick="filterOption21()"><span>Kỹ năng sống</span></div>
<div onclick="filterOption22()"><span>Hạt giống tâm hồn</span></div>
<div onclick="filterOption23()"><span>Lịch sử Việt Nam</span></div>
<div onclick="filterOption24()"><span>Lịch sử Thế giới</span></div>
<div onclick="filterOption25()"><span>Truyện thiếu nhi</span></div>
<div onclick="filterOption26()"><span>Tô màu</span></div>
<div onclick="filterOption27()"><span>Luyện chữ</span></div>
</div>
</div>
<div class="filter2" onclick="filterOption4()"><span>Sản phẩm bán chạy</span></div>
</div>
</div>
</div>
</div>
<div id="content">
<div class="headline" id="headline"></div>
<div class="btFilter" id="btFilter" onclick="showBtFilter()">Lọc & Sắp xếp <i class="fas fa-light fa-sliders"></i></div>
<ul class="products" id="products">
<!-- innerHTML here: products * perPage
<li>
<div class="product-item">
<div class="product-top">
<a href="" class="product-thumb">
<img src="assets/images/product/product-tst.jpg" alt="">
</a>
<a href="" class="buynow">Mua Ngay</a>
</div>
<div class="product-info">
<a href="" class="product-cat">Sách Kinh Tế</a>
<a href="" class="product-name">Chết vì chứng khoán</a>
<div class="product-price">200.000 ₫</div>
</div>
</div>
</li>
innerHTML here: products * perPage -->
</ul>
<div class="content-paging">
<ul class="page" id="page">
<!-- <li id="btprev" class="button-prev-next"><i class="fas fa-chevron-circle-left" onclick="prevButton()"></i></li>
<div class="number-page" id="number-page">
<li id="active"><b>1</b></li>
<li><b>2</b></li>
<li><b>3</b></li>
</div>
<li id="btnext" class="button-prev-next-active"><i class="fas fa-chevron-circle-right" onclick="nextButton()"></i></li> -->
</ul>
</div>
</div>
<div id="footer">
<div id="aboutus">
<h2>Thông tin liên hệ</h2>
<div>
<p>
<i class="fas fa-solid fa-map-location-dot"></i>
<b>273 An Dương Vương, Phường 3, Quận 5, Thành phố Hồ Chí Minh</b>
</p>
<p>
<i class="fas fa-solid fa-phone-flip"></i>
<b>0123456789</b>
</p>
<p>
<i class="fas fa-solid fa-envelope"></i>
<b>smartbookStore@gmail.com</b>
</p>
</div>
</div>
<div id="contact">
<p>
<b>“</b>
A house without books is like a room without windows. No man has a right to bring up his children without surrounding them with books, if he has the means to buy them. It is a wrong to his family. He cheats them! Children learn to read by being in the presence of books. The love of knowledge comes with reading and grows upon it.
<b>”</b>
</p>
<div>
<a href="https://www.facebook.com/Smart-Book-2020602218161522"><i class="fas fa-brands fa-facebook"></i></a>
<a href="https://www.instagram.com/smartbookStore"><i class="fas fa-brands fa-instagram"></i></a>
</div>
</div>
<p id="copyright">
Copyright ©2022 Nhà sách Smart Book
</p>
</div>
<div title="Về đầu trang" id="backtotop">
<i class="fas fa-arrow-circle-up" onclick="backtop()"></i>
</div>
</div>
<div id="container" onclick="backFromDiv()">
</div>
<div id="login">
<div id="header-login">
<h2>Login</h2>
</div>
<form action="/" id="main-login" onsubmit="return login();">
<div>
<label class="txt" for="username-login">Username</label>
<input id="username-login" class="inp" type="text" placeholder="Username">
</div>
<div>
<label class="txt" for="password-login">Password</label>
<input id="password-login" class="inp" type="password" placeholder="Password" onclick="this.select()" onfocus="this.select()">
<i class="fas fa-solid fa-eye-slash" id="eyes" onclick="togglePass()"></i>
</div>
<div style="margin-left: 370px; padding-right: 23px; cursor: pointer;" onclick="showSignUp()">
<h3>Sign Up</h3>
</div>
<div id="footer-login">
<input type="submit" id="button-login" value="Login">
</div>
</form>
</div>
<div id="signup">
<div id="header-signup">
<h2>Sign Up</h2>
</div>
<form action="/" id="main-signup" onsubmit="return signup();">
<div>
<label class="txt" for="fullname-signup">Name</label>
<input id="name-signup" class="inp" type="text" placeholder="Name">
</div>
<div>
<label class="txt" for="username-signup">Username</label>
<input id="username-signup" class="inp" type="text" placeholder="Username">
</div>
<div>
<label class="txt" for="email-signup">Email</label>
<input id="email-signup" class="inp" type="email" placeholder="Email">
</div>
<div>
<label class="txt" for="password-signup">Password</label>
<input id="password-signup" class="inp" type="password" placeholder="Password" onclick="this.select()" onfocus="this.select()" onchange="this.select()">
</div>
<div>
<label class="txt" for="confirm-signup">Password</label>
<input id="confirm-signup" class="inp" type="password" placeholder="Confirm Password" onclick="this.select()" onfocus="this.select()">
</div>
<div style="margin-left: 378px; padding-right: 23px; cursor: pointer;" onclick="showLogin()">
<h3>Login</h3>
</div>
<div id="footer-signup">
<input type="submit" id="button-signup" value="Sign Up">
</div>
</form>
</div>
<div id="wrapper">
<div id="close">
<i class="fa-solid fa-xmark" onclick="backFromDiv()"></i>
</div>
<div id="detail">
</div>
</div>
</body>
</html>