forked from PRNDA/you2php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
content.php
128 lines (114 loc) · 4.99 KB
/
content.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
<?php
require_once "lang.conf.php";
include "./lib.php";
$cont = $_GET['cont'];
$ptk = $_GET['pageToken'];
$sortid = $_GET['sortid'];
$order = isset($_GET['order']) ? $_GET['order'] : 'relevance';
switch ($cont) {
case 'history':
$headtitle=$lang['CONTENT_T_HIST'];
break;
case 'category':
$headtitle=categorieslist($sortid).'-'.SITE_NAME;
break;
case 'trending':
$headtitle=$lang['CONTENT_T_TREND'].'-'.SITE_NAME;
break;
case 'DMCA':
$headtitle=$lang['CONTENT_T_DMCA'].'-'.SITE_NAME;
break;
case 'video':
$headtitle=$lang['CONTENT_T_VID'].'-'.SITE_NAME;
break;
case 'api':
$headtitle=$lang['CONTENT_T_API'].'-'.SITE_NAME;
break;
}
include "./header.php";
if($cont=="trending"){
echo'<div class="container-fluid d-lg-none d-md-none" style="background:#e62117">
<div class="container">
<div class="row text-center" >
<div class="col-4"><a class="navbar-brand topbara" href="./"><i class="fa d-inline fa-lg fa-home txt-topbar"></i></a></div>
<div class="col-4"><a class="navbar-brand topbara" href="./content.php?cont=trending"><i class="fa d-inline fa-lg fa-fire text-white"></i></a></div>
<div class="col-4"><a class="navbar-brand topbara" href="./content.php?cont=history"><i class="fa d-inline fa-lg fa-history txt-topbar"></i></a></div>
</div>
</div>
</div>';
}elseif ($cont=="history") {
echo '<div class="container-fluid d-lg-none d-md-none" style="background:#e62117">
<div class="container">
<div class="row text-center" >
<div class="col-4"><a class="navbar-brand topbara" href="./"><i class="fa d-inline fa-lg fa-home txt-topbar"></i></a></div>
<div class="col-4"><a class="navbar-brand topbara" href="./content.php?cont=trending"><i class="fa d-inline fa-lg fa-fire txt-topbar"></i></a></div>
<div class="col-4"><a class="navbar-brand topbara" href="./content.php?cont=history"><i class="fa d-inline fa-lg fa-history text-white"></i></a></div>
</div>
</div>
</div>';
}
?>
<div class="container py-2">
<div class="row">
<div class="col-md-3 d-none d-sm-none d-md-block">
<div id="menu"></div>
<script>$("#menu").load('<?php echo './ajax/ajax.php?type=menu' ?>');</script>
</div>
<div class="col-md-9 relatedlist">
<?php
switch ($cont) {
case 'history':
echo '<div id="history"></div>
<script>
$("#history").load(\'./ajax/ajax.php?type=history\');
</script>';
break;
case 'DMCA':
echo '<div id="DMCA"></div>
<script>
$("#DMCA").load(\'./ajax/ajax.php?type=DMCA\');
</script>';
break;
case 'api':
echo '<div id="api"></div>
<script>
$("#api").load(\'./ajax/ajax.php?type=api\');
</script>';
break;
case 'video':
echo '<div id="videos"></div>
<script>';
$g=isset($_GET['v'])?"&v={$_GET['v']}":'';
echo '$("#videos").load(\'./ajax/ajax.php?type=videos'.$g.'\');
</script>';
break;
case 'trending':
echo '<div id="videocont"></div>
<script>
$("#videocont").load(\'./ajax/ajax.php?type=trendinglist&ptk=' . $ptk . '\');
</script>';
break;
case 'category':
switch ($order) {
case 'date':
$date1 = 'selected';
break;
case 'viewCount';
$viewCount = 'selected';
break;
default:
$relevance = 'selected';
}
if(isset($_GET['sortid'])){echo '<div class="font-weight-bold h6 pb-1">'.categorieslist($sortid).'</div> ';}
echo '<div class="row"> <div class="col-md-12 selectalign pb-3"><select class="custom-select" id="paixu">';
echo '<option '. $relevance .' data-url="./ajax/ajax.php?type=category&sortid='.$sortid.'&ptk='.$ptk.'">'.$lang['CONTENT_OPT1'].'</option>';
echo '<option ' . $date1 .' data-url="./ajax/ajax.php?type=category&sortid='.$sortid.'&order=date&ptk='.$ptk.'">'.$lang['CONTENT_OPT2'].'</option>';
echo '<option ' . $viewCount .' data-url="./ajax/ajax.php?type=category&sortid='.$sortid.'&order=viewCount&ptk='.$ptk.'">'.$lang['CONTENT_OPT3'].'</option>';
echo '</select></div></div>';
echo '<div id="videocont"></div><script>$("#videocont").load(\'./ajax/ajax.php?type=category&sortid='. $sortid .'&order='.$order.'&ptk='.$ptk.'\');$(\'#paixu\').on(\'change\', function() {loadPage($(this).find(\':selected\').data(\'url\'));});function loadPage(url) {$("#videocont").load(url);}</script>';
break;
}?>
</div>
</div>
</div>
<?php include "./footer.php";?>