-
Notifications
You must be signed in to change notification settings - Fork 0
/
xem_gio_hang.php
1201 lines (769 loc) · 39.6 KB
/
xem_gio_hang.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
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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php session_start(); ?>
<?php include 'kt.php'?>
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>
SMARTPHONE
</title>
<!-- ================= Page description ================== -->
<!-- ================= Meta ================== -->
<meta name="keywords" content="Digiworld, cửa hàng điện thoại, cua hang dien thoai, phụ kiện điện thoại, phu lien dien thoai, thủ công mỹ nghệ, thu cong my nghe, hoa quà tặng, hoa qua tang, siêu thị mini, đồ gia dụng, đồ điện máy, phụ kiện điện thoại, sieu thi mini, do gia dung, do dien may, digi world"/>
<link rel="canonical" href="https://template-digiworld.bizwebvietnam.net"/>
<meta name='revisit-after' content='1 days' />
<meta name="robots" content="noodp,index,follow" />
<!-- ================= Favicon ================== -->
<!-- <link rel="icon" href="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/favicon.png?1524126221691" type="image/x-icon" /> -->
<link rel="shortcut icon" href="//bizweb.dktcdn.net/assets/favicon.ico" type="image/x-icon">
<!-- ================= Google Fonts ================== -->
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css' />
<!-- Facebook Open Graph meta tags -->
<meta property="og:type" content="website">
<meta property="og:title" content="website bán điện thoại di động">
<meta property="og:image" content="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/logo.png?1524126221691">
<meta property="og:image:secure_url" content="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/logo.png?1524126221691">
<meta property="og:description" content="Template Digiworld đặc biệt phù hợp với các website bán điện thoại đi động, phụ kiện điện thoại, thời trang - trang sức, thủ công mỹ nghệ - quà tặng...">
<meta property="og:url" content="https://template-digiworld.bizwebvietnam.net">
<meta property="og:site_name" content="Digiworld">
<!-- Plugin CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/themify-icons/0.1.2/css/themify-icons.css" >
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" >
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/owl.carousel.min.css?1524126221691' rel='stylesheet' type='text/css' />
<!-- Build Main CSS -->
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/base.scss.css?1524126221691' rel='stylesheet' type='text/css' />
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/style.scss.css?1524126221691' rel='stylesheet' type='text/css' />
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/module.scss.css?1524126221691' rel='stylesheet' type='text/css' />
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/responsive.scss.css?1524126221691' rel='stylesheet' type='text/css' />
<!-- Header JS -->
<script src='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/jquery-2.2.3.min.js?1524126221691' type='text/javascript'></script>
<!-- Bizweb javascript customer -->
<!-- Bizweb conter for header -->
<link href='https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/iwish.css?1524126221691' rel='stylesheet' type='text/css' />
</head>
<body style="">
<!-- Subiz --> <script>
(function(s, u, b, i, z){ u[i]=u[i]||function(){ u[i].t=+new Date(); (u[i].q=u[i].q||[]).push(arguments); }; z=s.createElement('script'); var zz=s.getElementsByTagName('script')[0]; z.async=1; z.src=b; z.id='subiz-script'; zz.parentNode.insertBefore(z,zz); })(document, window, 'https://widgetv4.subiz.com/static/js/app.js', 'subiz'); subiz('setAccount', 'acqefbsgxffajenyvnfl'); </script> <!-- End Subiz -->
<div class="hidden-md hidden-lg opacity_menu"></div>
<!-- Main content -->
<!-- Banner khuyến mãi fixed top -->
<div class="banner_a">
<div class="banner_ pull-left banner_fixed_index_1" style="width: 170.55px;">
<a href="" title="" class="banner_1_a">
<img class="img-responsive" src="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/banner_fixed_1.png?1524126221691" alt="Digiworld">
</a>
</div>
<div class="banner_ pull-right banner_fixed_index_2" style="width: 170.55px;">
<a href="" title="" class="banner_2_a">
<img class="img-responsive" src="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/banner_fixed_2.png?1524126221691" alt="Digiworld">
</a>
</div>
</div>
<!-- Menu mobile -->
<div id="mySidenav" class="sidenav menu_mobile hidden-md hidden-lg">
<div class="top_menu_mobile">
<span class="close_menu">
</span>
</div>
<div class="content_memu_mb">
<div class="link_list_mobile">
</div>
</div>
<div class="fot_menu_mobile">
</div>
</div>
<!-- End -->
<header class="header">
<div class="topbar">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-2">
<ul class="list-inline topbar_left hidden-sm hidden-xs">
<li>
Hotline: <a class="hai01" href="tel:0981744199">0981.744.199</a>
</li>
</ul>
</div>
<div class="col-md-6 col-sm-6 d-list col-xs-10 a-right topbar_right">
<div class="list-inline a-center f-right">
<ul>
<li class="hidden-md hidden-lg"><a href="" title="Đăng ký">Đăng ký</a></li>
<li class="hidden-md hidden-lg"><a href="" title="Đăng nhập">Đăng nhập</a></li>
<!-- Đây là cú pháp phtml -->
<?php if (isset($_SESSION['ten_khach_hang'])) :?>
<li class="hidden-xs hidden-sm">
<a href="xem_thong_tin.php" class="account_a register_btn">
<?php
echo "Xin Chào: ".$_SESSION['ten_khach_hang'];
?>
</a>
</li>
<li class="hidden-xs hidden-sm">
<a href="./logout.php" class="account_a login_btn" title="Đăng xuất">Đăng xuất</a>
</li>
<?php else: ?>
<li class="hidden-xs hidden-sm">
<a href="#" data-toggle="modal" data-target="#login_register" class="account_a register_btn" title="Đăng ký">Đăng ký</a>
</li>
<li class="hidden-xs hidden-sm">
<a href="#" data-toggle="modal" data-target="#login_register" class="account_a login_btn" title="Đăng nhập">Đăng nhập</a>
</li>
<?php endif ?>
</ul>
</div>
</div>
</div>
</div>
</div> <div class="mid-header">
<div class="container">
<div class="row">
<div class="content_header">
<div class="header-main">
<div class="menu-bar-h nav-mobile-button hidden-md hidden-lg">
<a href="#nav-mobile"><img src="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/i_menubar.png?1524126221691" alt="menu bar"></a>
</div>
<div class="col-lg-3 col-md-3">
<div class="logo">
<a href="./index.php" class="logo-wrapper ">
<img src="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/logo.png?1524126221691" alt="logo ">
</a>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="header-left">
<div class="header_search hidden-xs hidden-sm">
<form action="/search" method="get" class="input-group search-bar" role="search">
<input type="hidden" name="type" value="product">
<input type="search" name="query" value="" placeholder="Bạn đang tìm sản phẩm gì..." class="input-group-field">
<span class="input-group-btn">
<button type="submit" class="btn icon-fallback-text">
Tìm kiếm
</button>
</span>
</form>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3">
<div class="header-right">
<div class="header-acount hidden-lg-down hidden-xs hidden-sm">
</div>
<div class="top-cart-contain f-right hidden-xs hidden-sm visible-md visible-lg">
<div class="mini-cart text-xs-center">
<div class="heading-cart">
<a class="bg_cart" href="./giohang.php" title="Giỏ hàng">
<i class="ion-android-cart"></i>
<!-- <span class="count_item count_item_pr"></span> -->
<span class="text-giohang hidden-xs">Giỏ hàng</span>
</a>
</div>
</div>
</div>
<div class="top-cart-contain f-right hidden-lg hidden-md visible-xs visible-sm">
<div class="mini-cart text-xs-center">
<div class="heading-cart">
<a class="bg_cart" href="/cart" title="Giỏ hàng">
<i class="ion-android-cart"></i>
<span class="count_item count_item_pr"></span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- _____________MENU TOP___________ -->
<div class="wrap_main hidden-xs hidden-sm">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 col-mega hidden-sm hidden-xs">
<div class="menu_mega lineheight40">
<div class="title_menu">
<span class="title_">Danh mục sản phẩm</span>
<span class="nav_button"><span class="ion-android-menu"></span></span>
</div>
<div class="list_menu_header col-lg-3 col-md-3">
<ul class="ul_menu">
<li class="nav_item lv1">
<a href="xem_tat_ca_san_pham.php?ma_danh_muc=1">iPHONE </a>
</li>
<li class="nav_item lv1">
<a href="xem_tat_ca_san_pham.php?ma_danh_muc=4">NOKIA </a>
</li>
<li class="nav_item lv1">
<a href="xem_tat_ca_san_pham.php?ma_danh_muc=5">OPPO </a>
</li>
<li class="nav_item lv1">
<a href="xem_tat_ca_san_pham.php?ma_danh_muc=2">SAMSUNG </a>
</li>
<li class="nav_item lv1">
<a href="xem_tat_ca_san_pham.php?ma_danh_muc=3">XIAOMI </a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
<div class="bg-header-nav hidden-xs hidden-sm">
<div class="relative">
<div class="row row-noGutter-2">
<nav class="header-nav">
<ul class="item_big">
<li class="nav-item active ">
<a class="a-img" href="/"><span>Trang chủ</span></a>
</li>
<li class="nav-item ">
<a class="a-img" href="./lien_he.php"><span>Liên hệ</span></a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade login_register" id="login_register" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog wrap-modal-login account_popup_main_content" role="document">
<span class="closed_modal" data-dismiss="modal"><i class="fa fa-times"></i></span>
<div class="text-xs-center" id="login_popup">
<div id="login">
<h4 class="title-modal">Đăng nhập tài khoản của bạn</h4>
<p class="text_bot_modal">Điền đầy đủ thông tin tài khoản của bạn vào form dưới đây để đăng nhập</p>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-hg-12">
<form accept-charset="UTF-8" action="./process_login.php" id="customer_login" method="post">
<input name="FormType" type="hidden" value="customer_login">
<input name="utf8" type="hidden" value="true">
<div class="fw clearfix form-signup row">
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Email:</label>
<input type="email" class="form-control form-control-lg" value="" name="email" id="customer_email" >
<label>Mật khẩu:</label>
<input type="password" class="form-control form-control-lg" value="" name="mat_khau" id="customer_password">
<select name="ghinho">
<option value="1">Nhớ tài khoản</option>
</select>
<button class="btn-bg btn btn-lg btn-style btn-style-active btn_submit" type="submit" value="" name="dangnhap">Đăng nhập tài khoản</button>
</fieldset>
<div class="bt_login a-left other_ways">
<span class="hai_tk">Bạn chưa có tài khoản ?<a href="#" class="btn-link-style register_btn" title="Đăng ký"> Đăng ký tại đây</a></span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="text-xs-center" id="register_popup">
<div id="register">
<h4 class="title-modal">Đăng ký tài khoản mới</h4>
<p class="text_bot_modal">Điền đầy đủ thông tin tài khoản của bạn vào form dưới đây để đăng kí tài khoản</p>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-hg-12">
<form accept-charset='UTF-8' action='./process_register.php' id='customer_register' method='post'>
<input name='FormType' type='hidden' value='customer_register' />
<input name='utf8' type='hidden' value='true' />
<div class="fw clearfix form-signup row">
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Họ và tên:</label>
<input type="text" class="form-control form-control-lg" name="ten_khach_hang" id="ho_ten">
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_ho_ten" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Số Điện Thoại:</label>
<input type="number" class="form-control form-control-lg" name="sdt" id="sdt" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$">
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_sdt" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Email:</label>
<input type="email" class="form-control form-control-lg" name="email" id="gmail" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" required>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_gmail" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Mật khẩu:</label>
<input type="password" class="form-control form-control-lg" name="mat_khau" id="mat_khau" minlength=6 maxlength=32 >
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_mat_khau" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Nhập lại mật khẩu:</label>
<input type="password" class="form-control form-control-lg" name="mat_khau" id="nl_mat_khau" minlength=6 maxlength=32 >
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_nl_mat_khau" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Ngày Sinh:</label>
<input type="date" class="form-control form-control-lg" name="ngay_sinh">
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Địa Chỉ:</label>
<input type="text" class="form-control form-control-lg" name="dia_chi" id="dia_chi" minlength=6 maxlength=32 >
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<p id="bao_loi_dia_chi" style="color: red;"></p>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label>Giới Tính:</label>
<select name="gioi_tinh">
<option value="1">Nam</option>
<option value="0">Nữ</option>
</select>
</fieldset>
<fieldset class="form-group fr_gr_pd col-lg-12 col-md-12 col-sm-12 col-xs-12">
<button class="btn-bg btn btn-lg btn-style btn-style-active btn_submit" onClick="return fsubmit();" name="xu_ly">Đăng ký tài khoản</button>
</fieldset>
<div class="bt_login a-left other_ways">
<span class="hai_tk">Bạn đã có tài khoản ?<a href="#" class="btn-link-style login_btn" title="Đăng nhập"> Đăng nhập tại đây</a></span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function fsubmit() {
var ho_ten=document.getElementById('ho_ten').value;
var regex_ho_ten =/^[a-z A-Z_ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚĂĐĨŨƠàáâãèéêìíòóôõùúăđĩũơƯĂẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼỀỀỂưăạảấầẩẫậắằẳẵặẹẻẽềềểỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪễệỉịọỏốồổỗộớờởỡợụủứừỬỮỰỲỴÝỶỸửữựỳỵỷỹ]{5,50}$/;
var result_ho_ten=regex_ho_ten.test(ho_ten);
if (result_ho_ten== false) {
document.getElementById('bao_loi_ho_ten').innerHTML = 'Sai định dạng họ tên';
document.getElementById('ho_ten').focus();
return false;
}
else{
document.getElementById('bao_loi_ho_ten').style.display='none';
document.getElementById('tick').style.display='block';
}
var gmail=document.getElementById('gmail').value;
var regex_gmail =/[A-Z0-9._%+-]+@[A-Z0-9-]+.+.[A-Z]{2,4}/igm;
var result_gmail=regex_gmail.test(gmail);
if (result_gmail== false) {
document.getElementById('bao_loi_gmail').innerHTML = 'Sai định dạng Email';
document.getElementById('gmail').focus();
return false;
}
else{
document.getElementById('bao_loi_gmail').style.display='none';
document.getElementById('tick1').style.display='block';
}
var mat_khau=document.getElementById('mat_khau').value;
var regex_mat_khau =/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{5,}$/;
var result_mat_khau=regex_mat_khau.test(mat_khau);
if (result_mat_khau== false) {
document.getElementById('bao_loi_mat_khau').innerHTML = 'Mật khẩu ít nhất 8 ký tự';
document.getElementById('mat_khau').focus();
return false;
}
else{
document.getElementById('bao_loi_mat_khau').style.display='none';
document.getElementById('tick2').style.display='block';
}
var nl_mat_khau=document.getElementById('nl_mat_khau').value;
var mat_khau=document.getElementById('mat_khau').value;
if (mat_khau=nl_mat_khau) {
document.getElementById('bao_loi_nl_mat_khau').style.display='none';
document.getElementById('tick3').style.display='block';
}
else {
document.getElementById('bao_loi_nl_mat_khau').innerHTML = 'Mật khẩu không trùng nhau';
document.getElementById('bao_loi_nl_mat_khau').focus();
return false;
}
var dia_chi=document.getElementById('dia_chi').value;
var regex_dia_chi=/^[a-z\,\ ]{5,25}[a-z\,\ ]{5,30}$/i;
var result_dia_chi=regex_dia_chi.test(dia_chi);
if (result_dia_chi== false) {
document.getElementById('bao_loi_dia_chi').innerHTML = 'Địa chỉ không hợp lệ';
document.getElementById('dia_chi').focus();
return false;
}
else{
document.getElementById('bao_loi_dia_chi').style.display='none';
document.getElementById('tick4').style.display='block';
}
var sdt=document.getElementById('sdt').value;
var regex_sdt=/^\+?\d{1,3}?[- .]?\(?(?:\d{2,3})\)?[- .]?\d\d\d[- .]?\d\d\d\d$/;
var result_sdt=regex_sdt.test(sdt);
if (result_sdt== false) {
document.getElementById('bao_loi_sdt').innerHTML = 'Nhập sai số điện thoại';
document.getElementById('sdt').focus();
return false;
}
else{
document.getElementById('bao_loi_sdt').style.display='none';
document.getElementById('tick5').style.display='block';
}
}
// _____________Chuyển form đăng ký đăng nhập_________
function login_click(){
$("#login_popup").show();
$("#recover-password").hide();
$("#login").show();
$("#register_popup").hide();
$('.other_action a').addClass('register_btn').removeClass('login_btn').attr('title','Đăng ký').text('Đăng ký').val('Đăng ký');
}
function register_click(){
$("#register_popup").show();
$("#login_popup").hide();
$('.other_action a').addClass('login_btn').removeClass('register_btn').attr('title','Đăng nhập').text('Đăng nhập').val('Đăng nhập');
}
$('.login_btn').on('click', function(){
login_click();
});
$(".register_btn").on('click', function(){
register_click();
});
$(".login_register .hai_tk .login_btn").on('click', function(){
$('#login_register').addClass('fix_height_login');
});
$(".login_register .hai_tk .register_btn").on('click', function(){
$('#login_register').removeClass('fix_height_login');
});
$(".list-inline li .login_btn").on('click', function(){
$('#login_register').addClass('fix_height_login');
});
$(".list-inline li .register_btn").on('click', function(){
$('#login_register').removeClass('fix_height_login');
});
</script>
</header>
<section class="awe-section-1">
<div class="home-slider owl-carousel owl-theme not-aweowl owl-loaded owl-drag">
<div class="owl-stage-outer"></div><div class="owl-nav disabled"><div class="owl-prev disabled">prev</div><div class="owl-next">next</div></div><div class="owl-dots"><div class="owl-dot active"><span></span></div><div class="owl-dot"><span></span></div></div></div>
</section>
<div class="container">
<div class="row row-noGutter-2">
<section class="main_container collection margin-bottom-30 col-lg-12">
<!-- __________________Tên danh mục_______________ -->
<div class="text-sm-left">
<h1 class="title-head margin-top-0">GIỎ HÀNG CỦA BẠN</h1>
</div>
</div>
</aside>
<?php
if(!empty($_SESSION['gio_hang'])){
?>
<div class="category-products products">
<section class="products-view products-view-grid collection_reponsive">
<div class="row row-noGutter-2 content_col">
<section class="main-cart-page main-container col1-layout">
<div class="main container hidden-xs">
<!-- <div class="header-cart" style="background:#fff;">
<div class="title-cart">
<h3>Giỏ hàng của bạn có <span class="count_cart_h count_item count_item_pr">1</span> sản phẩm <i class="fa fa-caret-right" aria-hidden="true"></i></h3>
</div>
</div> -->
<div class="col-main cart_desktop_page cart-page">
<div class="cart page_cart hidden-xs">
<form class="margin-bottom-0">
<div class="bg-scroll">
<div class="cart-thead">
<div style="width: 17%">Ảnh sản phẩm</div>
<div style="width: 33%"><span class="nobr">Tên sản phẩm</span>
</div>
<div style="width: 15%" class="a-center"><span class="nobr">Đơn giá</span>
</div>
<div style="width: 14%" class="a-center">Số lượng</div>
<div style="width: 15%" class="a-center">Thành tiền</div>
<div style="width: 6%">Xoá</div></div>
<?php
$tong = 0;
foreach ($_SESSION['gio_hang'] as $ma_san_pham => $tung_san_pham) {
?>
<div class="cart-tbody">
<div class="item-cart productid-15526574">
<div style="width: 17%" class="image">
<a class="product-image" >
<img width="75" height="auto" src="../khachhang/dashboard/san_phamx/<?php echo $tung_san_pham['anh'] ?>">
</a>
</div>
<div style="width: 33%" class="a-center prd_name">
<h2 class="product-name">
<a class="text2line" href="/op-lung-iphone-6-6s-memo-totem"><?php echo $tung_san_pham['ten_san_pham'] ?></a>
</h2><span class="variant-title" style="display: none;">Default Title</span></div><div style="width: 15%" class="a-center">
<span class="item-price"> <span class="price"><?php echo number_format($tung_san_pham['gia'],0)."₫" ?></span>
</span></div>
<div style="width: 14%" class="a-center"><div class="input_qty_pr">
<div class="input_qty_pr">
<input class="variantID" type="hidden" name="variantId">
<a href="thay_doi_so_luong_san_pham_trong_gio_hang.php?kieu=tru&ma_san_pham=<?php echo $ma_san_pham ?>">
<button class="reduced_pop items-count btn-minus" type="button">–</button>
</a>
<input type="text" maxlength="12" min="1" class="input-text number-sidebar input_pop input_pop qtyItem15526574" id="qtyItem15526574" name="Lines" size="4" value="<?php echo $tung_san_pham['so_luong']; ?>">
<a href="thay_doi_so_luong_san_pham_trong_gio_hang.php?kieu=cong&ma_san_pham=<?php echo $ma_san_pham; ?>">
<button class="increase_pop items-count btn-plus" type="button">+</button>
</a>
</div>
</div></div>
<?php
$tien_tung_san_pham = $tung_san_pham['gia']*$tung_san_pham['so_luong'];
?>
<div style="width: 15%" class="a-center"><span class="cart-price"> <span class="price"><?php echo number_format($tien_tung_san_pham,0)."₫"; ?></span> </span></div>
<div style="width: 6%">
<a class="button remove-item remove-item-cart" title="Xóa" href="xoa_san_pham_trong_gio_hang.php?ma_san_pham=<?php echo $ma_san_pham ?>" data-id="15526574">
<span><i class="fa fa-times" aria-hidden="true"></i></span></a>
</div>
</div>
<?php
$tong += $tung_san_pham['gia']*$tung_san_pham['so_luong'];
if ($tong>10000000) {
echo "<script>alert('Bạn hãy liên hệ chúng tôi để xác nhận đơn hàng'); window.location='index.php';</script>";
}
}
?>
</div></div></form>
<div class="cart-collaterals cart_submit row"><div class="totals col-sm-12 col-md-12 col-xs-12"><div class="totals">
<div class="inner">
<table class="table shopping-cart-table-total margin-bottom-0" id="shopping-cart-totals-table">
<colgroup><col><col></colgroup>
<tfoot><tr><td colspan="20" class="a-right">
<span>Tổng tiền:</span></td><td class="a-right"><strong><span class="totals_price price"><?php echo number_format($tong,0)."₫" ?></span></strong></td></tr></tfoot>
</table>
<?php
}
else{
?>
<h1>Không có sản phẩm nào trong giỏ hàng</h1>
<?php } ?>
<ul class="checkout">
<li class="clearfix f-right">
<a href="xoa_gio_hang.php">
<button class="btn btn-white f-left" title="Xóa Giỏ Hàng" type="button" onclick="window.location.href='xem_gio_hang.php'">
<span>Xóa Giỏ Hàng</span></button>
</a>
<button class="btn btn-white f-left" title="Tiếp tục mua hàng" type="button" onclick="window.location.href='index.php'">
<span>Tiếp tục mua hàng</span></button>
<button class="btn btn-primary button btn-proceed-checkout f-right" title="Thực hiện thanh toán" type="button" onclick="window.location.href='dat_hang.php'"><span>Thực hiện thanh toán</span></button></li></ul>
</div>
</div>
</div>
</div>
</div></div>
</div>
<div class="cart-mobile hidden-md hidden-lg hidden-sm">
<form action="/cart" method="post" novalidate="" class="margin-bottom-0">
<div class="header-cart" style="background:#fff;">
<div class="title-cart">
<h3>Giỏ hàng của bạn</h3>
</div>
</div>
</form>
</div>
</section>
<div class="text-center">
</div>
</section>
</div>
</section>
</div>
</div>
<link href="https://bizweb.dktcdn.net/100/289/371/themes/634361/assets/bpr-products-module.css?1524126221691" rel="stylesheet" type="text/css">
<div class="bizweb-product-reviews-module"></div>
<!-- _____________CHÂN TRANG____________ -->
<footer class="footer">
<div class="site-footer">
<div class="top-footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<div class="widget-ft">
<h4 class="title-menu">
<a role="button" class="collapsed" data-toggle="collapse" aria-expanded="false" data-target="#collapseListMenu01" aria-controls="collapseListMenu01">
Hệ thống cửa hàng <i class="fa fa-plus" aria-hidden="true"></i>
</a>
</h4>
<div class="collapse" id="collapseListMenu01">
<div class="list-menu">
<div class="widget-ft wg-logo">
<div class="item">
<h4 class="title-menu4 icon_none_first">
<a>Digiworld Đội Cấn</a>
</h4>
<ul class="contact contact_x">
<li>
<span class="txt_content_child">
<span>Địa chỉ:</span>
Tầng 8 Ladeco, 266 Đội Cấn, Hà Nội
</span>
</li>
<li class="sdt">
<span> Hotline:</span>
<a href="tel:(04)66742332">(04)66742332</a>
</li>
</ul>
</div>
<div class="item">
<h4 class="title-menu4 icon_none_first">
<a>Digiwolrd Thái Hà</a>
</h4>
<ul class="contact contact_x">
<li>
<span class="txt_content_child">
<span>Địa chỉ:</span>
365 Thái Hà, Đống Đa, Hà Nội, Hà Nội
</span>
</li>
<li class="sdt">
<span> Hotline:</span>
<a href="tel:0968688989">0968688989</a>
</li>
</ul>
</div>