-
Notifications
You must be signed in to change notification settings - Fork 48
/
index.php
909 lines (859 loc) · 68.9 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
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
<?php
/**
*
* Vesta Web Interface
*
* Copyright (C) 2020 Carter Roeser <[email protected]>
* https://cdgco.github.io/VestaWebInterface
*
* Vesta Web Interface is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as published
* by the Free Software Foundation.
*
* Vesta Web Interface is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Vesta Web Interface. If not, see
* <https://github.com/cdgco/VestaWebInterface/blob/master/LICENSE>.
*
*/
session_set_cookie_params(['samesite' => 'none']); session_start();
$configlocation = "includes/";
if (file_exists( 'includes/config.php' )) { require 'includes/includes.php'; } else { header( 'Location: install' ); exit(); }
if(isset($_SESSION['loggedin']) && base64_decode($_SESSION['loggedin']) == 'true') {}
else { header('Location: login.php'); exit(); }
$postvarsx = array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-sys-info','arg1' => 'json');
$curlx = curl_init();
curl_setopt($curlx, CURLOPT_URL, $vst_url);
curl_setopt($curlx, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curlx, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curlx, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curlx, CURLOPT_POST, true);
curl_setopt($curlx, CURLOPT_POSTFIELDS, http_build_query($postvarsx));
$serverconnection = array_values(json_decode(curl_exec($curlx), true))[0]['OS'];
if(!isset($serverconnection)) { unset($_SESSION['username']); setcookie('username', null, -1, '/; samesite=none'); unset($_SESSION['loggedin']); setcookie('loggedin', null, -1, '/; samesite=none'); header('Location: login.php'); exit;}
$postvars = array(
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-user','arg1' => $username,'arg2' => 'json'),
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-web-domains','arg1' => $username,'arg2' => 'json'),
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-dns-domains','arg1' => $username,'arg2' => 'json'),
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-mail-domains','arg1' => $username,'arg2' => 'json'),
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-databases','arg1' => $username,'arg2' => 'json'),
array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-user-notifications','arg1' => $username,'arg2' => 'json'),
);
$curl0 = curl_init();
$curl1 = curl_init();
$curl2 = curl_init();
$curl3 = curl_init();
$curl4 = curl_init();
$curl5 = curl_init();
$curlstart = 0;
while($curlstart <= 5) {
curl_setopt(${'curl' . $curlstart}, CURLOPT_URL, $vst_url);
curl_setopt(${'curl' . $curlstart}, CURLOPT_RETURNTRANSFER,true);
curl_setopt(${'curl' . $curlstart}, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt(${'curl' . $curlstart}, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt(${'curl' . $curlstart}, CURLOPT_POST, true);
curl_setopt(${'curl' . $curlstart}, CURLOPT_POSTFIELDS, http_build_query($postvars[$curlstart]));
$curlstart++;
}
$admindata = json_decode(curl_exec($curl0), true)[$username];
$domainname = array_keys(json_decode(curl_exec($curl1), true));
$domaindata = array_values(json_decode(curl_exec($curl1), true));
$dnsname = array_keys(json_decode(curl_exec($curl2), true));
$dnsdata = array_values(json_decode(curl_exec($curl2), true));
$mailname = array_keys(json_decode(curl_exec($curl3), true));
$maildata = array_values(json_decode(curl_exec($curl3), true));
$dbname = array_keys(json_decode(curl_exec($curl4), true));
$dbdata = array_values(json_decode(curl_exec($curl4), true));
$notifications = array_values(json_decode(curl_exec($curl5), true));
$notificationkeys = array_keys(json_decode(curl_exec($curl5), true));
if(isset($admindata['LANGUAGE'])){ $locale = $ulang[$admindata['LANGUAGE']]; }
_setlocale('LC_CTYPE', $locale);
_setlocale('LC_MESSAGES', $locale);
_bindtextdomain('messages', 'locale');
_textdomain('messages');
$plugincustom = array();
$plugincustomcontent = array();
foreach ($plugins as $result) {
if (file_exists('plugins/' . $result)) {
if (file_exists('plugins/' . $result . '/manifest.xml')) {
$get = file_get_contents('plugins/' . $result . '/manifest.xml');
$xml = simplexml_load_string($get, 'SimpleXMLElement', LIBXML_NOCDATA);
$arr = json_decode(json_encode((array)$xml), TRUE);
if (isset($arr['name']) && !empty($arr['name']) && isset($arr['fa-icon']) && !empty($arr['fa-icon']) && isset($arr['section']) && !empty($arr['section']) && isset($arr['admin-only']) && !empty($arr['admin-only']) && isset($arr['new-tab']) && !empty($arr['new-tab']) && isset($arr['hide']) && !empty($arr['hide'])){
array_push($pluginlinks,$result);
array_push($pluginnames,$arr['name']);
array_push($pluginicons,$arr['fa-icon']);
array_push($pluginsections,$arr['section']);
array_push($pluginadminonly,$arr['admin-only']);
array_push($pluginnewtab,$arr['new-tab']);
array_push($pluginhide,$arr['hide']);
}
}
}
}
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/ico" href="plugins/images/<?php echo $cpfavicon; ?>">
<title><?php echo $sitetitle; ?> - <?php echo __("Dashboard"); ?></title>
<link href="plugins/components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="plugins/components/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet">
<link href="plugins/components/footable/footable.bootstrap.css" rel="stylesheet">
<link href="plugins/components/metismenu/dist/metisMenu.min.css" rel="stylesheet">
<link href="plugins/components/animate.css/animate.min.css" rel="stylesheet">
<link rel="stylesheet" href="plugins/components/sweetalert2/sweetalert2.min.css" />
<link href="css/style.css" rel="stylesheet">
<link href="css/colors/<?php if(isset($_COOKIE['theme']) && $themecolor != 'custom.css') { echo base64_decode($_COOKIE['theme']); } else {echo $themecolor; } ?>" id="theme" rel="stylesheet">
<?php if($themecolor == "custom.css") { require( 'css/colors/custom.php'); } ?>
<style>
@media screen and (max-width: 1199px) {
.resone { display:none !important;}
}
@media screen and (max-width: 767px) {
.restwo { display:none !important;}
}
@media screen and (max-width: 540px) {
.resthree { display:none !important;}
.pagination > li > a, .pagination > li > span {
padding: 3px 9px !important;
}
}
.two-part li i {
font-size: 36px;
position: relative;
top: 5px;
}
</style>
<?php if(GOOGLE_ANALYTICS_ID != ''){
echo "<script async src='https://www.googletagmanager.com/gtag/js?id=" . GOOGLE_ANALYTICS_ID . "'></script>
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '" . GOOGLE_ANALYTICS_ID . "');</script>"; } ?>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="fix-header">
<?php if(INTERAKT_APP_ID != ''){
echo '<script>
window.mySettings = {
first _name: "' . $admindata['FNAME'] . '",
last_name: "' . $admindata['LNAME'] . '",
suspended: "' . $admindata['SUSPENDED'] . '",
package: "' . $admindata['PACKAGE'] . '",
language: "' . $admindata['LANGUAGE'] . '",
uname: "' . $username . '",
email: "' . $admindata['CONTACT'] . '",
created_at: ' . strtotime($admindata['DATE'] . ' ' . $admindata['TIME']) . ',
joined_at: "' . $admindata['DATE'] . ' ' . $admindata['TIME'] . '",
app_id: "' . INTERAKT_APP_ID . '"
};
</script>'; } ?>
<div class="preloader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" />
</svg>
</div>
<div id="wrapper">
<nav class="navbar navbar-default navbar-static-top m-b-0">
<div class="navbar-header">
<div class="top-left-part">
<a class="logo" href="index.php">
<img src="plugins/images/<?php echo $cpicon; ?>" alt="home" class="logo-1 dark-logo" />
<img src="plugins/images/<?php echo $cplogo; ?>" alt="home" class="hidden-xs dark-logo" />
</a>
</div>
<ul class="nav navbar-top-links navbar-left">
<li><a href="javascript:void(0)" class="open-close waves-effect waves-light visible-xs"><i class="ti-close ti-menu"></i></a></li>
<?php notifications(); ?>
</ul>
<ul class="nav navbar-top-links navbar-right pull-right">
<li>
<form class="app-search m-r-10" id="searchform" action="process/search.php" method="get">
<input type="text" placeholder="<?php echo __("Search..."); ?>" class="form-control" name="q"> <a href="javascript:void(0);" onclick="document.getElementById('searchform').submit();"><i class="fa fa-search"></i></a> </form>
</li>
<li class="dropdown">
<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="#"><b class="hidden-xs"><?php print_r($displayname); ?></b><span class="caret"></span> </a>
<ul class="dropdown-menu dropdown-user animated flipInY">
<li>
<div class="dw-user-box">
<div class="u-text">
<h4>
<?php print_r($displayname); ?>
</h4>
<p class="text-muted">
<?php print_r($admindata['CONTACT']); ?>
</p>
</div>
</div>
</li>
<li role="separator" class="divider"></li>
<li><a href="profile.php"><i class="ti-home"></i> <?php echo __("My Account"); ?></a></li>
<li><a href="profile.php?settings=open"><i class="ti-settings"></i> <?php echo __("Account Settings"); ?></a></li>
<li role="separator" class="divider"></li>
<li><a href="process/logout.php"><i class="fa fa-power-off"></i> <?php echo __("Logout"); ?></a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav slimscrollsidebar">
<div class="sidebar-head">
<h3>
<span class="fa-fw open-close">
<i class="ti-menu hidden-xs"></i>
<i class="ti-close visible-xs"></i>
</span>
<span class="hide-menu"><?php echo __("Navigation"); ?></span>
</h3>
</div>
<ul class="nav" id="side-menu">
<?php indexMenu("./");
adminMenu("admin/list/", "");
profileMenu("./");
primaryMenu("list/", "process/", "");
?>
</ul>
</div>
</div>
<div id="page-wrapper">
<div class="container-fluid">
<div class="row bg-title" style="overflow:visible;">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title"><?php echo __("Host Dashboard"); ?></h4>
</div>
<div class="col-lg-2 col-sm-8 col-md-8 col-xs-12 pull-right restwo">
<div class="btn-group bootstrap-select input-group-btn" style="margin-right:257px;width:220px;">
<form id="rebuildform" action="process/rebuild.php" method="post">
<select class="selectpicker pull-right m-l-20" name="action" data-style="form-control">
<option value="rebuild-user"><?php echo __("Rebuild Account"); ?></option>
<?php if ($webenabled == 'true') { echo '<option value="rebuild-web-domains">' . __("Rebuild Web") . '</option>'; } ?>
<?php if ($dnsenabled == 'true') { echo '<option value="rebuild-dns-domains">' . __("Rebuild DNS") . '</option>'; } ?>
<?php if ($mailenabled == 'true') { echo '<option value="rebuild-mail-domains">' . __("Rebuild Mail") . '</option>'; } ?>
<?php if ($dbenabled == 'true') { echo '<option value="rebuild-databases">' . __("Rebuild DB") . '</option>'; } ?>
<option value="rebuild-cron-jobs"><?php echo __("Rebuild Cron"); ?></option>
<option value="update-user-counters"><?php echo __("Update Counters"); ?></option>
</select>
<input type="hidden" name="user" value="<?php echo $username; ?>" />
</form>
</div>
<div class="input-group-btn">
<button type="button" onclick='document.getElementById("rebuildform").submit();Swal.fire({title: "<?php echo __('Processing'); ?>", text: "",timer: 5000,onOpen: function () {swal.showLoading();}}).then(function () {},function (dismiss) {if (dismiss === "timer") {}})' class=" pull-right btn waves-effect waves-light color-button" style="left: -2px;"><i class="ti-angle-right"></i></button>
</div>
</div>
<?php headerad(); ?>
</div>
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<div class="row row-in">
<div class="col-lg-3 col-sm-6 row-in-br">
<ul class="col-in">
<li>
<span class="circle circle-md bg-danger"><i class="fa fa-cloud"></i></span>
<li class="col-last">
<h2 class="counter text-right m-t-15">
<?php echo formatMBNumOnly($admindata['U_BANDWIDTH'])." ".formatMBUnitOnly($admindata['U_BANDWIDTH'])." / ";
if($admindata['BANDWIDTH'] != 'unlimited') { echo formatMBNumOnly($admindata['BANDWIDTH'])." ".formatMBUnitOnly($admindata['BANDWIDTH']); } else { echo "<i style='position:relative;top:6px' class='ti-infinite'></i>"; } ?>
</h2>
</li>
</li><br><br>
<li class="col-middle">
<h4><?php echo __("Bandwidth"); ?></h4>
</li>
</ul>
</div>
<div class="col-lg-3 col-sm-6 row-in-br b-r-none">
<ul class="col-in">
<li>
<span class="circle circle-md bg-info"><i class="ti-harddrive"></i></span>
</li>
<li class="col-last">
<h2 class="counter text-right m-t-15">
<?php echo formatMBNumOnly($admindata['U_DISK'])." ".formatMBUnitOnly($admindata['U_DISK'])." / ";
if($admindata['DISK_QUOTA'] != 'unlimited') { echo formatMBNumOnly($admindata['DISK_QUOTA'])." ".formatMBUnitOnly($admindata['DISK_QUOTA']); } else { echo "<i style='position:relative;top:6px' class='ti-infinite'></i>"; } ?>
</h2>
</li>
<br><br>
<li class="col-middle">
<h4><?php echo __("Disk Space"); ?></h4>
</li>
</ul>
</div>
<div class="col-lg-3 col-sm-6 row-in-br">
<ul class="col-in">
<li>
<span class="circle circle-md bg-success"><i class=" ti-world"></i></span>
</li>
<li class="col-last">
<h2 class="text-right m-t-15">
<?php print_r($admindata['U_WEB_DOMAINS']); ?> /
<?php if($admindata['WEB_DOMAINS'] == "unlimited"){echo "<i class='ti-infinite' style='position:relative;top:6px'></i>";} else{ print_r($admindata['WEB_DOMAINS']); } ?>
</h2>
</li><br><br>
<li class="col-middle">
<h4><?php echo __("Web Domains"); ?></h4>
</li>
</ul>
</div>
<div class="col-lg-3 col-sm-6 b-0">
<ul class="col-in">
<li>
<span class="circle circle-md bg-warning"><i class="fa fa-envelope"></i></span>
</li>
<li class="col-last">
<h2 class="text-right m-t-15">
<?php print_r($admindata['U_MAIL_ACCOUNTS']); ?> /
<?php if($admindata['MAIL_ACCOUNTS'] == "unlimited"){echo "<i class='ti-infinite' style='position:relative;top:6px'></i>";} else{ print_r($admindata['MAIL_ACCOUNTS'] * $admindata['MAIL_DOMAINS']); } ?>
</h2>
</li><br><br>
<li class="col-middle">
<h4><?php echo __("Email Addresses"); ?></h4>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 col-lg-9">
<div class="manage-users">
<div class="sttabs tabs-style-iconbox">
<nav>
<ul>
<?php if ($webenabled == 'true') { echo '<li><a href="#section-iconbox-1" class="sticon ti-world"><span>' . __("Web") . '</span></a></li>'; } ?>
<?php if ($dnsenabled == 'true') { echo '<li><a href="#section-iconbox-2" class="sticon fa fa-sitemap"><span>' . __("DNS") . '</span></a></li>'; } ?>
<?php if ($mailenabled == 'true') { echo '<li><a href="#section-iconbox-3" class="sticon fa fa-envelope"><span>' . __("Mail") . '</span></a></li>'; } ?>
<?php if ($dbenabled == 'true') { echo '<li><a href="#section-iconbox-4" class="sticon fa fa-database"><span>' . __("Database") . '</span></a></li>'; } ?>
</ul>
</nav>
<div class="content-wrap">
<?php if ($webenabled != 'true') { echo '<!--';} ?>
<section id="section-iconbox-1">
<div class="p-20 row">
<div class="col-sm-6">
<h3 class="m-t-0"><?php echo __("Manage Web Domains"); ?></h3>
</div>
<div class="col-sm-6 resone">
<ul class="side-icon-text pull-right">
<li><a href="add/domain.php"><span class="circle circle-sm bg-success di"><i class="ti-plus"></i></span><span><?php echo __("Add Domain"); ?></span></a></li>
<li><a href="list/web.php"><span class="circle circle-sm bg-danger di"><i class="ti-pencil-alt"></i></span><span><?php echo __("Manage"); ?></span></a></li>
</ul>
</div>
</div>
<div class="table-responsive manage-table">
<table class="table footable m-b-0" data-paging-size="5" data-paging="true" cellspacing="14" data-page-size="5" data-sorting="true">
<thead>
<tr>
<th data-toggle="true"><?php echo __("DOMAIN"); ?></th>
<th class="resthree" data-type="numeric"><?php echo __("DISK"); ?></th>
<th class="resthree" data-type="numeric"><?php echo __("BANDWIDTH"); ?></th>
<th class="resone"><?php echo __("SSL"); ?></th>
<th class="resone"><?php echo __("STATUS"); ?></th>
</tr>
</thead>
<tbody><?php
if($domainname[0] != '') {
$x1 = 0;
do {
echo '<tr class="advance-table-row clickable-row" data-href="edit/domain.php?domain='.$domainname[$x1].'">
<td>' . $domainname[$x1] . '</td>
<td class="resthree" data-sort-value="' . $domaindata[$x1]['U_DISK'] . '">' . formatMB($domaindata[$x1]['U_DISK']) . '</td>
<td class="resthree" data-sort-value="' . $domaindata[$x1]['U_BANDWIDTH'] . '">' . formatMB($domaindata[$x1]['U_BANDWIDTH']) . '</td>
<td class="resone">';
if($domaindata[$x1]['SSL'] == "yes"){
echo '<span class="label label-table label-success">' . __("Enabled") . '</span>';}
else{
echo '<span class="label label-table label-danger">' . __("Disabled") . '</span>';}
echo '</td><td class="resone">';
if($domaindata[$x1]['SUSPENDED'] == "no"){
echo '<span class="label label-table label-success">' . __("Active") . '</span>';}
else{
echo '<span class="label label-table label-danger">' . __("Suspended") . '</span>';}
echo '</td>
</tr>';
$x1++;
} while (isset($domainname[$x1])); }
?></tbody>
</table>
</div>
</section><?php if ($webenabled != 'true') { echo '-->';} ?>
<?php if ($dnsenabled != 'true') { echo '<!--';} ?>
<section id="section-iconbox-2">
<div class="p-20 row">
<div class="col-sm-6">
<h3 class="m-t-0"><?php echo __("Manage DNS Domains"); ?></h3>
</div>
<div class="col-sm-6 resone">
<ul class="side-icon-text pull-right">
<li><a href="add/dns.php"><span class="circle circle-sm bg-success di"><i class="ti-plus"></i></span><span><?php echo __("Add DNS"); ?></span></a></li>
<li><a href="list/dns.php"><span class="circle circle-sm bg-danger di"><i class="ti-pencil-alt"></i></span><span><?php echo __("Manage"); ?></span></a></li>
</ul>
</div>
</div>
<div class="table-responsive manage-table">
<table class="table footable m-b-0" data-paging-size="5" data-paging="true" cellspacing="14" data-page-size="5" data-sorting="true">
<thead>
<tr>
<th data-toggle="true"><?php echo __("DOMAIN"); ?></th>
<th class="resthree" data-type="numeric"><?php echo __("RECORDS"); ?></th>
<th class="resone"><?php echo __("STATUS"); ?></th>
</tr>
</thead>
<tbody><?php
if($dnsname[0] != '') {
$x2 = 0;
do {
if(count(explode('.', $requestdns)) > 2) {
$sub = 'yes';
} else{
$sub = 'no';
}
if ($sub == "no") {
if (CLOUDFLARE_EMAIL != '' && CLOUDFLARE_API_KEY != ''){
$cfenabled = curl_init();
curl_setopt($cfenabled, CURLOPT_URL, "https://api.cloudflare.com/client/v4/zones?name=" . $dnsname[$x2]);
curl_setopt($cfenabled, CURLOPT_RETURNTRANSFER,true);
curl_setopt($cfenabled, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cfenabled, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cfenabled, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($cfenabled, CURLOPT_HTTPHEADER, array(
"X-Auth-Email: " . CLOUDFLARE_EMAIL,
"X-Auth-Key: " . CLOUDFLARE_API_KEY));
$cfdata = array_values(json_decode(curl_exec($cfenabled), true));
$cfid = $cfdata[0][0]['id'];
$cfname = $cfdata[0][0]['name'];
if ($cfname != '' && isset($cfname) && $cfname == $dnsname[$x2]){
$cfns = curl_init();
curl_setopt($cfns, CURLOPT_URL, $vst_url);
curl_setopt($cfns, CURLOPT_RETURNTRANSFER,true);
curl_setopt($cfns, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cfns, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cfns, CURLOPT_POST, true);
curl_setopt($cfns, CURLOPT_POSTFIELDS, http_build_query(array('hash' => $vst_apikey, 'user' => $vst_username,'password' => $vst_password,'cmd' => 'v-list-dns-records','arg1' => $username,'arg2' => $dnsname[$x2], 'arg3' => 'json')));
$cfdata = array_values(json_decode(curl_exec($cfns), true));
$cfnumber = array_keys(json_decode(curl_exec($cfns), true));
$requestArr = array_column(json_decode(curl_exec($cfns), true), 'TYPE');
$requestrecord = array_search('NS', $requestArr);
$nsvalue = $cfdata[$requestrecord]['VALUE'];
if( strpos( $nsvalue, '.ns.cloudflare.com' ) !== false ) {
$cfrecords = curl_init();
curl_setopt($cfrecords, CURLOPT_URL, "https://api.cloudflare.com/client/v4/zones/" . $cfid . "/dns_records");
curl_setopt($cfrecords, CURLOPT_RETURNTRANSFER,true);
curl_setopt($cfrecords, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cfrecords, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cfrecords, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($cfrecords, CURLOPT_HTTPHEADER, array(
"X-Auth-Email: " . CLOUDFLARE_EMAIL,
"X-Auth-Key: " . CLOUDFLARE_API_KEY));
$cfdata2 = array_values(json_decode(curl_exec($cfrecords), true));
$cfcount = $cfdata2[1]['count'];
echo '<tr class="advance-table-row clickable-row" data-href="list/cfdomain.php?domain='.$dnsname[$x2].'">
<td>' . $dnsname[$x2] . '</td><td class="resthree" data-sort-value="' . $cfcount . '">' . $cfcount . '</td>';
$recordcount = $recordcount + $cfcount;
}
else { echo '<tr class="advance-table-row clickable-row" data-href="list/dnsdomain.php?domain='.$dnsname[$x2].'">
<td>' . $dnsname[$x2] . '</td><td class="resthree" data-sort-value="' . $dnsdata[$x2]['RECORDS'] . '">' . $dnsdata[$x2]['RECORDS'] . '</td>';
$recordcount = $recordcount + $dnsdata[$x2]['RECORDS'];}
}
else { echo '<tr class="advance-table-row clickable-row" data-href="list/dnsdomain.php?domain='.$dnsname[$x2].'">
<td>' . $dnsname[$x2] . '</td><td class="resthree" data-sort-value="' . $dnsdata[$x2]['RECORDS'] . '">' . $dnsdata[$x2]['RECORDS'] . '</td>';
$recordcount = $recordcount + $dnsdata[$x2]['RECORDS'];}
}
else { echo '<tr class="advance-table-row clickable-row" data-href="list/dnsdomain.php?domain='.$dnsname[$x2].'">
<td>' . $dnsname[$x2] . '</td><td class="resthree" data-sort-value="' . $dnsdata[$x2]['RECORDS'] . '">' . $dnsdata[$x2]['RECORDS'] . '</td>';
$recordcount = $recordcount + $dnsdata[$x2]['RECORDS'];}
}
else { echo '<tr class="advance-table-row clickable-row" data-href="list/dnsdomain.php?domain='.$dnsname[$x2].'">
<td>' . $dnsname[$x2] . '</td><td class="resthree" data-sort-value="' . $dnsdata[$x2]['RECORDS'] . '">' . $dnsdata[$x2]['RECORDS'] . '</td>';
$recordcount = $recordcount + $dnsdata[$x2]['RECORDS']; }
echo '<td class="resone">';
if($dnsdata[$x2]['SUSPENDED'] == "no"){
echo '<span class="label label-table label-success">' . __("Active") . '</span>';}
else{
echo '<span class="label label-table label-danger">' . __("Suspended") . '</span>';}
echo '</td>
</tr>';
$x2++;
} while (isset($dnsname[$x2])); }
?></tbody>
</table>
</div>
</section><?php if ($dnsenabled != 'true') { echo '-->';} ?>
<?php if ($mailenabled != 'true') { echo '<!--';} ?>
<section id="section-iconbox-3">
<div class="p-20 row">
<div class="col-sm-6">
<h3 class="m-t-0"><?php echo __("Manage Mail Domains"); ?></h3>
</div>
<div class="col-sm-6 resone">
<ul class="side-icon-text pull-right">
<li><a href="add/mail.php"><span class="circle circle-sm bg-success di"><i class="ti-plus"></i></span><span><?php echo __("Add Mail"); ?></span></a></li>
<li><a href="list/mail.php"><span class="circle circle-sm bg-danger di"><i class="ti-pencil-alt"></i></span><span><?php echo __("Manage"); ?></span></a></li>
</ul>
</div>
</div>
<div class="table-responsive manage-table">
<table class="table footable m-b-0" data-paging-size="5" data-paging="true" cellspacing="14" data-page-size="5" data-sorting="true">
<thead>
<tr>
<th data-toggle="true"><?php echo __("DOMAIN"); ?></th>
<th class="resthree" data-type="numeric"><?php echo __("ACCOUNTS"); ?></th>
<th class="resone"><?php echo __("STATUS"); ?></th>
</tr>
</thead>
<tbody><?php
if($mailname[0] != '') {
$x3 = 0;
do {
echo '<tr class="advance-table-row clickable-row" data-href="list/maildomain.php?domain='.$mailname[$x3].'">
<td>' . $mailname[$x3] . '</td>
<td class="resthree" data-sort-value="' . $maildata[$x3]['ACCOUNTS'] . '">' . $maildata[$x3]['ACCOUNTS'] . '</td>
<td class="resone">';
if($maildata[$x3]['SUSPENDED'] == "no"){
echo '<span class="label label-table label-success">' . __("Active") . '</span>';}
else{
echo '<span class="label label-table label-danger">' . __("Suspended") . '</span>';}
echo '</td>
</tr>';
$x3++;
} while (isset($mailname[$x3])); }
?></tbody>
</table>
</div>
</section><?php if ($mailenabled != 'true') { echo '-->';} ?>
<?php if ($dbenabled != 'true') { echo '<!--';} ?>
<section id="section-iconbox-4">
<div class="p-20 row">
<div class="col-sm-6">
<h3 class="m-t-0"><?php echo __("Manage Databases"); ?></h3>
</div>
<div class="col-sm-6 resone">
<ul class="side-icon-text pull-right">
<li><a href="add/db.php"><span class="circle circle-sm bg-success di"><i class="ti-plus"></i></span><span><?php echo __("Add Database"); ?></span></a></li>
<li><a href="list/db.php"><span class="circle circle-sm bg-danger di"><i class="ti-pencil-alt"></i></span><span><?php echo __("Manage"); ?></span></a></li>
</ul>
</div>
</div>
<div class="table-responsive manage-table">
<table class="table footable m-b-0" data-paging-size="5" data-paging="true" cellspacing="14" data-page-size="5" data-sorting="true">
<thead>
<tr>
<th data-toggle="true"><?php echo __("DATABASE"); ?></th>
<th class="resthree"><?php echo __("USER"); ?></th>
<th class="resone"><?php echo __("STATUS"); ?></th>
</tr>
</thead>
<tbody><?php
if($dbname[0] != '') {
$x4 = 0;
do {
echo '<tr class="advance-table-row clickable-row" data-href="edit/db.php?db='.$dbdata[$x4]['DATABASE'].'">
<td>' . $dbdata[$x4]['DATABASE'] . '</td>
<td class="resthree">' . $dbdata[$x4]['DBUSER'] . '</td>
<td class="resone">';
if($dbdata[$x4]['SUSPENDED'] == "no"){
echo '<span class="label label-table label-success">' . __("Active") . '</span>';}
else{
echo '<span class="label label-table label-danger">' . __("Suspended") . '</span>';}
echo '</td>
</tr>';
$x4++;
} while (isset($dbname[$x4])); }
?></tbody>
</table>
</div>
</section><?php if ($dbenabled != 'true') { echo '-->';} ?>
</div>
</div>
</div>
</div>
<div <?php if ($webenabled != 'true' && $dnsenabled != 'true' && $mailenabled != 'true' && $dbenabled != 'true') {echo 'style="display:none;"';} ?> class="col-lg-3 col-md-6">
<div class="white-box">
<h3 class="box-title"><?php echo __("Disk Quota Used"); ?></h3>
<ul class="country-state p-t-20">
<li>
<h2>
<?php echo formatMB($admindata['U_DISK']); ?></h2> <small><?php echo __("Total Disk Space"); ?></small>
<div class="pull-right"><?php
if ($admindata['DISK_QUOTA'] != 0) {
$diskpercent = (($admindata['U_DISK'] / $admindata['DISK_QUOTA']) * 100);
} else { $diskpercent = '0'; }
if(is_infinite($diskpercent)){ echo "0";}else{echo round($diskpercent);} ?>%</div>
<div class="progress">
<div class="progress-bar progress-bar-inverse" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:<?php if($diskpercent == " INF "){ echo "0 ";}else{echo $diskpercent;} ?>%;"> <span class="sr-only"><?php if($diskpercent == "INF"){ echo "0";}else{echo $diskpercent;} ?>%;">% Complete</span></div>
</div>
</li>
</ul><br><br>
<h3 class="box-title"><?php echo __("Disk Usage Breakdown"); ?></h3>
<ul class="country-state p-t-20">
<li>
<h2>
<?php
if ($admindata['U_DISK'] != 0) { $diskpercent1 = (($admindata['U_DISK_WEB'] / $admindata['U_DISK']) * 100); }
else { $diskpercent1 = '0'; }
echo formatMB($admindata['U_DISK_WEB']);
?></h2> <small><?php echo __("Web Data"); ?></small>
<div class="pull-right">
<?php if($diskpercent1 == "INF"){ echo "0";}else{echo round($diskpercent1);} ?>%</div>
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:<?php if($diskpercent1 == " INF "){ echo "0 ";}else{echo $diskpercent1;} ?>%;"> <span class="sr-only"><?php if($diskpercent1 == "INF"){ echo "0";}else{echo round($diskpercent1);} ?>% Complete</span></div>
</div>
</li>
<li>
<h2><?php
if ($admindata['U_DISK'] != '0') { $diskpercent2 = (($admindata['U_DISK_MAIL'] / $admindata['U_DISK']) * 100); }
else { $diskpercent2 = '0'; }
echo formatMB($admindata['U_DISK_MAIL']);
?></h2> <small><?php echo __("Mail Data"); ?></small>
<div class="pull-right">
<?php if($diskpercent2 == "INF"){ echo "0";}else{echo round($diskpercent2);} ?>%</div>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:<?php if($diskpercent2 == " INF "){ echo "0 ";}else{echo $diskpercent2;} ?>%;"> <span class="sr-only"><?php if($diskpercent2 == "INF"){ echo "0";}else{echo round($diskpercent2);} ?>% Complete</span></div>
</div>
</li>
<li>
<h2>
<?php
if ($admindata['U_DISK'] != '0') { $diskpercent3 = (($admindata['U_DISK_DB'] / $admindata['U_DISK']) * 100); }
else { $diskpercent3 = '0'; }
echo formatMB($admindata['U_DISK_DB']);
?></h2> <small><?php echo __("Databases"); ?></small>
<div class="pull-right">
<?php if($diskpercent3 == "INF"){ echo "0";}else{echo round($diskpercent3);} ?>%</div>
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:<?php if($diskpercent3 == " INF "){ echo "0 ";}else{echo $diskpercent3;} ?>%;"> <span class="sr-only"><?php if($diskpercent3 == "INF"){ echo "0";}else{echo round($diskpercent3);} ?>% Complete</span></div>
</div>
</li>
<li>
<h2>
<?php
if ($admindata['U_DISK'] != '0') { $diskpercent4 = (($admindata['U_DISK_DIRS'] / $admindata['U_DISK']) * 100); }
else { $diskpercent4 = '0'; }
echo formatMB($admindata['U_DISK_DIRS']);
?></h2> <small><?php echo __("User Directories"); ?></small>
<div class="pull-right">
<?php if($diskpercent4 == "INF"){ echo "0";}else{echo round($diskpercent4);} ?>%</div>
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:<?php if($diskpercent4 == " INF "){ echo "0 ";}else{echo $diskpercent4;} ?>%;"> <span class="sr-only"><?php if($diskpercent4 == "INF"){ echo "0";}else{echo round($diskpercent4);} ?>% Complete</span></div>
</div>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="row">
<div class="col-lg-6 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("DNS Domains"); ?></h3>
<ul class="list-inline two-part">
<li><i class="fa fa-list-alt text-danger"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_DNS_DOMAINS']; ?> /
<?php if($admindata['DNS_DOMAINS'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['DNS_DOMAINS']); } ?>
</h1>
</li><br><br>
</ul>
</div>
</div>
<div class="col-lg-6 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("DNS Records"); ?></h3>
<ul class="list-inline two-part">
<li><i class="fa fa-sitemap text-danger"></i></li>
<li class="text-right">
<h1 id="recordcount">
</h1>
</li><br><br>
</ul>
</div>
</div>
<div class="col-lg-6 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("Mail Domains"); ?></h3>
<ul class="list-inline two-part">
<li><i class="fa fa-envelope-square text-warning"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_MAIL_DOMAINS']; ?> /
<?php if($admindata['MAIL_DOMAINS'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['MAIL_DOMAINS']); } ?>
</h1>
</li><br><br>
</ul>
</div>
</div>
<div class="col-lg-6 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("Backups"); ?></h3>
<ul class="list-inline two-part">
<li><i class="ti-cloud-up text-info"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_BACKUPS']; ?> /
<?php if($admindata['BACKUPS'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['BACKUPS']); } ?>
</h1>
</li><br><br>
</ul>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12 restwo">
<div class="news-slide m-b-30 dashboard-slide">
<div class="vcarousel slide" style="margin:14px;">
<div class="carousel-inner" style="height:415px;">
<div class="active item">
<div class="overlaybg"><img src="plugins/images/profile-menu.png" /></div>
<div class="news-content"><span class="label label-danger label-rounded"><?php echo __("Account Details"); ?></span><br>
<div class="columnleft" style="margin-top:10px; float: left;">
<h2 style="width: 200%;"><?php echo __("Username"); ?>:
<?php print_r($username); ?><br><?php echo __("Email"); ?>:
<?php print_r($admindata['CONTACT']); ?><br><br> <?php echo __("Plan"); ?>:
<?php print_r($admindata['PACKAGE']); ?><br><?php echo __("Bandwidth"); ?>:
<?php if($admindata['BANDWIDTH'] == "unlimited"){ echo __("Unlimited");} else { print_r($admindata['BANDWIDTH'] . " mb");} ?> <br><?php echo __("Disk Quota"); ?>:
<?php if($admindata['DISK_QUOTA'] == "unlimited"){ echo __("Unlimited");} else { print_r($admindata['DISK_QUOTA'] . " mb");} ?>
</h2>
</div>
<div class="columnright" style="margin-top:10px; margin-right:80px;float: right;">
<h2><?php echo __("Nameservers"); ?>: <br>
<ul class="dashed">
<?php
$nsArray = explode(',', ($admindata['NS']));
foreach ($nsArray as &$value) {
$value = "<li>" . $value . "</li>";
}
foreach($nsArray as $val) {
echo $val;
}
?>
</ul>
</h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("Databases"); ?></h3>
<ul class="list-inline two-part">
<li><i class="fa fa-database text-purple"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_DATABASES']; ?> /
<?php if($admindata['DATABASES'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['DATABASES']); } ?>
</h1>
</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("Cron Jobs"); ?></h3>
<ul class="list-inline two-part">
<li><i class="ti-timer text-inverse"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_CRON_JOBS']; ?> /
<?php if($admindata['CRON_JOBS'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['CRON_JOBS']); } ?>
</h1>
</li>
</ul>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="white-box" style="margin:14px;">
<h3 class="box-title"><?php echo __("Web Aliases"); ?></h3>
<ul class="list-inline two-part">
<li><i class="ti-layers text-success"></i></li>
<li class="text-right">
<h1>
<?php echo $admindata['U_WEB_ALIASES']; ?> /
<?php if($admindata['WEB_ALIASES'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['WEB_ALIASES'] * $admindata['WEB_DOMAINS']); } ?>
</h1>
</li>
</ul>
</div>
</div>
</div>
</div>
<br>
<?php hotkeys($configlocation); ?>
<?php footerad(); ?><footer class="footer text-center"><?php footer(); ?></footer>
</div>
</div>
</div>
<script src="plugins/components/jquery/jquery.min.js"></script>
<script src="plugins/components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="plugins/components/sweetalert2/sweetalert2.min.js"></script>
<script src="plugins/components/jquery-overlaps/jquery.overlaps.js"></script>
<script src="plugins/components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="plugins/components/bootstrap-select/js/bootstrap-select.min.js"></script>
<script src="plugins/components/metismenu/dist/metisMenu.min.js"></script>
<script src="plugins/components/moment/moment.min.js"></script>
<script src="plugins/components/footable/footable.min.js"></script>
<script src="plugins/components/waves/waves.js"></script>
<script src="js/main.js"></script>
<script src="js/notifications.js"></script>
<script type="text/javascript">
if(window.location.href.split("/").pop().includes('#')) {
window.history.pushState({}, document.title, "index.php");
}
<?php
processPlugins();
includeScript();
if(isset($_GET['rebuild'])){
echo "Swal.fire({title:'" . __("Action Complete!") . "', icon:'success'});";
}
elseif(isset($_GET['re-error'])){
echo "Swal.fire({title:'" . __("Error Completing Action") . "', icon:'error'});";
}
?>
Waves.attach('.button', ['waves-effect']);
Waves.init();
var processLocation = "process/";
document.getElementById("recordcount").innerHTML = "<?php if ($recordcount == "") { echo "0";} else { echo $recordcount; } ?> / <?php if($admindata['DNS_RECORDS'] == "unlimited"){echo "<i class='ti-infinite'></i>";} else{ print_r($admindata['DNS_DOMAINS'] * $admindata['DNS_RECORDS']); } ?>";
(function($){
window.onresize = function(event) {
if ($('#columnleft').overlaps('#columnright')) {
$('#columnright').hide();
}
};
});
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.location = $(this).data("href");
});
});
jQuery(function($){
$('.footable').footable();
});
!function(t){"use strict";function s(t,s){for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);return t}function i(t,i){this.el=t,this.options=s({},this.options),s(this.options,i),this._init()}i.prototype.options={start:0},i.prototype._init=function(){this.tabs=[].slice.call(this.el.querySelectorAll("nav > ul > li")),this.items=[].slice.call(this.el.querySelectorAll(".content-wrap > section")),this.current=-1,this._show(),this._initEvents()},i.prototype._initEvents=function(){var t=this;this.tabs.forEach(function(s,i){s.addEventListener("click",function(s){s.preventDefault(),t._show(i)})})},i.prototype._show=function(t){this.current>=0&&(this.tabs[this.current].className=this.items[this.current].className=""),this.current=void 0!==t?t:this.options.start>=0&&this.options.start<this.items.length?this.options.start:0,this.tabs[this.current].className="tab-current",this.items[this.current].className="content-current"},t.CBPFWTabs=i}(window);
(function() { [].slice.call(document.querySelectorAll('.sttabs')).forEach(function(el) { new CBPFWTabs(el); }); })();
</script>
<?php if(INTERAKT_APP_ID != ''){ echo '
<script>
(function() {
var interakt = document.createElement("script");
interakt.type = "text/javascript"; interakt.async = true;
interakt.src = "//cdn.interakt.co/interakt/' . INTERAKT_APP_ID . '.js";
var scrpt = document.getElementsByTagName("script")[0];
scrpt.parentNode.insertBefore(interakt, scrpt);
})()
</script>'; } ?>
</body>
</html>