summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/failure.php60
-rw-r--r--www/header.php19
-rw-r--r--www/index.php14
-rw-r--r--www/youtube.php16
4 files changed, 97 insertions, 12 deletions
diff --git a/www/failure.php b/www/failure.php
index 21cd87c..5ccc7a8 100644
--- a/www/failure.php
+++ b/www/failure.php
@@ -1,15 +1,59 @@
<!Doctype html>
<head>
-<title>404 - No Droids found</title>
-<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>
+<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>
+<body vlink='#000000' link='#000000' alink='#9a9696'>
<center>
-<img src="404.jpg" alt="404 - not found">
+<? include("header.php"); ?>
+<table align="center"><tr><td>
+<h1> Welcome! </h1>
+<? //<img src="404.jpg" alt="404 - not found"> ?>
-<br><br>
-Recommandations:
-<table>
-<tr><td><a href="/youtube">Get a random youtube Video</a></td><td><a href="/puush">or a random puush file</a></td></tr>
+</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">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>.
+
+<? include("piwik.php");?>
+
+</body>
+</html>
diff --git a/www/header.php b/www/header.php
new file mode 100644
index 0000000..fb17d93
--- /dev/null
+++ b/www/header.php
@@ -0,0 +1,19 @@
+<div id='header' align='center' class='small'>
+<table width='700px'><tr>
+<td><a href='/'>Home</a></td>
+<td>|</td>
+<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/index.php b/www/index.php
index 436bfeb..f793c10 100644
--- a/www/index.php
+++ b/www/index.php
@@ -1,5 +1,8 @@
<?
+if(empty($_GET["task"])){
+ include("failure.php");
+} else {
switch($_GET["task"]){
case("youtube"):
include("youtube.php");
@@ -7,7 +10,16 @@ switch($_GET["task"]){
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("failure.php")
+ include("lolrndm.php");
break;
}
+}
diff --git a/www/youtube.php b/www/youtube.php
index ab8a9c8..1e902f7 100644
--- a/www/youtube.php
+++ b/www/youtube.php
@@ -57,6 +57,7 @@ function printVideoFeed($videoFeed)
$res_quant = count($videoFeed);
$video = mt_rand(0, $res_quant-1);
+
if(empty($video)){
error();
}
@@ -111,15 +112,24 @@ $videoID = start($yt);
?>
<!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"); ?>
+
<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>
<a href="youtube">Get another one</a>
</center>
+
+<?include("piwik.php");