diff --git a/404.php b/404.php index a9705911..91663296 100644 --- a/404.php +++ b/404.php @@ -2,17 +2,24 @@ include "inc/functions.php"; -$errorimages = array("http://www.submitawebsite.com/blog/wp-content/uploads/2010/06/404.png", - "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Georgia_404.svg/750px-Georgia_404.svg.png"); +if(!file_exists("404/")) + mkdir("404/"); -$errorimage = $errorimages[array_rand($errorimages)]; +$files = glob("404/*.*"); + +if(count($files) == 0) + $errorimage = ""; +else + $errorimage = $files[array_rand($files)]; $page = << -

404 Not Found

- - - +
+
+

404 Not Found

+ + +
+
EOT; echo Element("page.html", array("config" => $config, "body" => $page, "title" => ""));