forked from byxiaorun/you2php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
158 lines (130 loc) · 5.21 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
<?php
if(!file_exists('./config.php')){
header('Location: ./install.php');
exit();
}
require_once "lang.conf.php";
include("./lib.php");
$headtitle=$lang['INDEX_HTITLE'].'-'.SITE_NAME;
include("./header.php");
if(isset($_GET['v'])){
if(stripos($_GET['v'],'youtu.be')!==false || stripos($_GET['v'],'watch?v=')!==false ){
preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $_GET['v'], $matches);
$str='./watch.php?v='.$matches[1];
header("Location:$str");
exit();
}else{
$str='./search.php?q='.$_GET['v'];
header("Location: $str");
exit();
}
}
?>
<div class="container-fluid d-lg-none d-md-none" style="background:#e62117">
<div class="container p-1">
<div class="row text-center p-1" >
<div class="col-4"><a class="topbara" href="./"><i class="fa d-inline hico fa-home text-white"></i></a></div>
<div class="col-4"><a class="topbara" href="./content.php?cont=trending"><i class="fa d-inline hico fa-fire txt-topbar"></i></a></div>
<div class="col-4"><a class="topbara" href="./content.php?cont=history"><i class="fa d-inline hico fa-history txt-topbar"></i></a></div>
</div>
</div>
</div>
<div class="container d-lg-none d-md-none py-2" style="padding-right: 5px;padding-left: 5px;">
<div class="row ml-0 mr-0">
<div class="topmenu w-100 px-2">
<div class="swiper-container">
<div class="swiper-wrapper">
<?php
echo '<span class="swiper-slide"><a href="./" class="text-primary">'.$lang['INDEX_HOME'].'</a></span>';
foreach (categorieslist('all') as $k => $val) {
echo '<span class="swiper-slide"><a href="./content.php?cont=category&sortid='.$k.'" class="text-dark">'.$val.'</a></span>';
}
?>
</div>
</div>
</div>
</div></div>
<div class="container d-lg-none d-md-none p-0">
<div id="lb" class="carousel slide" data-ride="carousel" width="100%">
<?php
$feedlist=random_recommend();
$feed=array();
foreach ($feedlist as $v) {
$feed[]=$v['dat'][0];
}
echo ' <ul class="carousel-indicators">';
for ($i = 1; $i < count($feed); $i++) {
if($i == 1){
echo '<li data-target="#lb" data-slide-to="'.$i.'" class="active"></li>';
}else{
echo '<li data-target="#lb" data-slide-to="'.$i.'"></li>';
}
}
echo '</ul>
<div class="carousel-inner">';
foreach ($feed as $key => $val) {
if($key==0){
echo '
<div class="carousel-item active">
<a href="./watch.php?v='.$val['id'].'">
<img src="./thumbnail.php?type=mqdefault&vid='.$val['id'].'" class="img-responsive">
</a>
<div class="carousel-caption">
<p class="my-0 text-white">'.$val['title'].'</p>
</div>
</div>';
}else{
echo '<div class="carousel-item">
<a href="./watch.php?v='.$val['id'].'">
<img src="./thumbnail.php?type=mqdefault&vid='.$val['id'].'" class="img-responsive">
</a>
<div class="carousel-caption text-truncate">
<pclass="my-0 text-white">'.$val['title'].'</p>
</div>
</div>';
}
}
echo '</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 ">
<div class="col-md-12 pb-3 d-none d-sm-none d-md-block" style="background: url(./inc/homebg.jpg) no-repeat;background-size: cover;background-position: center -80px;text-align: center;
">
<h3 class="pt-5 pb-2 text-white"><?php echo $lang['INDEX_M1']?></h3>
<form>
<div class="form-group" >
<input type="text" name="v" style="width: 50%;height: 50px;border: none;box-sizing: border-box;padding: 14px 18px;" placeholder="<?php echo $lang['INDEX_PL1']?>" autocomplete="off" /><button type="submit" style="width: 18%;border: none;height: 50px;background-color: #e62117;color: #fff;font-size: 18px;display: inline-block;" ><i class="fa fa-youtube-play fa-lg pr-1"></i><?php echo $lang['INDEX_PLAY']?></button>
</div>
</form>
<p class="text-white m-0"><?php echo $lang['INDEX_P_M1']?></p>
<p class="text-white m-0"><?php echo $lang['INDEX_P_M2']?></p>
<p class="text-white m-0"><?php echo $lang['INDEX_P_M3']?></p>
<p class="text-white m-0"><?php echo $lang['INDEX_P_M4']?></p>
</div>
<div class="row pt-2 pb-2">
<div class="col-8 sm-p">
<span class="txt2 ricon h5"><?php echo $lang['INDEX_M2']?></span>
</div>
<div class="col-4 text-right sm-p">
<a href="./content.php?cont=trending" title="<?php echo $lang['INDEX_M3']?>" target="_blank" class="icontext h6 pl-1 "><?php echo $lang['INDEX_M3']?><i class="fa d-inline fa-lg fa-angle-double-right"></i></a>
</div>
</div>
<div id="videocontent" class="videocontentrow"></div>
<div id="recommend" class="videocontentrow"></div>
<script>
$("#videocontent").load('./ajax/ajax.php?type=trending');
$("#recommend").load('./ajax/ajax.php?type=recommend');
</script>
</div>
</div>
</div>
<?php
include("./footer.php");
?>