-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.php
716 lines (665 loc) · 30.4 KB
/
index.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
<?php
// include the configuration and functions
include("inc/config.php");
// check if its installed and configured
if(isset($config["rpcuser"]) and $config["rpcuser"] == "" ){
$url = 'http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url_details = parse_url($url);
header('Location: http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].$url_details['path'].'install');
exit;
};
// check if shibe is loged in
if(isset($_SESSION["shibe"]) and $_SESSION["shibe"] > 0){
$row = $pdo->query("SELECT name,email,country FROM shibes where id = '".$_SESSION["shibe"]."' and active = 1 limit 1")->fetch();
$shibe["name"] = explode(" ",$row["name"]);
$shibe["name"] = $shibe["name"][0];
$shibe["email"] = $row["email"];
$shibe["country"] = $row["country"];
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo $lang["store_title"]; ?></title>
<meta name="description" content="<?php echo $lang["store_description"]; ?>">
<meta name="author" content="<?php echo $lang["author"]; ?>">
<meta name="generator" content="<?php echo $lang["generator"]; ?>">
<link href="img/logo_dg.png" rel="icon" />
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/flag-icon-css/css/flag-icon.min.css">
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
<link rel="stylesheet" href="inc/vendors/AdminLTE/plugins/summernote/summernote-bs4.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="inc/vendors/AdminLTE/dist/css/adminlte.css">
<style type="text/css">
.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
padding-top: 20px;
}
.preloader{
background-color: rgba(244, 246, 249, 0.8);
}
</style>
</head>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">
<!-- Preloader -->
<div class="preloader flex-column justify-content-center align-items-center" style="margin-top: -20px;">
<img class="animation__shake" src="img/loading_screen.gif" alt="DogeGardeen" height="161">
<?php echo $lang["loading"]; ?>
</div>
<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
</li>
<?php
$db = $pdo->query("SELECT * FROM pages where type = 0 and id_page = 0 and lang = '".$_SESSION["l"]."' and active = 1 order by ord ASC");
while ($row = $db->fetch()) {
?>
<li class="nav-item d-none d-sm-inline-block">
<a href="?d=page&page=<?php echo $row["id"]; ?>" class="nav-link"><?php echo $row["title"]; ?></a>
</li>
<?php
};
?>
</ul>
<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown dogeh">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa fa-ellipsis-h"></i>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<?php
$db = $pdo->query("SELECT * FROM pages where type = 0 and id_page = 0 and lang = '".$_SESSION["l"]."' and active = 1 order by ord ASC");
while ($row = $db->fetch()) {
?>
<a href="?d=page&page=<?php echo $row["id"]; ?>" class="dropdown-item">
<i class="fas fa fa-angle-right mr-2"></i> <?php echo $row["title"]; ?>
</a>
<div class="dropdown-divider"></div>
<?php
};
?>
</div>
</li>
<!-- Navbar Search -->
<li class="nav-item">
<a class="nav-link" data-widget="navbar-search" href="#" role="button">
<i class="fas fa-search"></i>
</a>
<div class="navbar-search-block">
<form class="form-inline">
<div class="input-group input-group-sm">
<input class="form-control form-control-navbar" id="fetch" type="search" placeholder="<?php echo $lang["fetch"]; ?>" aria-label="<?php echo $lang["fetch"]; ?>">
<div class="input-group-append">
<button class="btn btn-navbar" type="submit">
<i class="fas fa-search"></i>
</button>
<button class="btn btn-navbar" type="button" data-widget="navbar-search" onclick='$("#fetchresultscard").hide();'>
<i class="fas fa-times"></i>
</button>
</div>
</div>
</form>
</div>
</li>
<!-- Language Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="flag-icon flag-icon-<?php if ($_SESSION["l"] == "EN"){ echo "gb"; }else{ echo strtolower($_SESSION["l"]); };?>"></i>
</a>
<div class="dropdown-menu dropdown-menu-right p-0">
<a href="?l=EN" class="dropdown-item <?php if ($_SESSION["l"] == "EN"){ echo "active"; }; ?>">
<i class="flag-icon flag-icon-gb mr-2"></i> English
</a>
<a href="?l=DE" class="dropdown-item <?php if ($_SESSION["l"] == "DE"){ echo "active"; }; ?>">
<i class="flag-icon flag-icon-de mr-2"></i> German
</a>
<a href="?l=FR" class="dropdown-item <?php if ($_SESSION["l"] == "FR"){ echo "active"; }; ?>">
<i class="flag-icon flag-icon-fr mr-2"></i> French
</a>
<a href="?l=ES" class="dropdown-item <?php if ($_SESSION["l"] == "ES"){ echo "active"; }; ?>">
<i class="flag-icon flag-icon-es mr-2"></i> Spanish
</a>
<a href="?l=PT" class="dropdown-item <?php if ($_SESSION["l"] == "PT"){ echo "active"; }; ?>">
<i class="flag-icon flag-icon-pt mr-2"></i> Português
</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
<i class="fas fa fa-shopping-cart"></i><span class="badge badge-danger navbar-badge" id="cartqty">0</span>
</a>
</li>
</ul>
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="index.php" class="brand-link" style="height: 70px !important">
<img src="img/logo_dgg.png" alt="DogeGarden" style="max-width: 50px">
<span class="brand-text font-weight-light"><?php echo $lang["store_logo"]; ?></span>
<?php if ($config["demo"] == 1){ ?>
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger" style="padding-top:-10px">
Demo!
</span>
<?php }; ?>
<!-- <span class="brand-text font-weight-light" style="font-size: 10px"><?php echo $lang["store_slogan"]; ?></span> -->
</a>
<!-- Sidebar -->
<div class="sidebar" style="padding-top: 20px">
<!-- Sidebar user panel (optional) -->
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<?php if(!isset($_SESSION["shibe"])){ ?>
<li class="nav-item" style="border-bottom: 1px solid #666666">
<a href="#" class="nav-link btn-light" style="color: #333333">
<i class="nav-icon far fa fa-user-lock nav-icon"></i>
<p>
<?php echo $lang["login"]; ?>
<i class="right fas fa fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="?d=login" class="nav-link active">
<i class="nav-icon far fa fa-user-lock"></i>
<p><?php echo $lang["login"]; ?></p>
</a>
</li>
<li class="nav-item">
<a href="?d=shibe&do=insert" class="nav-link active">
<i class="nav-icon far fa fa-id-card"></i>
<p><?php echo $lang["register"]; ?></p>
</a>
</li>
</li>
</ul>
</li>
<?php }else{ ?>
<li class="nav-item" style="border-bottom: 1px solid #666666">
<a href="#" class="nav-link btn-light" style="color: #333333">
<i class="nav-icon far fa fa-user-lock nav-icon"></i>
<p>
Such, <?php echo $shibe["name"]; ?>
<i class="right fas fa fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="?d=shibe&do=update" class="nav-link active">
<i class="nav-icon far fa fa-id-card"></i>
<p><?php echo $lang["manage"]; ?></p>
</a>
</li>
<li class="nav-item">
<a href="?d=orders" class="nav-link active">
<i class="far fas fa-file-invoice nav-icon"></i>
<p><?php echo $lang["orders"]; ?></p>
</a>
</li>
<li class="nav-item">
<a href="?d=shibe&do=logout" class="nav-link active">
<i class="nav-icon far fa fa-user-lock"></i>
<p><?php echo $lang["logout"]; ?></p>
</a>
</li>
</li>
</ul>
</li>
<?php }; ?>
<?php
$db = $pdo->query("SELECT id,icon,title FROM categories where id_cat = 0 and lang = '".$_SESSION["l"]."' and active = 1 order by ord ASC");
while ($row = $db->fetch()) {
$active = "";
// we find the category associeted with the product
if (isset($_GET["product"])){
$dbmp = $pdo->query("SELECT id_cat FROM products where id = '".$d->CleanString($_GET["product"])."' and active = 1 limit 1")->fetch();
$dbm = $pdo->query("SELECT id FROM categories where id = '".$dbmp["id_cat"]."' and id_cat = '".$row["id"]."' and lang = '".$_SESSION["l"]."' and active = 1 limit 1")->fetch();
if ($dbm["id"] > 0){
$active = "active";
};
}else{
// we find the category associeted with the sub category
if (isset($_GET["c"])){
$dbm = $pdo->query("SELECT id FROM categories where id = '".$d->CleanString($_GET["c"])."' and id_cat = '".$row["id"]."' and lang = '".$_SESSION["l"]."' and active = 1 limit 1")->fetch();
if ($dbm["id"] > 0){
$active = "active";
}else{
if ($d->CleanString($_GET["c"]) == $row["id"]){
$active = "active";
};
}
};
};
?>
<li class="nav-item">
<a href="?d=products&c=<?php echo $row["id"]; ?>" class="nav-link <?php echo $active; ?>" >
<i class="nav-icon far fa fa-<?php echo $row["icon"]; ?> nav-icon"></i>
<p>
<?php echo $row["title"]; ?>
<i class="right fas fa fa-angle-left"></i>
</p>
</a>
<?php
$dbs = $pdo->query("SELECT id,icon,title FROM categories where id_cat = '".$row["id"]."' and lang = '".$_SESSION["l"]."' and active = 1 order by ord ASC");
while ($rows = $dbs->fetch()) {
$active = "";
// we find the category associeted with the product
if (isset($_GET["product"])){
if ($dbmp["id_cat"] == $rows["id"]){
$active = "active";
};
}else{
// we find the category associeted with the sub category
if (isset($_GET["c"])){
if ($_GET["c"] == $rows["id"]){
$active = "active";
};
};
};
?>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="?d=products&c=<?php echo $rows["id"]; ?>" class="nav-link <?php echo $active; ?>">
<i class="far fa fa-<?php echo $rows["icon"]; ?> nav-icon"></i>
<p>
<?php echo $rows["title"]; ?>
</p>
</a>
</li>
</ul>
<?php }; ?>
</li>
<?php }; ?>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nav-icon far fa fa-wallet nav-icon"></i>
<p>
<?php echo $lang["wallets"]; ?>
<i class="right fas fa fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="https://dogecoin.com/" target="_blank" class="nav-link">
<i class="nav-icon far fa fa-dog"></i>
<p><?php echo $lang["corewallet"]; ?></p>
</a>
</li>
<li class="nav-item">
<a href="https://mydoge.com/" target="_blank" class="nav-link">
<i><img class="img-circle elevation-2" src="img/mydoge.png" style="max-width: 25px"> </i>
<p><?php echo $lang["mydogewallet"]; ?></p>
</a>
</li>
</li>
</ul>
</li>
<?php
$db = $pdo->query("SELECT * FROM pages where type = 1 and id_page = 0 and lang = '".$_SESSION["l"]."' and active = 1 order by ord ASC");
while ($row = $db->fetch()) {
?>
<li class="nav-item">
<a href="?d=page&page=<?php echo $row["id"]; ?>" class="nav-link <?php if ($_GET["page"] == $row["id"]){ echo "active"; }; ?>">
<i class="nav-icon far fa fa-angle-right"></i>
<p>
<?php echo $row["title"]; ?>
</p>
</a>
</li>
<?php
};
?>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<?php if (isset($config["fiat"]) and $config["fiat"] != ""){ ?>
<span class="brand-text font-weight-light">
<div style="color: #666666; padding: 10px; position: absolute; bottom: 20px;" id="fiat">
1 Ð = <?php echo $d->DogeFiatRates($config["fiat"]); ?> <?php echo strtoupper($config["fiat"]);?><br>
1 <?php echo strtoupper($config["fiat"]);?> = <?php echo $d->FiatDogeRates("1.00", $config["fiat"]); ?> Ð
</div>
</span>
<?php };?>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<div class="content">
<div class="container-fluid">
<div class="card" style="display: none" id="fetchresultscard">
<div class="card-header">
<h3 class="card-title"><li class="far fa fa-dog"></li> <?php echo $lang["fetch"]; ?> <li class="fa fas fa-search"></li> </h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="row" id="fetchresults">
</div>
</div>
</div>
<?php
$filter = "id_cat = 0 and id_prod = 0 and id_page = 0";
if (isset($_GET["d"])){ $filter = "id_page < 0"; }; // to fix the shib account pages to not show banners
if (isset($_GET["c"])){ $filter = "id_cat = ".$d->CleanString($_GET["c"]); };
if (isset($_GET["product"])){ $filter = "id_prod = ".$d->CleanString($_GET["product"]); };
if (isset($_GET["page"])){ $filter = "id_page = ".$d->CleanString($_GET["page"]); };
$bd = $pdo->query("SELECT * FROM banners where lang = '".$_SESSION["l"]."' and ".$filter." and active = 1")->fetch();
if (isset($bd["id"])){
?>
<div class="row">
<div class="col-md-12">
<div class="card">
<!-- /.card-header -->
<div class="card-body">
<div id="carouselDogeIndicators" class="carousel slide pointer-event" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$i = 0;
$db = $pdo->query("SELECT * FROM banners where lang = '".$_SESSION["l"]."' and ".$filter." and active = 1");
while ($row = $db->fetch()) {
?>
<li data-target="#carouselDogeIndicators" data-slide-to="<?php echo $i; ?>" class="<?php if ($i == 0){ ?>active<?php };?>"></li>
<?php
$i++;
};
?>
</ol>
<div class="carousel-inner" style="max-height: 300px;">
<?php
$i = 0;
$db = $pdo->query("SELECT * FROM banners where lang = '".$_SESSION["l"]."' and ".$filter." and active = 1");
while ($row = $db->fetch()) {
?>
<div class="carousel-item <?php if ($i == 0){ ?>active<?php };?>" style="background-image: url(fl/<?php echo $row["img"]; ?>); background-size: cover; background-position: center; background-repeat: no-repeat">
<?php
if ($row["video"] != ""){
?>
<div style="position: absolute; width: 100%;height: 56.25vw !important;margin-top: -5.9vw;">
<div data-video="data-video" data-autoplay="true" data-hide-controls="true" data-loop="true" class="video-block" style="position: absolute;height: 100%;width: 100%;margin: 0;padding: 0;">
<iframe src="<?php echo $row["video"];?>?rel=0&controls=0&showinfo=0&wmode=opaque&autoplay=1&modestbranding=1&loop=1&mute=1" width="100%" height="100%" class="video-block__media" style="opacity: 1; transition: opacity 0.5s ease-in-out 0s;" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; playlist; loop" ></iframe>
</div>
</div>
<div style=" width: 100%; min-height: 300px;"> </div>
<?php
}else{
?>
<img src="fl/<?php echo $row["img"]; ?>" style="width: 100%">
<!-- <div style=" width: 100%; min-height: 300px;"> </div>-->
<?php
};
?>
</div>
<?php
$i++;
};
?>
</div>
<a class="carousel-control-prev" href="#carouselDogeIndicators" role="button" data-slide="prev">
<span class="carousel-control-custom-icon" aria-hidden="true">
<i class="fas fa-chevron-left"></i>
</span>
<span class="sr-only"><?php echo $lang["previous"]; ?></span>
</a>
<a class="carousel-control-next" href="#carouselDogeIndicators" role="button" data-slide="next">
<span class="carousel-control-custom-icon" aria-hidden="true">
<i class="fas fa-chevron-right"></i>
</span>
<span class="sr-only"><?php echo $lang["next"]; ?></span>
</a>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
</div>
<?php }; ?>
<?php
// we check if the file exists befor importing
if (isset($_GET["d"])){
$p = $d->CleanString($_GET["d"]);
if (!file_exists("inc/".$p.".php")) {
include("inc/main.php");
}else{
include("inc/".$p.".php");
};
}else{
include("inc/main.php");
};
?>
</div>
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark" id="cartright">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<div class="float-right d-none d-sm-inline">
<?php echo $lang["version"]; ?>
</div>
<!-- Default to the left -->
<strong><?php echo $lang["copyrigh"]; ?></strong>
</footer>
</div>
<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="inc/vendors/AdminLTE/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="inc/vendors/AdminLTE/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables & Plugins -->
<script src="inc/vendors/AdminLTE/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/jszip/jszip.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/pdfmake/pdfmake.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/pdfmake/vfs_fonts.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="inc/vendors/AdminLTE/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Summernote -->
<script src="inc/vendors/AdminLTE/plugins/summernote/summernote-bs4.min.js"></script>
<!-- AdminLTE App -->
<script src="inc/vendors/AdminLTE/dist/js/adminlte.min.js"></script>
<script>
$(document).ready(function(){
$("#tabled").DataTable({
"language": {
"paginate": {
"previous": "<?php echo $lang["previous"];?>",
"next": "<?php echo $lang["next"];?>"
},
"lengthMenu": "<?php echo $lang["lengthMenu"];?>",
"zeroRecords": "<?php echo $lang["zeroRecords"];?>",
"info": "<?php echo $lang["data_info"];?>",
"infoEmpty": "<?php echo $lang["infoEmpty"];?>",
"infoFiltered": "<?php echo $lang["infoFiltered"];?>"
},
"responsive": true, "lengthChange": false, "autoWidth": false,
"buttons": ["csv", "pdf", "print"],
"order": [[ 0, "desc" ]],
}).buttons().container().appendTo('#tabled_wrapper .col-md-6:eq(0)');
// Summernote
$('#summernote').summernote();
// we get the cart contents and inject the code on the right sidebar
$("#cartright").load("inc/ajax-cart.php");
// we get the search results and dispaly
$( "#fetch" ).on('keyup', function () {
var fetch = this.value;
if ($(this).val().length > 2){
$.ajax({
url: "inc/ajax-fetch.php", // path to myphp file which returns the price
method: "post", // POST request
data: "fetch=" + fetch, // I retrieve this data in my$_POST variable in ajax.php : $_POST[id]
success: function(response) { // The function to execute if the request is a -success-, response will be the price
//var datashow = response;
if (response == null){
//alert('No records');
}else{
$("#fetchresultscard").show();
$("#fetchresults").html(response);
}
},
error: function(){
//alert('Error!');
}
});
};
});
// wen we a shibe is registered
<?php if (isset($_GET["shibe"]) and $_GET["shibe"] == "verify"){ ?>
swal.fire({
icon: 'success',
title: '<?php echo $lang["wow"]; ?>',
showConfirmButton: true,
confirmButtonColor: '#666666',
html:
'<?php echo $lang["verify_account"]; ?>',
})
<?php }; ?>
// wen we verify that the Dogecoin Node is not running!
<?php if (isset($_GET["d"]) and $_GET["d"] == "error"){ ?>
swal.fire({
icon: 'warning',
title: '<?php echo $lang["sad"]; ?>',
showConfirmButton: true,
confirmButtonColor: '#666666',
html:
'<img src="img/sad_doge.gif"><br><br>' +
'<?php echo $lang["error_node"]; ?>',
})
<?php }; ?>
// wen we verify that the Dogecoin Node is not running!
<?php if (isset($_GET["d"]) and $_GET["d"] == "shipping"){ ?>
swal.fire({
icon: 'warning',
title: '<?php echo $lang["sad"]; ?>',
showConfirmButton: true,
confirmButtonColor: '#666666',
html:
'<img src="img/sad_doge.gif"><br><br>' +
'Sorry there is no active shipping for your country!',
})
<?php }; ?>
// wen we a shibe is registered
<?php if (isset($_GET["shibe"]) and $_GET["shibe"] == "exists"){ ?>
swal.fire({
icon: 'warning',
title: '<?php echo $lang["sad"]; ?>',
showConfirmButton: true,
confirmButtonColor: '#666666',
html:
'<?php echo $lang["exists_account"]; ?>',
})
<?php }; ?>
// wen we a shibe is loged in
<?php if (isset($_GET["shibe"]) and $_GET["shibe"] == "login"){ ?>
swal.fire({
icon: 'success',
title: '<?php echo $lang["wow"]; ?>',
showConfirmButton: false,
timer: 1500,
html:
'<img src="img/loading_screen.gif">',
})
<?php }; ?>
// wen we a shibe is loged out
<?php if (isset($_GET["shibe"]) and $_GET["shibe"] == "logout"){ ?>
swal.fire({
icon: 'success',
title: '<?php echo $lang["sad"]; ?>',
showConfirmButton: false,
timer: 1500,
html:
'<img src="img/sad_doge.gif">',
})
<?php }; ?>
// wen we a shibe is verified
<?php if (isset($_GET["shibe"]) and isset($_GET["hash"]) and isset($_GET["email"]) and $_GET["shibe"] == "activate"){
$d->ActivateShibe($_GET["hash"],$_GET["email"]);
?>
swal.fire({
icon: 'success',
title: '<?php echo $lang["wow"]; ?>',
showConfirmButton: false,
timer: 1500,
html:
'<img src="img/loading_screen.gif">',
})
<?php }; ?>
// wen we recover a shibe password
<?php if (isset($_GET["shibe"]) and $_GET["shibe"] == "recover"){
if (isset($_GET["hash"]) and isset($_GET["email"])){
$d->RecoverShibe($_GET["hash"],$_GET["email"]);
};
?>
swal.fire({
icon: 'success',
title: 'Much check your email!',
showConfirmButton: true,
confirmButtonColor: '#666666',
html:
'<img src="img/loading_screen.gif">',
})
<?php }; ?>
});
// wen we click on Buy a product it adds to your cart
function insertcart(id, qty) {
$("#cartright").load("inc/ajax-cart.php?insert=" + id + "&qty=" + qty);
swal.fire({
icon: 'success',
title: '<?php echo $lang["wow"]; ?>',
showConfirmButton: false,
timer: 1500,
html:
'<img src="img/loading_screen.gif">',
});
$('#cartright').ControlSidebar('toggle');
};
// wen we click on X button on the Cart it removes from the cart
function removecart(id) {
$("#cartright").load("inc/ajax-cart.php?remove=" + id);
swal.fire({
icon: 'success',
title: '<?php echo $lang["sad"]; ?>',
showConfirmButton: false,
timer: 1500,
html:
'<img src="img/sad_doge.gif">',
});
};
// prevent resubmiting page
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>
</body>
</html>