diff options
| author | root | 2014-03-12 16:03:05 +0100 |
|---|---|---|
| committer | root | 2014-03-12 16:03:05 +0100 |
| commit | c5eb023d8ecedee1f94aff6892df818f85a0d8a3 (patch) | |
| tree | 9482189a91d9b53d5bdb2611f76f59d1864654f0 | |
| parent | 9c65f42d3c406f30c763dd12a5d68dd7850bd7f4 (diff) | |
| download | random-c5eb023d8ecedee1f94aff6892df818f85a0d8a3.tar.gz | |
merge incomming
| -rw-r--r-- | www/index.php | 2 | ||||
| -rw-r--r-- | www/youtube.php | 25 |
2 files changed, 19 insertions, 8 deletions
diff --git a/www/index.php b/www/index.php index 436bfeb..24db3f5 100644 --- a/www/index.php +++ b/www/index.php @@ -8,6 +8,6 @@ switch($_GET["task"]){ include("puush.php"); break; default: - include("failure.php") + include("failure.php"); break; } diff --git a/www/youtube.php b/www/youtube.php index 37654e5..05d61d6 100644 --- a/www/youtube.php +++ b/www/youtube.php @@ -1,12 +1,18 @@ <!Doctype html> <head> -<title>Random Youtube Video</title> -<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'> +<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> +<!--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 +include("header.php"); // generates the $youtube object with API version 2 $clientLibraryPath = "../zend/library"; @@ -51,9 +57,11 @@ function printVideoFeed($videoFeed) $res_quant = count($videoFeed); $video = mt_rand(0, $res_quant-1); - - $videoId = printVideoEntry($videoFeed[$video]); - + if(!empty($video)){ + $videoId = printVideoEntry($videoFeed[$video]); + } else { + header("Refresh: 0; /youtube"); + } return $videoId; } @@ -86,9 +94,12 @@ function start($yt){ $videoID = start($yt); ?> -<h1>A random youtube video!</h1> <br> +<h1>A random YouTube video!</h1> <br> <iframe width="560" height="315" src="https://www.youtube.com/embed/<? echo $videoID ?>" frameborder="0" allowfullscreen></iframe> <br><br> <a href="youtube">Get another one</a> </center> + +<?include("piwik.php"); + |
