summaryrefslogtreecommitdiff
path: root/www/youtube.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/youtube.php')
-rw-r--r--www/youtube.php44
1 files changed, 9 insertions, 35 deletions
diff --git a/www/youtube.php b/www/youtube.php
index b4c241b..db173e4 100644
--- a/www/youtube.php
+++ b/www/youtube.php
@@ -1,40 +1,14 @@
<?php
-include("include.php");
+require_once("functions/func_youtube.php");
+require_once("func.php");
-if(!isset($_GET["id"])){
- if(!isset($videoID)){
- $videoID = start($yt);
- }
-} else {
- $videoID = $_GET["id"];
-}
-?>
-<!Doctype html>
-<head>
-<title>Random YouTube Video</title>
-<meta http-equiv='Content-type' content='text/html; charset=utf-8' />
-<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' />
-<link rel='stylesheet' type='text/css' href='style.css'/>
-</head>
-<!--body link='#000000' alink='#000000' vlink='#6a6862'>
-<body link='#000000' alink='#000000' vlink='#41403d'>
-<body link='#000000' alink='#000000' vlink='#2c2b29'-->
-<body vlnk='#5b5b5b' vlink='#000000' link='#000000' alink='#9a9696'>
-<center>
-
-<?php
-$new_id = start($yt);
-include("header.php");
-?>
+$vid = start($yt);
-<h1>A random youtube video!</h1> <br>
-<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $videoID ?>" frameborder="0" allowfullscreen></iframe> <br><br>
-
-<?php
-echo "<a href=\"/youtube?id=".$new_id."\">Get another one</a>";
?>
-
-</center>
-
-<?php include("piwik.php");
+<h1><?php echo get_yt_title($vid); ?></h1>
+<br>
+<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $vid ?>" frameborder="0" allowfullscreen></iframe>
+<br>
+<br>
+<p><a href="/download_yt.php?vid=<?php echo $vid; ?>&ddl=1" class='mail'>Download</a> this video! | Blocked in your country? Try <a href="/video/<?php echo $vid; ?>" class='mail'>this</a>!</p>