-
Notifications
You must be signed in to change notification settings - Fork 0
/
NotFound.php
125 lines (107 loc) · 3.31 KB
/
NotFound.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
<?php
include 'info.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Opps..! 404 Page Not Found | <?php echo ''.$sitename.'';?></title>
<!-- Meta Tags -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<header><a href="<?php echo ''.$site.'';?>"><img src="<?php echo ''.$site.'';?>/code/img/logo.png" height="30px" width="auto"/></a>
</header>
<div class="tags">
ads here
</div>
<div class="search"><form id="searchform" method="get" action="/search.php" method="post" class="input-group"><input class="block" type="text" id="q" name="q" placeholder="Search What You Want!!" id="input" autocomplete="off" required><span class="inp-btn"><input type="submit" value="Search"></span></form></div>
<h3>Requested Page Not Found</h3>
<ul class="itemlist">
<li>
<strong><font color="red">May You Are Trying To Input Extra Something In URL. We Couldn't Found The Page That You Was Requested For. Please Be Sure What Are You Trying To Find. Please Use The Search Box To Found It Easily.</font></strong>
</li>
</ul>
<?php
include 'inc/func.php';
include 'inc/info.php';
if($_GET['q'])
{
$q = $_GET['q'];
}
else
{
$a = array("Extra Express");
$b = count($a)-1;
$q = $a[rand(0,$b)];
}
$qu=$q;
$qu=str_replace(" ","+", $qu);
$qu=str_replace("-","+", $qu);
$qu=str_replace("_","+", $qu);
echo '<div><h3>Latest Videos</h3></div>';
if(strlen($_GET['page']) >1)
{
$yesPage=$_GET['page'];
}
else
{
$yesPage='';
}
$grab = ngegrab('https://www.googleapis.com/youtube/v3/search?part=snippet&order=relevance®ionCode=lk&q='.$qu.'&channelId=UCirhRxHT_jt4cELr7OzsOZw&key='.$key.'&maxResults=10&pageToken='.$yesPage.'&type=video');
$json = json_decode($grab);
$nextpage=$json->nextPageToken;
$prevpage=$json->prevPageToken;
if($json)
{
foreach ($json->items as $hasil)
{
$id = $hasil->id->videoId;
$name = $hasil->snippet->title;
$description = $hasil->snippet->description;
$channel = $hasil->snippet->channelTitle;
$channelid = $hasil->snippet->channelId;
$addedon = dateyt($hasil->snippet->publishedAt);
$thumbnail = $hasil->snippet->thumbnail;
$hasil = ngegrab('https://www.googleapis.com/youtube/v3/videos?key='.$key.'&part=contentDetails,statistics&id='.$id.'');
$dt = json_decode($hasil);
foreach ($dt->items as $dta)
{
$time = $dta->contentDetails->duration;
$duration = format_time($time);
$views = $dta->statistics->viewCount;
$likes = $dta->statistics->likeCount;
$dislikes = $dta->statistics->dislikeCount;
}
echo '<ul class="itemlist">
<li>
<div class="thumb">
<a href="/watch?v='.$id.'" title="'.$name.'">
<img src="http://ytimg.googleusercontent.com/vi/'.$id.'/mqdefault.jpg" alt="'.$name.'" width="60px" height="55px" alt="'.$name.'"/></a>
</div>
<div class="meta">
<a href="/watch?v='.$id.'" title="'.$name.'">
<b>'.$name.'</b>
</a>
<br/>
By '.$channel.'
</div>
</li>
</ul>';
}
echo '<div class="nav" style="text-align:center;">';
if (strlen($prevpage)>1)
{
echo '<a href="/index.php?page='.$prevpage.'" class="page_item" title="Previous Page">Prev</a> ';
}
if (strlen($nextpage)>1)
{
echo '';
}
echo '</div>';
}
?>
<?php include 'inc/foot.php';?>