-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinicio-instantaneo.php
1047 lines (995 loc) · 60 KB
/
inicio-instantaneo.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();
if (isset($_SESSION['correo']) || !empty($_SESSION['correo'])) {
$id = $_SESSION["correo"];
$conexion = mysqli_connect("sql302.byethost13.com", "b13_36951409", "benjamin5");
mysqli_select_db($conexion, "b13_36951409_proyecto");
$consulta2 = 'SELECT * FROM usuario';
$usuarios = mysqli_query($conexion, $consulta2);
while ($reg = mysqli_fetch_array($usuarios)) {
if ($id == $reg['correo'] || $id == $reg['nombre']) {
$_SESSION["id"] = $reg['id'];
break;
}
}
$consulta2 = "SELECT * FROM usuario WHERE `id` = '{$_SESSION["id"]}'";
$consulta2_1 = mysqli_query($conexion, $consulta2);
$_SESSION = mysqli_fetch_array($consulta2_1);
$usuario = $_SESSION;
$usuario_id = $_SESSION['id']; }
$conexion = mysqli_connect("sql302.byethost13.com", "b13_36951409", "benjamin5");
mysqli_select_db($conexion, "b13_36951409_proyecto");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PlayONRetro</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="author" content="">
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="css/vendor.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
$conexion = mysqli_connect("sql302.byethost13.com", "b13_36951409", "benjamin5");
mysqli_select_db($conexion, "b13_36951409_proyecto");
$consulta1='SELECT * FROM productos';
$productos= mysqli_query($conexion, $consulta1);; ?>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<defs>
<symbol xmlns="http://www.w3.org/2000/svg" id="link" viewBox="0 0 24 24">
<path fill="currentColor" d="M12 19a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0-4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm-5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm7-12h-1V2a1 1 0 0 0-2 0v1H8V2a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Zm1 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9h16Zm0-11H4V6a1 1 0 0 1 1-1h1v1a1 1 0 0 0 2 0V5h8v1a1 1 0 0 0 2 0V5h1a1 1 0 0 1 1 1ZM7 15a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0 4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="arrow-right" viewBox="0 0 24 24">
<path fill="currentColor" d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="category" viewBox="0 0 24 24">
<path fill="currentColor" d="M19 5.5h-6.28l-.32-1a3 3 0 0 0-2.84-2H5a3 3 0 0 0-3 3v13a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-10a3 3 0 0 0-3-3Zm1 13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-13a1 1 0 0 1 1-1h4.56a1 1 0 0 1 .95.68l.54 1.64a1 1 0 0 0 .95.68h7a1 1 0 0 1 1 1Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="calendar" viewBox="0 0 24 24">
<path fill="currentColor" d="M19 4h-2V3a1 1 0 0 0-2 0v1H9V3a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm1 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7h16Zm0-9H4V7a1 1 0 0 1 1-1h2v1a1 1 0 0 0 2 0V6h6v1a1 1 0 0 0 2 0V6h2a1 1 0 0 1 1 1Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="heart" viewBox="0 0 24 24">
<path fill="currentColor" d="M20.16 4.61A6.27 6.27 0 0 0 12 4a6.27 6.27 0 0 0-8.16 9.48l7.45 7.45a1 1 0 0 0 1.42 0l7.45-7.45a6.27 6.27 0 0 0 0-8.87Zm-1.41 7.46L12 18.81l-6.75-6.74a4.28 4.28 0 0 1 3-7.3a4.25 4.25 0 0 1 3 1.25a1 1 0 0 0 1.42 0a4.27 4.27 0 0 1 6 6.05Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="plus" viewBox="0 0 24 24">
<path fill="currentColor" d="M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="minus" viewBox="0 0 24 24">
<path fill="currentColor" d="M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="cart" viewBox="0 0 24 24">
<path fill="currentColor" d="M8.5 19a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 8.5 19ZM19 16H7a1 1 0 0 1 0-2h8.491a3.013 3.013 0 0 0 2.885-2.176l1.585-5.55A1 1 0 0 0 19 5H6.74a3.007 3.007 0 0 0-2.82-2H3a1 1 0 0 0 0 2h.921a1.005 1.005 0 0 1 .962.725l.155.545v.005l1.641 5.742A3 3 0 0 0 7 18h12a1 1 0 0 0 0-2Zm-1.326-9l-1.22 4.274a1.005 1.005 0 0 1-.963.726H8.754l-.255-.892L7.326 7ZM16.5 19a1.5 1.5 0 1 0 1.5 1.5a1.5 1.5 0 0 0-1.5-1.5Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="check" viewBox="0 0 24 24">
<path fill="currentColor" d="M18.71 7.21a1 1 0 0 0-1.42 0l-7.45 7.46l-3.13-3.14A1 1 0 1 0 5.29 13l3.84 3.84a1 1 0 0 0 1.42 0l8.16-8.16a1 1 0 0 0 0-1.47Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="trash" viewBox="0 0 24 24">
<path fill="currentColor" d="M10 18a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1ZM20 6h-4V5a3 3 0 0 0-3-3h-2a3 3 0 0 0-3 3v1H4a1 1 0 0 0 0 2h1v11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V8h1a1 1 0 0 0 0-2ZM10 5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1h-4Zm7 14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8h10Zm-3-1a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="star-outline" viewBox="0 0 15 15">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.5 9.804L5.337 11l.413-2.533L4 6.674l2.418-.37L7.5 4l1.082 2.304l2.418.37l-1.75 1.793L9.663 11L7.5 9.804Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="star-solid" viewBox="0 0 15 15">
<path fill="currentColor" d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z"/>
</symbol>
<symbol xmlns="http://www. w3.org/2000/svg" id="search" viewBox="0 0 24 24">
<path fill="currentColor" d="M21.71 20.29L18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 7-7a7 7 0 0 1-7 7Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="user" viewBox="0 0 24 24">
<path fill="currentColor" d="M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4Z"/>
</symbol>
<symbol xmlns="http://www.w3.org/2000/svg" id="close" viewBox="0 0 15 15">
<path fill="currentColor" d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z"/>
</symbol>
</defs>
</svg>
<!-- EMPIEZA SITIO -->
<!-- CARRITO -->
<?php if (!isset($_SESSION['id']) || empty($_SESSION['id']) || $_SESSION['id'] == '') { ?>
<div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasCart" aria-labelledby="My Cart">
<div class="offcanvas-header justify-content-center">
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="order-md-last">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-primary">Tu Carrito</span>
<span class="badge bg-primary rounded-pill">0</span>
</h4>
<?php
echo "<h3>Para ver los productos que tienes en el carrito debes iniciar sesión en tu cuenta de <strong>PlayONRetro.</strong> </h3>";
echo '<br><a class="btn btn-secondary" data-bs-dismiss="offcanvas" aria-label="Close" >Volver a la página <strong>PRINCIPAL</strong>.</a>';
echo '<a href="login_html.php" class="btn btn-success">Iniciar Sesión</a>';
echo '<br><br><label for="no-tener">¿No tienes una cuenta?</label><a href="signup_html.php" class="btn btn-info"> Registrarse </a>';; ?>
</div>
</div>
</div> <?php } else {?>
<div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasCart" aria-labelledby="My Cart">
<div class="offcanvas-header justify-content-center">
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="order-md-last">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-primary">Tu Carrito</span>
<?php
$usuario_id = $_SESSION['id'];
$carrito_query = "SELECT * FROM carrito WHERE usuario_id = $usuario_id";
$carrito_result = mysqli_query($conexion, $carrito_query);
$cantidad_total= 0;
while ($carrito2 = mysqli_fetch_array($carrito_result)) {
$cantidad_total= $cantidad_total + $carrito2['cantidad'];
}
?>
<span class="badge bg-primary rounded-pill"> <?php echo $cantidad_total; ?> </span>
</h4>
<ul class="list-group mb-3">
<?php
$usuario_id = $_SESSION['id'];
$carrito_query = "SELECT * FROM carrito WHERE usuario_id = $usuario_id";
$carrito_result = mysqli_query($conexion, $carrito_query);
$cantidad_total= 0;
$total_carrito= 0;
while ($carrito = mysqli_fetch_array($carrito_result)) {
$producto_id = $carrito['producto_id'];
$producto_query = "SELECT * FROM productos WHERE id = $producto_id";
$producto_result = mysqli_query($conexion, $producto_query);
while ($producto = mysqli_fetch_array($producto_result)) {
?>
<form method="post" action="carrito_borrar.php">
<li class="list-group-item d-flex justify-content-between lh-sm">
<div>
<h6 class="my-0"><?php echo $producto['nombre']; ?></h6>
<small class="text-body-secondary"><?php echo $producto['descripcion']; ?></small>
</div>
<span class="text-body-secondary"><?php echo "$" . $producto['precio'] . "x" . "<strong>" . $carrito['cantidad'] . "</strong>"; ?></span>
<?php $total_carrito = $total_carrito + ($producto['precio'] * $carrito['cantidad']); ?>
<input type="hidden" name="producto_id" value="<?php echo $producto_id; ?>">
<button type="submit" class="btn btn-danger">Borrar</button>
</li>
</form>
<?php
}
}
?>
</ul>
<label for="total"><?php echo "<strong>TOTAL a pagar: </strong>" . "$" . $total_carrito; ?></label>
<button class="w-100 btn btn-primary btn-lg" type="submit">Comprar</button>
</div>
</div>
</div> <?php }; ?>
<!-- SOLO CELU -->
<!-- LINK BUSQUEDA CELU-->
<div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasSearch" aria-labelledby="Search">
<div class="offcanvas-header justify-content-center">
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="order-md-last">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-primary">Buscar</span>
</h4>
<form id="search-form" class="w-100 d-flex align-items-center" action="busqueda.php" method="get">
<select name="tipo" class="form-select border-0 bg-transparent me-2">
<option value="">Todas las categorías</option>
<option value="Consolas">Consolas</option>
<option value="Juegos">Juegos</option>
<option value="Ropa">Ropa</option>
<option value="Accesorios">Accesorios</option>
</select>
<br>
<input type="hidden" name="ordenar_por" value="ORDER BY estrellas DESC">
<input name="nombre" type="text" class="form-control border-0 bg-transparent me-2" placeholder="¡Puedes buscar entre más de 60 productos!" />
<br>
<button type="submit" class="btn border-0 bg-transparent p-0">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="currentColor" d="M21.71 20.29L18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 7-7a7 7 0 0 1-7 7Z"/>
</svg>
</button>
</form>
</div>
</div>
</div>
<!-- LOGO -->
<header>
<div class="container-fluid">
<div class="row py-3 border-bottom">
<div class="col-sm-4 col-lg-1 text-center text-sm-start">
<div class="main-logo">
<a href="index.php">
<img src="images/logo.png" alt="logo" class="img-fluid">
</a>
</div>
</div>
<!-- BUSCADOR -->
<div class="col-sm-6 offset-sm-2 offset-md-0 col-lg-6 d-none d-lg-block">
<div class="search-bar d-flex bg-light p-2 my-2 rounded-4 align-items-center">
<form id="search-form" class="w-100 d-flex align-items-center" action="busqueda.php" method="get">
<select name="tipo" class="form-select border-0 bg-transparent me-2">
<option value="">Todas las categorías</option>
<option value="Consolas">Consolas</option>
<option value="Juegos">Juegos</option>
<option value="Ropa">Ropa</option>
<option value="Accesorios">Accesorios</option>
</select>
<br>
<input type="hidden" name="ordenar_por" value="ORDER BY estrellas DESC">
<input name="nombre" type="text" class="form-control border-0 bg-transparent me-2" placeholder="¡Puedes buscar entre más de 60 productos!" />
<br>
<button type="submit" class="btn border-0 bg-transparent p-0">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="currentColor" d="M21.71 20.29L18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 7-7a7 7 0 0 1-7 7Z"/>
</svg>
</button>
</form>
</div>
</div>
<!-- INFO CONTACTO -->
<div class="col-sm-8 col-lg-5 d-flex justify-content-end gap-5 align-items-center mt-4 mt-sm-0 justify-content-center justify-content-sm-end">
<div class="support-box text-end d-none d-xl-block">
<span class="fs-6 text-muted">¿Te ayudamos?</span>
<a href="https://wa.me/+542915341257" target="_blank">
<h5 class="mb-0">+54 - 9 2915341257</h5>
</a>
</div>
<ul class="d-flex justify-content-end list-unstyled m-0">
<!-- FOTO PERFIL -->
<li>
<a href="mi-perfil.php" class="rounded-circle bg-light p-2 mx-1">
<?php if (!isset($usuario['icono']) || empty($usuario['icono'])) {?>
<!-- Si no hay un icono en la sesión, se muestra el icono por defecto -->
<svg width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#user"></use></svg>
<?php } else { ?>
<img src="data:image/png;base64, <?php echo base64_encode($usuario['icono']); ?>" alt="NA" width="30px" height="30px">
<?php }; ?>
</a>
</li>
<!-- FAVORITOS-->
<li>
<a href="favoritos_html.php" class="rounded-circle bg-light p-2 mx-1">
<svg width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#heart"></use></svg>
</a>
</li>
<!-- SOLO CELU -->
<!-- CARRITO -->
<li class="d-lg-none">
<a href="#" class="rounded-circle bg-light p-2 mx-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasCart" aria-controls="offcanvasCart">
<svg width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#cart"></use></svg>
</a>
</li>
<!-- BUSQUEDA -->
<li class="d-lg-none">
<a href="#" class="rounded-circle bg-light p-2 mx-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasSearch" aria-controls="offcanvasSearch">
<svg width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#search"></use></svg>
</a>
</li>
</ul>
<!-- CARRITO -->
<div class="cart text-end d-none d-lg-block dropdown">
<button class="border-0 bg-transparent d-flex flex-column gap-2 lh-1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasCart" aria-controls="offcanvasCart">
<span class="fs-6 text-muted dropdown-toggle">Tu Carrito</span>
<span class="cart-total fs-5 fw-bold"><?php if (!isset($_SESSION['id']) || empty($_SESSION['id']) || $_SESSION['id'] == '') { echo "$ " . 0 . ".00"; } else echo "$ " . $total_carrito . ".00";?> </span>
</button>
</div>
<!-- BOTON INICIAR SESION -->
<?php if (isset($_SESSION['id'])) { ?>
<a class="btn btn-dark btn-lg" href="cerrarsesion.php">Cerrar Sesión</a>
<?php } else { ?>
<a class="btn btn-dark btn-lg" href="login_html.php">Iniciar Sesion</a>
<?php }; ?>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row py-3">
<div class="d-flex justify-content-center justify-content-sm-between align-items-center">
<nav class="main-menu d-flex navbar navbar-expand-lg">
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar"
aria-controls="offcanvasNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header justify-content-center">
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<!-- NAVEGADOR -->
<div class="offcanvas-body">
<ul class="navbar-nav justify-content-end menu-list list-unstyled d-flex gap-md-3 mb-0">
<li class="nav-item active">
<a href="consolas.php" class="nav-link">Consolas</a>
</li>
<li class="nav-item dropdown">
<a href="juegos.php" class="nav-link">Juegos</a>
</li>
<li class="nav-item">
<a href="ropa.php" class="nav-link">Ropa</a>
</li>
<li class="nav-item">
<a href="accesorios.php" class="nav-link">Accesorios</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" role="button" id="pages" data-bs-toggle="dropdown" aria-expanded="false">Marcas</a>
<ul class="dropdown-menu" aria-labelledby="pages">
<form method="get" action="marca.php">
<?php
// La consulta SQL
$sql = "SELECT DISTINCT marca FROM productos";
// Ejecutar la consulta
$result = $conexion->query($sql);
while ($row = $result->fetch_assoc()) {
$marca2 = $row["marca"];
// Contar el número de productos para cada marca
$consulta2 = "SELECT COUNT(*) AS total FROM productos WHERE marca = '$marca2'";
$resultado2 = $conexion->query($consulta2);
$datos2 = $resultado2->fetch_assoc();
$numeromarca = $datos2['total'];
echo "<li><button type='submit' name='marca' value='$marca2' class='dropdown-item'>$marca2 ($numeromarca)</button></li>";
}
?>
</form>
<li><a href="playonretro.php" class="dropdown-item">PlayONRetro<span class="badge bg-success text-dark ms-2">Propia</span></a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
</header>
<!-- PRODUCTOS POPULARES -->
<section class="py-5 overflow-hidden">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="section-header d-flex justify-content-between">
<h2 class="section-title">Productos Populares</h2>
<div class="d-flex align-items-center">
<a href="popular.php">Ver mas</a>
<div class="swiper-buttons">
<button class="swiper-prev products-carousel-prev btn btn-primary">❮</button>
<button class="swiper-next products-carousel-next btn btn-primary">❯</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php
$populares2="SELECT * FROM productos WHERE estrellas >= 4 ORDER BY cant_vendidas DESC LIMIT 10";
$populares= mysqli_query($conexion, $populares2);
?>
<div class="products-carousel swiper">
<div class="swiper-wrapper">
<?php while ($reg = mysqli_fetch_array($populares)) {
if ($reg['estrellas'] >= 4) { ?>
<div class="product-item swiper-slide">
<?php if ($reg['descuento'] > 0) { ?>
<span class="badge bg-success position-absolute m-3">- <?php echo ucwords($reg['descuento']); ?>%</span>
<?php } ?>
<form method="post" action="favoritos.php">
<?php $producto_id=$reg['id']; ?>
<input name="id" type="hidden" value="<?php echo $reg['id'];?>">
<button type="submit" href="single-product.html" title="<?php echo ucwords($reg['nombre']) ?>" class="btn-wishlist <?php
$consultafav = " SELECT * FROM favoritos WHERE usuario_id='$usuario_id' AND producto_id='$producto_id' ";
$verificacion = mysqli_query($conexion, $consultafav);
if (mysqli_num_rows($verificacion) > 0) {
echo "active "; }
?>">
<svg width="24" height="24"><use xlink:href="#heart"></use></svg>
</button>
</form>
<figure>
<div id="carousel_<?php echo $reg['id']; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen1'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen2'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</figure>
<h3><?php echo ucwords($reg['nombre']) ?></h3>
<span class="qty">1 Unidad</span>
<span class="rating">
<svg width="24" height="24" class="text-primary"><use xlink:href="#star-solid"></use></svg>
<?php echo ucwords($reg['estrellas']) ?>
</span>
<div class="precio-container">
<?php if ($reg['descuento'] > 0) { ?>
<br><s class="precio">$<?php echo ucwords($reg['precio']) ?> </s>
<span class="price precio">$<?php echo number_format($reg['precio'] * ((100 - $reg['descuento']) / 100), 0) ?></span>
<?php } else { ?>
<span class="price">$<?php echo number_format($reg['precio']) ?></span>
<?php } ?>
</div>
<div class="card-footer">
<form method="post" action="carrito.php">
<div class="input-group product-qty">
<span class="input-group-btn">
<button type="button" class="quantity-left-minus btn btn-danger btn-number" data-type="minus">
<svg width="16" height="16"><use xlink:href="#minus"></use></svg>
</button>
</span>
<input type="text" id="quantity" name="cantidad" class="form-control input-number" value="1">
<span class="input-group-btn">
<button type="button" class="quantity-right-plus btn btn-success btn-number" data-type="plus">
<svg width="16" height="16"><use xlink:href="#plus"></use></svg>
</button>
</span>
</div>
<input name="id" type="hidden" value="<?php echo $reg['id']; ?>">
<button type="submit" class="btn btn-dark">Agregar al Carrito <iconify-icon icon="uil:shopping-cart"></iconify-icon></button>
</form>
</div>
</div>
<?php }
}; ?>
</div>
</div>
</div>
</div>
</div>
</section>
<?php if (!isset($_SESSION['id']) || empty($_SESSION['id']) || $_SESSION['id'] == '') { ?>
<!-- CUENTA -->
<section class="py-5">
<div class="container-fluid">
<div class="bg-secondary py-5 my-5 rounded-5" style="background: url('images/bg-leaves-img-pattern.png') no-repeat;">
<div class="container my-5">
<div class="row">
<div class="col-md-6 p-5">
<div class="section-header">
<h2 class="section-title display-4">Obten un <span class="text-primary">25% de Descuento</span> tu primer compra</h2>
</div>
<p>Crea una cuenta en nuestro sitio y suscríbite a nuestro boletín para recibir información actualizada sobre nuestras grandes ofertas y ademas obtener un gran DESCUENTO!!</p>
</div>
<div class="col-md-6 p-5">
<form action="signup.php" method="post">
<div class="mb-3">
<label for="name" class="form-label">Nombre</label>
<input type="text"
class="form-control form-control-lg" name="name" id="name" placeholder="Usuario">
</div>
<div class="mb-3">
<label for="" class="form-label">Correo</label>
<input type="email" class="form-control form-control-lg" name="email" id="email" placeholder="[email protected]">
</div>
<div class="mb-3">
<label for="" class="form-label">Contraseña</label>
<input type="password" class="form-control form-control-lg" name="pass" id="pass" placeholder="Contraseña">
<br>
<input type="password" class="form-control form-control-lg" placeholder="Repita la contraseña" name="confirm_pass" required>
</div>
<div class="form-check form-check-inline mb-3">
<label class="form-check-label" for="subscribe">
<input class="form-check-input" type="checkbox" id="subscribe" name="subscribe" value="1">
Suscribirse a PlayONRetro</label>
</div>
<div class="d-grid gap-2">
<button type="submit" class="btn btn-dark btn-lg">Enviar</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<?php }; ?>
<!-- CATEGORIAS -->
<section class="py-5 overflow-hidden">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="section-header d-flex flex-wrap justify-content-between mb-5">
<h2 class="section-title">Categorias</h2>
<div class="d-flex align-items-center">
<div class="swiper-buttons">
<button class="swiper-prev category-carousel-prev btn btn-yellow">❮</button>
<button class="swiper-next category-carousel-next btn btn-yellow">❯</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="category-carousel swiper">
<div class="swiper-wrapper">
<a href="consolas.php" class="nav-link category-item swiper-slide">
<img width="50px" height="50px" src="images/consolas.png" alt="Category Thumbnail">
<h3 class="category-title">Consolas</h3>
</a>
<a href="juegos.php" class="nav-link category-item swiper-slide">
<img width="50px" height="50px" src="images/juegos.png" alt="Category Thumbnail">
<h3 class="category-title">Juegos</h3>
</a>
<a href="ropa.php" class="nav-link category-item swiper-slide">
<img width="50px" height="50px" src="images/ropa.png" alt="Category Thumbnail">
<h3 class="category-title">Ropa</h3>
</a>
<a href="accesorios.php" class="nav-link category-item swiper-slide">
<img width="50px" height="50px" src="images/accesorios.png" alt="Category Thumbnail">
<h3 class="category-title">Accesorios</h3>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- TODOS LOS PRODUCTOS-->
<section class="py-5">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="bootstrap-tabs product-tabs">
<div class="tabs-header d-flex justify-content-between border-bottom my-5">
<h1>Productos en venta </h1>
<a href="todos.php">Ver mas</a>
</div>
<br>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-all" role="tabpanel" aria-labelledby="nav-all-tab">
<div class="product-grid row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5">
<?php
$consulta40="SELECT * FROM productos ORDER BY estrellas DESC LIMIT 10";
$productos_todos= mysqli_query($conexion, $consulta40);
while ($reg = mysqli_fetch_array($productos_todos)) {
?>
<div class="product-item swiper-slide">
<?php if ($reg['descuento'] > 0) { ?>
<span class="badge bg-success position-absolute m-3">- <?php echo ucwords($reg['descuento']); ?>%</span>
<?php } ?>
<form method="post" action="favoritos.php">
<?php $producto_id=$reg['id']; ?>
<input name="id" type="hidden" value="<?php echo $reg['id'];?>">
<button type="submit" href="single-product.html" title="<?php echo ucwords($reg['nombre']) ?>" class="btn-wishlist <?php
$consultafav = " SELECT * FROM favoritos WHERE usuario_id='$usuario_id' AND producto_id='$producto_id' ";
$verificacion = mysqli_query($conexion, $consultafav);
if (mysqli_num_rows($verificacion) > 0) {
echo "active "; }
?>">
<svg width="24" height="24"><use xlink:href="#heart"></use></svg>
</button>
</form>
<figure>
<div id="carousel_<?php echo $reg['id']; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen1'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen2'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</figure>
<h3><?php echo ucwords($reg['nombre']) ?></h3>
<span class="qty">1 Unidad</span>
<span class="rating">
<svg width="24" height="24" class="text-primary"><use xlink:href="#star-solid"></use></svg>
<?php echo ucwords($reg['estrellas']) ?>
</span>
<div class="precio-container">
<?php if ($reg['descuento'] > 0) { ?>
<br><s class="precio">$<?php echo ucwords($reg['precio']) ?> </s>
<span class="price precio">$<?php echo number_format($reg['precio'] * ((100 - $reg['descuento']) / 100), 0) ?></span>
<?php } else { ?>
<span class="price">$<?php echo number_format($reg['precio']) ?></span>
<?php } ?>
</div>
<div class="card-footer">
<form method="post" action="carrito.php">
<div class="input-group product-qty">
<span class="input-group-btn">
<button type="button" class="quantity-left-minus btn btn-danger btn-number" data-type="minus">
<svg width="16" height="16"><use xlink:href="#minus"></use></svg>
</button>
</span>
<input type="text" id="quantity" name="cantidad" class="form-control input-number" value="1">
<span class="input-group-btn">
<button type="button" class="quantity-right-plus btn btn-success btn-number" data-type="plus">
<svg width="16" height="16"><use xlink:href="#plus"></use></svg>
</button>
</span>
</div>
<input name="id" type="hidden" value="<?php echo $reg['id']; ?>">
<button type="submit" class="btn btn-dark">Agregar al Carrito <iconify-icon icon="uil:shopping-cart"></iconify-icon></button>
</form>
</div>
</div>
<?php
};
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- OFERTAS -->
<section class="py-5 overflow-hidden">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="section-header d-flex flex-wrap justify-content-between my-5">
<h2 class="section-title">En OFERTA!</h2>
<div class="d-flex align-items-center">
<div class="swiper-buttons">
<button class="swiper-prev products-carousel-prev btn btn-primary">❮</button>
<button class="swiper-next products-carousel-next btn btn-primary">❯</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="products-carousel swiper">
<div class="swiper-wrapper">
<?php
$consulta1 = 'SELECT * FROM productos WHERE descuento > 0 LIMIT 8';
$productos = mysqli_query($conexion, $consulta1);
while ($reg = mysqli_fetch_array($productos)):?>
<div class="product-item swiper-slide">
<?php if ($reg['descuento'] > 0) { ?>
<span class="badge bg-success position-absolute m-3">- <?php echo ucwords($reg['descuento']); ?>%</span>
<?php } ?>
<form method="post" action="favoritos.php">
<?php $producto_id=$reg['id']; ?>
<input name="id" type="hidden" value="<?php echo $reg['id'];?>">
<button type="submit" href="single-product.html" title="<?php echo ucwords($reg['nombre']) ?>" class="btn-wishlist <?php
$consultafav = " SELECT * FROM favoritos WHERE usuario_id='$usuario_id' AND producto_id='$producto_id' ";
$verificacion = mysqli_query($conexion, $consultafav);
if (mysqli_num_rows($verificacion) > 0) {
echo "active "; }
?>">
<svg width="24" height="24"><use xlink:href="#heart"></use></svg>
</button>
</form>
<figure>
<div id="carousel_<?php echo $reg['id']; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen1'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen2'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</figure>
<h3><?php echo ucwords($reg['nombre']) ?></h3>
<span class="qty">1 Unidad</span>
<span class="rating">
<svg width="24" height="24" class="text-primary"><use xlink:href="#star-solid"></use></svg>
<?php echo ucwords($reg['estrellas']) ?>
</span>
<div class="precio-container">
<?php if ($reg['descuento'] > 0) { ?>
<br><s class="precio">$<?php echo ucwords($reg['precio']) ?> </s>
<span class="price precio">$<?php echo number_format($reg['precio'] * ((100 - $reg['descuento']) / 100), 0) ?></span>
<?php } else { ?>
<span class="price">$<?php echo number_format($reg['precio']) ?></span>
<?php } ?>
</div>
<div class="card-footer">
<form method="post" action="carrito.php">
<div class="input-group product-qty">
<span class="input-group-btn">
<button type="button" class="quantity-left-minus btn btn-danger btn-number" data-type="minus">
<svg width="16" height="16"><use xlink:href="#minus"></use></svg>
</button>
</span>
<input type="text" id="quantity" name="cantidad" class="form-control input-number" value="1">
<span class="input-group-btn">
<button type="button" class="quantity-right-plus btn btn-success btn-number" data-type="plus">
<svg width="16" height="16"><use xlink:href="#plus"></use></svg>
</button>
</span>
</div>
<input name="id" type="hidden" value="<?php echo $reg['id']; ?>">
<button type="submit" class="btn btn-dark">Agregar al Carrito <iconify-icon icon="uil:shopping-cart"></iconify-icon></button>
</form>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="py-5 overflow-hidden">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="section-header d-flex justify-content-between">
<h2 class="section-title">Agregados recientemente</h2>
<div class="d-flex align-items-center">
<div class="swiper-buttons">
<button class="swiper-prev products-carousel-prev btn btn-primary">❮</button>
<button class="swiper-next products-carousel-next btn btn-primary">❯</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php
$consulta2= "SELECT * FROM productos ORDER BY productos.fecha_agregado DESC LIMIT 10";
$recien= mysqli_query($conexion, $consulta2);; ?>
<div class="products-carousel swiper">
<div class="swiper-wrapper">
<?php while ($reg = mysqli_fetch_array($recien)): ?>
<div class="product-item swiper-slide">
<?php if ($reg['descuento'] > 0) { ?>
<span class="badge bg-success position-absolute m-3">- <?php echo ucwords($reg['descuento']); ?>%</span>
<?php } ?>
<form method="post" action="favoritos.php">
<?php $producto_id=$reg['id']; ?>
<input name="id" type="hidden" value="<?php echo $reg['id'];?>">
<button type="submit" href="single-product.html" title="<?php echo ucwords($reg['nombre']) ?>" class="btn-wishlist <?php
$consultafav = " SELECT * FROM favoritos WHERE usuario_id='$usuario_id' AND producto_id='$producto_id' ";
$verificacion = mysqli_query($conexion, $consultafav);
if (mysqli_num_rows($verificacion) > 0) {
echo "active "; }
?>">
<svg width="24" height="24"><use xlink:href="#heart"></use></svg>
</button>
</form>
<figure>
<div id="carousel_<?php echo $reg['id']; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen1'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="data:image/jpg;base64,<?php echo base64_encode($reg['imagen2'])?>" alt="<?php echo ucwords($reg['nombre']) ?>" style="width: 120px; height: 120px; object-fit: cover;" class="d-block w-100">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $reg['id']; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</figure>
<h3><?php echo ucwords($reg['nombre']) ?></h3>
<span class="qty">1 Unidad</span>
<span class="rating">
<svg width="24" height="24" class="text-primary"><use xlink:href="#star-solid"></use></svg>
<?php echo ucwords($reg['estrellas']) ?>
</span>
<div class="precio-container">
<?php if ($reg['descuento'] > 0) { ?>
<br><s class="precio">$<?php echo ucwords($reg['precio']) ?> </s>
<span class="price precio">$<?php echo number_format($reg['precio'] * ((100 - $reg['descuento']) / 100), 0) ?></span>
<?php } else { ?>
<span class="price">$<?php echo number_format($reg['precio']) ?></span>
<?php } ?>
</div>
<div class="card-footer">
<form method="post" action="carrito.php">
<div class="input-group product-qty">
<span class="input-group-btn">
<button type="button" class="quantity-left-minus btn btn-danger btn-number" data-type="minus">
<svg width="16" height="16"><use xlink:href="#minus"></use></svg>
</button>
</span>
<input type="text" id="quantity" name="cantidad" class="form-control input-number" value="1">
<span class="input-group-btn">
<button type="button" class="quantity-right-plus btn btn-success btn-number" data-type="plus">
<svg width="16" height="16"><use xlink:href="#plus"></use></svg>
</button>
</span>
</div>
<input name="id" type="hidden" value="<?php echo $reg['id']; ?>">
<button type="submit" class="btn btn-dark">Agregar al Carrito <iconify-icon icon="uil:shopping-cart"></iconify-icon></button>
</form>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="py-5">
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-3 row-cols-lg-5">
<div class="col">
<div class="card mb-3 border-0">
<div class="row">
<div class="col-md-2 text-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M21.5 15a3 3 0 0 0-1.9-2.78l1.87-7a1 1 0 0 0-.18-.87A1 1 0 0 0 20.5 4H6.8l-.33-1.26A1 1 0 0 0 5.5 2h-2v2h1.23l2.48 9.26a1 1 0 0 0 1 .74H18.5a1 1 0 0 1 0 2h-13a1 1 0 0 0 0 2h1.18a3 3 0 1 0 5.64 0h2.36a3 3 0 1 0 5.82 1a2.94 2.94 0 0 0-.4-1.47A3 3 0 0 0 21.5 15Zm-3.91-3H9L7.34 6H19.2ZM9.5 20a1 1 0 1 1 1-1a1 1 0 0 1-1 1Zm8 0a1 1 0 1 1 1-1a1 1 0 0 1-1 1Z"/></svg>
</div>
<div class="col-md-10">
<div class="card-body p-0">
<h5>Envio Gratis</h5>
<p class="card-text">Disfruta de la comodidad de recibir tus compras sin costo adicional.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card mb-3 border-0">
<div class="row">
<div class="col-md-2 text-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M19.63 3.65a1 1 0 0 0-.84-.2a8 8 0 0 1-6.22-1.27a1 1 0 0 0-1.14 0a8 8 0 0 1-6.22 1.27a1 1 0 0 0-.84.2a1 1 0 0 0-.37.78v7.45a9 9 0 0 0 3.77 7.33l3.65 2.6a1 1 0 0 0 1.16 0l3.65-2.6A9 9 0 0 0 20 11.88V4.43a1 1 0 0 0-.37-.78ZM18 11.88a7 7 0 0 1-2.93 5.7L12 19.77l-3.07-2.19A7 7 0 0 1 6 11.88v-6.3a10 10 0 0 0 6-1.39a10 10 0 0 0 6 1.39Zm-4.46-2.29l-2.69 2.7l-.89-.9a1 1 0 0 0-1.42 1.42l1.6 1.6a1 1 0 0 0 1.42 0L15 11a1 1 0 0 0-1.42-1.42Z"/></svg>
</div>
<div class="col-md-10">
<div class="card-body p-0">
<h5>Pago 100% seguro</h5>
<p class="card-text">Garantizamos que todas tus transacciones son seguras y están protegidas por las últimas tecnologías en seguridad. Tu información está siempre protegida.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card mb-3 border-0">
<div class="row">
<div class="col-md-2 text-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M22 5H2a1 1 0 0 0-1 1v4a3 3 0 0 0 2 2.82V22a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-9.18A3 3 0 0 0 23 10V6a1 1 0 0 0-1-1Zm-7 2h2v3a1 1 0 0 1-2 0Zm-4 0h2v3a1 1 0 0 1-2 0ZM7 7h2v3a1 1 0 0 1-2 0Zm-3 4a1 1 0 0 1-1-1V7h2v3a1 1 0 0 1-1 1Zm10 10h-4v-2a2 2 0 0 1 4 0Zm5 0h-3v-2a4 4 0 0 0-8 0v2H5v-8.18a3.17 3.17 0 0 0 1-.6a3 3 0 0 0 4 0a3 3 0 0 0 4 0a3 3 0 0 0 4 0a3.17 3.17 0 0 0 1 .6Zm2-11a1 1 0 0 1-2 0V7h2ZM4.3 3H20a1 1 0 0 0 0-2H4.3a1 1 0 0 0 0 2Z"/></svg>
</div>
<div class="col-md-10">
<div class="card-body p-0">
<h5>Calidad Garantizada</h5>
<p class="card-text">Garantizamos la calidad y el rendimiento en cada producto para que disfrutes de la mejor experiencia de juego.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card mb-3 border-0">
<div class="row">
<div class="col-md-2 text-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M12 8.35a3.07 3.07 0 0 0-3.54.53a3 3 0 0 0 0 4.24L11.29 16a1 1 0 0 0 1.42 0l2.83-2.83a3 3 0 0 0 0-4.24A3.07 3.07 0 0 0 12 8.35Zm2.12 3.36L12 13.83l-2.12-2.12a1 1 0 0 1 0-1.42a1 1 0 0 1 1.41 0a1 1 0 0 0 1.42 0a1 1 0 0 1 1.41 0a1 1 0 0 1 0 1.42ZM12 2A10 10 0 0 0 2 12a9.89 9.89 0 0 0 2.26 6.33l-2 2a1 1 0 0 0-.21 1.09A1 1 0 0 0 3 22h9a10 10 0 0 0 0-20Zm0 18H5.41l.93-.93a1 1 0 0 0 0-1.41A8 8 0 1 1 12 20Z"/></svg>
</div>
<div class="col-md-10">
<div class="card-body p-0">
<h5>Ahorro garantizado</h5>
<p class="card-text">Aprovecha nuestras ofertas exclusivas y ahorra en tus compras de videojuegos y consolas.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card mb-3 border-0">
<div class="row">
<div class="col-md-2 text-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M18 7h-.35A3.45 3.45 0 0 0 18 5.5a3.49 3.49 0 0 0-6-2.44A3.49 3.49 0 0 0 6 5.5A3.45 3.45 0 0 0 6.35 7H6a3 3 0 0 0-3 3v2a1 1 0 0 0 1 1h1v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-6h1a1 1 0 0 0 1-1v-2a3 3 0 0 0-3-3Zm-7 13H8a1 1 0 0 1-1-1v-6h4Zm0-9H5v-1a1 1 0 0 1 1-1h5Zm0-4H9.5A1.5 1.5 0 1 1 11 5.5Zm2-1.5A1.5 1.5 0 1 1 14.5 7H13ZM17 19a1 1 0 0 1-1 1h-3v-7h4Zm2-8h-6V9h5a1 1 0 0 1 1 1Z"/></svg>
</div>
<div class="col-md-10">
<div class="card-body p-0">
<h5>Ofertas diarias</h5>
<a href="" class="card-text">Click Aqui</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="py-5">
<div class="container-fluid">
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="footer-menu">
<img src="images/logo.png" alt="logo">
<div class="social-links mt-5">
<ul class="d-flex list-unstyled gap-2">
<li>
<a href="https://www.facebook.com/benja.bohn/ttps://www.facebook.com/benja.bohn/" class="btn btn-outline-light">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M15.12 5.32H17V2.14A26.11 26.11 0 0 0 14.26 2c-2.72 0-4.58 1.66-4.58 4.7v2.62H6.61v3.56h3.07V22h3.68v-9.12h3.06l.46-3.56h-3.52V7.05c0-1.05.28-1.73 1.76-1.73Z"/></svg>
</a>
</li>
<li>
<a href="https://x.com/Bencraft0ttps://x.com/Bencraft0" class="btn btn-outline-light">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M22.991 3.95a1 1 0 0 0-1.51-.86a7.48 7.48 0 0 1-1.874.794a5.152 5.152 0 0 0-3.374-1.242a5.232 5.232 0 0 0-5.223 5.063a11.032 11.032 0 0 1-6.814-3.924a1.012 1.012 0 0 0-.857-.365a.999.999 0 0 0-.785.5a5.276 5.276 0 0 0-.242 4.769l-.002.001a1.041 1.041 0 0 0-.496.89a3.042 3.042 0 0 0 .027.439a5.185 5.185 0 0 0 1.568 3.312a.998.998 0 0 0-.066.77a5.204 5.204 0 0 0 2.362 2.922a7.465 7.465 0 0 1-3.59.448A1 1 0 0 0 1.45 19.3a12.942 12.942 0 0 0 7.01 2.061a12.788 12.788 0 0 0 12.465-9.363a12.822 12.822 0 0 0 .535-3.646l-.001-.2a5.77 5.77 0 0 0 1.532-4.202Zm-3.306 3.212a.995.995 0 0 0-.234.702c.01.165.009.331.009.488a10.824 10.824 0 0 1-.454 3.08a10.685 10.685 0 0 1-10.546 7.93a10.938 10.938 0 0 1-2.55-.301a9.48 9.48 0 0 0 2.942-1.564a1 1 0 0 0-.602-1.786a3.208 3.208 0 0 1-2.214-.935q.224-.042.445-.105a1 1 0 0 0-.08-1.943a3.198 3.198 0 0 1-2.25-1.726a5.3 5.3 0 0 0 .545.046a1.02 1.02 0 0 0 .984-.696a1 1 0 0 0-.4-1.137a3.196 3.196 0 0 1-1.425-2.673c0-.066.002-.133.006-.198a13.014 13.014 0 0 0 8.21 3.48a1.02 1.02 0 0 0 .817-.36a1 1 0 0 0 .206-.867a3.157 3.157 0 0 1-.087-.729a3.23 3.23 0 0 1 3.226-3.226a3.184 3.184 0 0 1 2.345 1.02a.993.993 0 0 0 .921.298a9.27 9.27 0 0 0 1.212-.322a6.681 6.681 0 0 1-1.026 1.524Z"/></svg>
</a>
</li>
<li>
<a href="www.youtube.com/@BENCRAFT0ww.youtube.com/@BENCRAFT0" class="btn btn-outline-light">