diff options
| author | moehm | 2014-05-30 11:04:28 +0200 |
|---|---|---|
| committer | moehm | 2014-05-30 11:04:28 +0200 |
| commit | d6997febbdf6d424fcd0702e3324588387dc2cd9 (patch) | |
| tree | 9ebe96433d2ae394e95a78e87e1a7f0831ab85b0 | |
| parent | e5e8ee54e4b404d0cbdf69bebc3d9bdd9bd04855 (diff) | |
| download | random-d6997febbdf6d424fcd0702e3324588387dc2cd9.tar.gz | |
rewrite
34 files changed, 418 insertions, 430 deletions
@@ -4,3 +4,4 @@ *.db *.sqlite tmp/ +old/ diff --git a/www/.index.php.swp b/www/.index.php.swp Binary files differdeleted file mode 100644 index 61c46e1..0000000 --- a/www/.index.php.swp +++ /dev/null diff --git a/www/403.php b/www/403.php deleted file mode 100644 index 4b354b8..0000000 --- a/www/403.php +++ /dev/null @@ -1,8 +0,0 @@ -<!Doctype html> -<head> -<title>Access forbidden</title> -</head> -<body> -<center> -<p>Facebook steals your data and violates your privacy.</p> -</center> diff --git a/www/404.jpg b/www/404.jpg Binary files differdeleted file mode 100644 index 36de85b..0000000 --- a/www/404.jpg +++ /dev/null diff --git a/www/about.php b/www/about.php deleted file mode 100644 index 1898cf2..0000000 --- a/www/about.php +++ /dev/null @@ -1,56 +0,0 @@ -<!Doctype html> -<head> -<title>About random</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'/> -<style type='text/css'> -p2 { - font-size: 130%; - color: #789922; -} -</style> -</head> -<body vlnk='#5b5b5b' vlink='#000000' link='#000000' alink='#9a9696'> -<center> - -<?php -include("header.php"); -include("piwik.php"); -?> -<table width='700px'> -<tr> -<td><h1>Waah!~</h1></td> -</tr> -<tr> -<td><img src='loli_small.jpg'/></td> -</tr> -<tr> -<td></td> -</tr> -<tr> -<td> -<br> -</td> -</tr> -<tr> -<td><p1><font color="#789922">> I-It's not like I made this page for you or a-anything..~</font></p1></td> -</tr> -<tr> -<td><br></td> -</tr> -<tr> -<td>I'm just a random dude who thinks this is funny.</td> -</tr> -<tr> -<td>You can always contact me using <a href="mailto:mail@iamfabulous.eu"><font color='blue'>mail@iamfabulous.de</font></a>.</td> -</tr> -<tr> -<td>Let me know what you think! -</td> -</tr> -</table> - -</center> - - diff --git a/www/background.png b/www/background.png Binary files differdeleted file mode 100644 index ca5ff2c..0000000 --- a/www/background.png +++ /dev/null diff --git a/www/background2.png b/www/background2.png Binary files differdeleted file mode 100644 index 5be72e2..0000000 --- a/www/background2.png +++ /dev/null diff --git a/www/dead_link.png b/www/dead_link.png Binary files differdeleted file mode 100755 index 37eb36b..0000000 --- a/www/dead_link.png +++ /dev/null diff --git a/www/error.php b/www/error.php deleted file mode 100644 index f930068..0000000 --- a/www/error.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -switch($_GET["e"]){ - case("401"): - $title="401"; - $message="Restricted area. Access denied."; - break; - case("403"): - $title="403"; - $message="I could do that. I choose not to..."; - break; - case("404"): - $title="404"; - $message="These aren't the droids you are looking for."; - break; - case("500"): - $title="500"; - $message="Upps, there went something wrong. Don't worry, that's not your fault. Just refresh this site and it should work again."; - header("Refresh: 2;"); - break; - case("502"): - $title="502"; - $message="Bad Gateway. It's not my fault, really.'"; - break; - case("504"): - $title="504"; - $message="Sorry, I don't have the whole day time. Too impatient."; - break; -} - -?> -<!DOCTYPE html> -<html> -<head> - <title><?php echo $title; ?> error code></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 vlnk='#5b5b5b' vlink='#000000' link='#000000' alink='#9a9696'> -<center> -<?php -include("header.php"); -include("piwik.php"); - -echo "<h1>".$title." error!</h1>"; -echo "<p>".$message."</p>"; -?> -<a href="">Try again<a> -</body> diff --git a/www/func.php b/www/func.php new file mode 100644 index 0000000..9d6ebac --- /dev/null +++ b/www/func.php @@ -0,0 +1,39 @@ +<?php + +function failure($reason){ + header("HTTP/1.1 404 Not Found"); + echo $reason; + exit; +} + +function get_all_yt_data($id){ + $data = file_get_contents("https://gdata.youtube.com/feeds/api/videos/".$id.""); + $data = preg_replace("/yt:statistics/", "ytstatistics", $data); + $data = preg_replace("/media:group/", "mediagroup", $data); + $data = preg_replace("/media:description/", "mediadescription", $data); + $data = preg_replace("/gd:rating/", "gdrating", $data); + $xmldata = simplexml_load_string($data); + + $title = $xmldata->title[0]; + $viewCount = $xmldata->ytstatistics["viewCount"]; + $author = $xmldata->author->name[0]; + $desc = $xmldata->mediagroup->mediadescription[0]; + $date = $xmldata->published[0]; + $rate = $xmldata->gdrating["average"]; + + $res["title"] = $title; + $res["viewCount"] = $viewCount; + $res["author"] = $author; + $res["desc"] = $desc; + $res["date"] = $date; + $res["rate"] = $rate; + + return $res; +} + +function get_yt_title($id){ + $data = file_get_contents("https://gdata.youtube.com/feeds/api/videos/".$id.""); + $xmldata = simplexml_load_string($data); + $title = $xmldata->title[0]; + return $title; +} diff --git a/www/header.php b/www/header.php deleted file mode 100644 index dff4355..0000000 --- a/www/header.php +++ /dev/null @@ -1,30 +0,0 @@ -<div id='header' align='center' class='small'> -<table width='700px'><tr> -<td><a href='/'>Home</a></td> -<td>|</td> - -<?php -if(isset($new_id)){ - echo "<td><a href='/youtube?id=".$new_id."'>Youtube</a></td>"; -} else { - if(isset($videoID)){ - echo "<td><a href='/youtube?id=".$videoID."'>Youtube</a></td>"; - } else { - echo "<td><a href='/youtube'>Youtube</a></td>"; - } -} -?> -<td>|</td> -<td><a href='/puush'>Puush</a></td> -<td>|</td> -<td><a href='/about'>About</a></td> -</tr> -</table> -</div> -<div> -<table width='700px'><tr> -<td> -<hr> -</td> -</table> -</div> diff --git a/www/include.php b/www/include.php deleted file mode 100644 index ad9562d..0000000 --- a/www/include.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -$functiondir = "functions/"; - -require_once($functiondir . "func_youtube.php"); -require_once($functiondir . "func_puush.php"); diff --git a/www/index.php b/www/index.php index cf851e8..23cc3ff 100644 --- a/www/index.php +++ b/www/index.php @@ -1,28 +1,56 @@ -<? +<!doctype html> +<html> +<head> + <title>A random youtube video!</title> + <link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'> + <link rel="stylesheet" href="/static/style.css"> + <link rel="stylesheet" href="/static/content.css"> + <link rel="stylesheet" href="/static/noscript.css"> + <script type='text/javascript'> -include("include.php"); + function get_random_video(){ + r = new XMLHttpRequest(); + r.onreadystatechange=function(){ + if(r.readyState == 4 && r.status == 200){ + if(r.responseText == ""){ + location.reload(); + } else { + document.getElementById('middle').innerHTML=r.responseText; + } + } + } + r.open('GET', '/youtube.php', true); + r.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + r.send(); + } + <?php /* + function prep_player(){ + r = new XMLHttpRequest(); + r.onreadystatechange=function(){ + if(r.readyState == 4 && r.status == 200){ + document.getElementById('test1').innerHTML=r.responseText; + } + } + r.open('POST', 'print_video.php', true); + r.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + r.send('mime=<?php echo $mime; ?>', 'vname=<?php echo $filename?>'); + <?php /* + r.send('vid=<?php echo $vid; ?>', mime='<?php echo $mime; ?>', 'vname=<?php echo $filename?>'); + r.send('vid=<?php echo $_GET["vid"]; ?>', 'strm=1'); */ ?> + </script> +</head> -if(empty($_GET["task"])){ - $videoID = start($yt); - include("print_index.php"); -} else { -switch($_GET["task"]){ - case("youtube"): - include("youtube.php"); - break; - case("puush"): - include("puush.php"); - break; - case("about"): - include("about.php"); - break; - case("random"): - $array = array("youtube.php", "puush.php", "about.php", "lolrndm.php"); - $site = mt_rand(0, count($array)-1); - include($array[$site]); - break; - default: - include("lolrndm.php"); - break; -} -} +<body onload=get_random_video()> + <?php require_once("static/header.html"); ?> + <?php require_once("static/noscript.html"); ?> + <div align='center'> + <div id='middle'> + <h1>Fetching a random youtube video!</h1> + <br> + <p>One moment please.</p> + <br> + <br> + <img src='/static/ajax-loader.gif'> + </div> + </div> + <?php require_once("static/footer.php"); ?> diff --git a/www/loli.jpg b/www/loli.jpg Binary files differdeleted file mode 100644 index 2c67c89..0000000 --- a/www/loli.jpg +++ /dev/null diff --git a/www/loli.png b/www/loli.png Binary files differdeleted file mode 100644 index 3a9b4af..0000000 --- a/www/loli.png +++ /dev/null diff --git a/www/loli_middle.jpg b/www/loli_middle.jpg Binary files differdeleted file mode 100644 index 5a37f78..0000000 --- a/www/loli_middle.jpg +++ /dev/null diff --git a/www/loli_small.jpg b/www/loli_small.jpg Binary files differdeleted file mode 100644 index 3248814..0000000 --- a/www/loli_small.jpg +++ /dev/null diff --git a/www/lolrndm.php b/www/lolrndm.php deleted file mode 100755 index eee3c8a..0000000 --- a/www/lolrndm.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -$swf_array = array("Battletoads", "Gununu_all", "Teledance", "baximusgettindown", "Mormon_Jesus", "Pi", "god_damn_trains" ); - -$length = count($swf_array); -$index = mt_rand(0,$length-1); - -//$random="https://u.iamfabulous.de/".$swf_array[$index].".swf"; -//$random="http://cdn.complicissimus.de/swf/".$swf_array[$index].".swf"; -$random="https://cdn.iamfabulous.de/swf/".$swf_array[$index].".swf"; -?> -<!DOCTYPE html> -<html> -<head><title>40x - Error Code</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 vlnk='#5b5b5b' vlink='#000000' link='#000000' alink='#9a9696'> -<center> -<?php include("header.php"); ?> -<h1>Nope. Not here. ;_;</h1> -<p>This doesn't look like the page you requested.</p> -<p> - <object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" - codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"> - <param name="movie" value="Gununu_all.swf"> - <param name="quality" value="high"> - <param name="scale" value="exactfit"> - <param name="menu" value="true"> - <param name="bgcolor" value="#000040"> -<?// <embed src="<?php echo $random; " quality="high" scale="exactfit" menu="false" ?> - <embed src="https://cdn.iamfabulous.de/swf/Gununu_all.swf" quality="high" scale="exactfit" menu="false" - bgcolor="#000000" width="600" height="400" swLiveConnect="false" - type="application/x-shockwave-flash" - pluginspage="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"> - </embed> - </object> -</p> -<br> -<p>Complaints oder suggestions for new flash files at <a href="mailto:mail@iamfabulous.de">mail@iamfabulous.de</a>.</p> -<p><a href="/"><font color='blue'>Back to start<font/></a></p> -</center> - -</body> diff --git a/www/piwik.php b/www/piwik.php deleted file mode 100644 index 9a60338..0000000 --- a/www/piwik.php +++ /dev/null @@ -1,13 +0,0 @@ -<script type="text/javascript"> - var _paq = _paq || []; - _paq.push(["trackPageView"]); - _paq.push(["enableLinkTracking"]); - - (function() { - var u=(("https:" == document.location.protocol) ? "https" : "http") + "://a.iamfabulous.de/"; - _paq.push(["setTrackerUrl", u+"piwik.php"]); - _paq.push(["setSiteId", "3"]); - var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; - g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s); - })(); -</script><noscript><img src="https://a.iamfabulous.de/piwik.php?idsite=3&rec=1" style="border:0" alt="" /></noscript> diff --git a/www/print_index.php b/www/print_index.php deleted file mode 100644 index a076a9a..0000000 --- a/www/print_index.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -include("include.php"); -?> -<!Doctype html> -<head> -<title>Welcome</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'/> -<style type='text/css'> -a2 { - color: blue; -} -tt { - text-align: center; -} -</style> -</head> - -<body vlink='#000000' link='#000000' alink='#9a9696'> -<center> -<?php include("header.php"); ?> -<table align="center"><tr><td> -<h1> Welcome! </h1> -<?php //<img src="404.jpg" alt="404 - not found"> ?> - -</td></tr><tr><td> -On this website, you can get a random -</td></tr><tr><td> -</td></tr><tr><td> -</td></tr><tr><td> -<ul> -<li> -<table><tr><td> -<a href="/youtube?id=<?php echo $videoID; ?>">YouTube video</a> -</td></tr></table> -</li> -<li> -<table><tr><td> -<a href="/puush">puush file</a> -</td></tr></table> -</li> -<li> -<table><tr><td> -<a href="/random">random subsite</a> -</td></tr></table> -</li> -</ul> -</td></tr> -<tr><td> -</td></tr><tr><td> -completely free and as often as you like. -</td></tr> -</table> - -<br><br> -For comments, questions or suggestions drop a <br> <a href="/about"><font color='blue'>mail</font></a>. - -<?php include("piwik.php");?> - -</body> -</html> diff --git a/www/puush.php b/www/puush.php deleted file mode 100644 index d8aafd6..0000000 --- a/www/puush.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -include("include.php"); -?> -<!Doctype html> -<head> -<title>Random Youtube Video</title> -<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'> -<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' /> -<link rel='stylesheet' type='text/css' href='style.css'/> -</head> -<body vlnk='#5b5b5b' vlink='#000000' link='#000000' alink='#9a9696'> -<center> -<?php -include("header.php"); -include("piwik.php"); -?> -<h1>A random "puu.sh" file!</h1> -<br> - -<?php -$count = 0; - -$count = get_image($count); - -echo " -<br><br> - -<p>We tried for " . $count . " times.</p> - -<br> -<a href='/puush'>Try again</a> - -</center> -"; -?> diff --git a/www/static/ajax-loader.gif b/www/static/ajax-loader.gif Binary files differnew file mode 100644 index 0000000..d0bce15 --- /dev/null +++ b/www/static/ajax-loader.gif diff --git a/www/static/alegreya_sans_sc.woff b/www/static/alegreya_sans_sc.woff Binary files differnew file mode 100755 index 0000000..60e4c5f --- /dev/null +++ b/www/static/alegreya_sans_sc.woff diff --git a/www/static/content.css b/www/static/content.css new file mode 100644 index 0000000..72ba3a4 --- /dev/null +++ b/www/static/content.css @@ -0,0 +1,131 @@ +input[type=text]{ + border: none; + box-shadow: inset 0px 0px 1px 1px #1F3D4C; + border-radius: 0; + height: 35px; + font-size: 25px; + margin-top: 15px; + width: 600px; + padding-left: 5px; +} + +#middle { + position: fixed; + left: 50%; + margin-left: -300px; + top: 45%; + margin-top: -200px; + width: 600px; + height: 400px; + text-align: center; +} + +.button { + -moz-box-shadow:inset 0px 1px 0px 0px #dcecfb; + -webkit-box-shadow:inset 0px 1px 0px 0px #dcecfb; + box-shadow:inset 0px 1px 0px 0px #dcecfb; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bddbfa), color-stop(1, #80b5ea) ); + background:-moz-linear-gradient( center top, #bddbfa 5%, #80b5ea 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bddbfa', endColorstr='#80b5ea'); + background-color:#bddbfa; + -webkit-border-top-left-radius:0px; + -moz-border-radius-topleft:0px; + border-top-left-radius:0px; + -webkit-border-top-right-radius:0px; + -moz-border-radius-topright:0px; + border-top-right-radius:0px; + -webkit-border-bottom-right-radius:0px; + -moz-border-radius-bottomright:0px; + border-bottom-right-radius:0px; + -webkit-border-bottom-left-radius:0px; + -moz-border-radius-bottomleft:0px; + border-bottom-left-radius:0px; + text-indent:0; + border:1px solid #84bbf3; + display:inline; +/* display:inline-block; + display:block; */ + color:#ffffff; + font-size:15px; + font-weight:bold; + font-style:normal; + height:40px; + line-height:40px; + width:100px; + text-decoration:none; + text-align:center; + text-shadow:1px 1px 0px #528ecc; +} +.button:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #80b5ea), color-stop(1, #bddbfa) ); + background:-moz-linear-gradient( center top, #80b5ea 5%, #bddbfa 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80b5ea', endColorstr='#bddbfa'); + background-color:#80b5ea; +}.button:active { + position:relative; + top:1px; +} + + +#button-input{ + height: 40px; + width: 120px; + border: none; + box-shadow: inset 0px 0px 1px 1px #1F3D4C; + border-radius: 0; + font-size: 25px; + margin-top: 15px; + display:block; + + border: none; + margin-top: 15px; + margin-bottom: 15px; + display:block; + padding-left: 5px; +} + +.menu_middle{ + font-size: 15pt; + display:inline-block; + height: 45%; + margin: 20px; + position: relative; +/* + width: 100%; + position: fixed; + height: 45px; + position: relative; + margin: 10px; + top: 50%; + left: 50%; + margin-left: -300px; + margin-top: -200px; + width: 600px; + height: 400px; + text-align: center; +*/ +/* + height: 70px; + width: 70px; + margin-top: 5px; + margin-left: 5px; + text-align: right; + position: fixed; +*/ +/* top: -25px; */ + /*color: #5b5b5b; */ +} +a:link { + color: white; +} +a:visited { + color: white; +} +a.menu_middle{ + color: white; + +} + +a.mail{ + color: black; +} diff --git a/www/static/footer.php b/www/static/footer.php new file mode 100755 index 0000000..c3978f1 --- /dev/null +++ b/www/static/footer.php @@ -0,0 +1,10 @@ + <!-- ______________________Content End______________________ --> + </div><!-- div content-area--> + </div><!-- div page-wrap--> + <footer> + <p id="copyright-text" align='right'> Copyright 2014 Maximilian Möhring</p> + </footer> + <?php //include("piwik.html"); ?> + </body> +</html> + diff --git a/www/static/header.html b/www/static/header.html new file mode 100755 index 0000000..fc96659 --- /dev/null +++ b/www/static/header.html @@ -0,0 +1,29 @@ + <div id="page-wrap"> + + <!--div class="header-bar"> + < a href="/" class="logo"> </a > + <nav class='menu_middle'> + <a href="/" >Home</a> + + + | + + + <a href="/help" >Help</a> + + + | + + + <a href="/faq" >About</a> + + + | + + + <a href="/random" >Random</a> + </nav> + </div --> + + <div id="content-area"> + <!-- ______________________Content Start______________________ --> diff --git a/www/static/index.css b/www/static/index.css new file mode 100644 index 0000000..f06c84c --- /dev/null +++ b/www/static/index.css @@ -0,0 +1,4 @@ +h1 { + text-align: center; + font-size: 40pt; +} diff --git a/www/static/noscript.css b/www/static/noscript.css new file mode 100644 index 0000000..484f99e --- /dev/null +++ b/www/static/noscript.css @@ -0,0 +1,25 @@ +#ns{ + width: 100%; + height: 100%; + position: fixed; + z-index: 99; + top: 0px; + opacity: 0.85; + background: white; + color: red; + font-size: 20pt; +/* visibility: hidden; + background: #ecece1; */ +} + +#ns-area{ + height: 390px; + width: 400px; + position: fixed; + top: 30%; + margin-top: -100px; + padding: 10px; + left: 50%; + margin-left: -200px; +/* border: 1px solid black; */ +} diff --git a/www/static/noscript.html b/www/static/noscript.html new file mode 100644 index 0000000..5f78e41 --- /dev/null +++ b/www/static/noscript.html @@ -0,0 +1,9 @@ +<noscript id="ns"> + <div id="ns-area" align="center"> + <h2>Sorry, this site doesn't work without JavaScript!</h2> + <br> + <p>Enable it or leave.</p> + <br> + <p style="font-size:12pt; color:black;">Read here why: https://en.wikipedia.org/wiki/Ajax_%28programming%29 </p> + </div> +</noscript> diff --git a/www/piwik.js b/www/static/piwik.html index 3837901..91e8c63 100644 --- a/www/piwik.js +++ b/www/static/piwik.html @@ -6,8 +6,9 @@ (function() { var u=(("https:" == document.location.protocol) ? "https" : "http") + "://a.iamfabulous.de/"; _paq.push(["setTrackerUrl", u+"piwik.php"]); - _paq.push(["setSiteId", "3"]); + _paq.push(["setSiteId", "5"]); var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s); })(); </script> +<noscript><img src="https://a.iamfabulous.de/piwik.php?idsite=5&rec=1" style="border:0" alt="" /></noscript> diff --git a/www/static/style.css b/www/static/style.css new file mode 100755 index 0000000..15fa847 --- /dev/null +++ b/www/static/style.css @@ -0,0 +1,105 @@ + +@font-face +{ + font-family: 'Alegreya Sans SC'; + src: url("alegreya_sans_sc.woff"); +} +/*************************************************************** + General Page Styling +****************************************************************/ +*{ + margin: 0; + padding: 0; +} +html, body{ + height: 100%; + font-family: 'Alegreya Sans SC', sans-serif; +} + + + +/*************************************************************** + Header +****************************************************************/ +div.header-bar{ + background-color: #3083D6; + height: 80px; + width: 100%; + position: absolute; + color: white; +} + +a.logo{ + display: inline-block; + height: 70px; + width: 70px; + margin-top: 5px; + margin-left: 5px; + background-image: url(logo3.png); + background-repeat:no-repeat; + background-size:66px 66px; + background-color:#3083D6; + background-position: center; + z-index: 99; +} + + + +a.logo:hover{ + display: block; + background:#2669AB; + background-image: url(logo3.png); + background-repeat:no-repeat; + background-size:66px 66px; + background-position: center; + border-radius: 10px; + box-shadow: 3px -3px 5px black; +} + + + +/************************************************************ + Page-Wrap for sticky footer +*************************************************************/ +#page-wrap{ + width: 100%; + min-height: 100%; +} + +/********************************************************** + Content-Area +**********************************************************/ +#content-area{ + width: 100%; + padding-top: 80px; + padding-bottom: 25px; +} + + +/****************************************************** + FOOTER +*******************************************************/ +footer{ + height: 25px; + width: 100%; + position: relative; + margin-top: -25px; + clear: both; + background-color:#3083D6; +} + +#copyright-text{ + margin-right: 10px; + text-align: right; + font-size: 12px; + font-weight: normal; + color: white; +} + +#gitlink{ + text-align: center; + font-size: 12px; + font-weight: normal; + color: white; + display: inline; +} diff --git a/www/style.css b/www/style.css deleted file mode 100644 index f7fee2a..0000000 --- a/www/style.css +++ /dev/null @@ -1,30 +0,0 @@ -body { -/* background: #ecece1;*/ - background: #f0f0f0; - background-image: url('./background2.png'); - background-position: 50% 50%; - margin-bottom: 40px; - overflow-x: hidden; -} - -#header { - position:; - top:0px; left:0px; right:0px; - background:; - text-align:center; - padding:10px; - width: 700px; - height: 20px; - margin: 0px auto; -} - -.small { -/* font-family: 'Ubuntu'; - color: black;*/ - font-size:100%; -} - -td { - text-align: center; -} - 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> diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml deleted file mode 100644 index 4845693..0000000 --- a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<entry xmlns='http://www.w3.org/2005/Atom' -xmlns:media='http://search.yahoo.com/mrss/' -xmlns:batch='http://schemas.google.com/gdata/batch' -xmlns:yt='http://gdata.youtube.com/schemas/2007' -xmlns:gd='http://schemas.google.com/g/2005' -gd:etag='W/"Dk4FRn47eCp7ImA9WB9WEkg."'> -<id> -tag:youtube.com,2008:user:googledevelopers:subscription:Z1Lm-S9gkRQ</id> -<published>2007-11-16T15:15:17.000-08:00</published> -<updated>2007-11-16T15:15:17.000-08:00</updated> -<category scheme='http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat' -term='channel' /> -<category scheme='http://schemas.google.com/g/2005#kind' -term='http://gdata.youtube.com/schemas/2007#subscription' /> -<title>Videos published by : androiddevelopers</title> -<content type='application/atom+xml;type=feed' -src='http://gdata.youtube.com/feeds/api/users/androiddevelopers/uploads?v=2' /> -<link rel='related' type='application/atom+xml' -href='http://gdata.youtube.com/feeds/api/users/googledevelopers?v=2' /> -<link rel='alternate' type='text/html' -href='http://www.youtube.com/profile_videos?user=androiddevelopers' /> -<link rel='self' type='application/atom+xml' -href='http://gdata.youtube.com/feeds/api/users/googledevelopers/subscriptions/Z1Lm-S9gkRQ?v=2' /> -<author> -<name>GoogleDevelopers</name> -<uri> -http://gdata.youtube.com/feeds/api/users/googledevelopers</uri> -</author> -<yt:username>androiddevelopers</yt:username> -<yt:countHint>50</yt:countHint> -<media:thumbnail url='http://i2.ytimg.com/vi/1FJHYqE0RDg/default.jpg' /> -</entry> |
