mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 17:31:00 +01:00
Update 404.php
Made it loop through directory
This commit is contained in:
parent
ca0e7ffc5d
commit
0fee740147
23
404.php
23
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 = <<<EOT
|
||||
<div class="ban">
|
||||
<h2 style="text-align: center">404 Not Found</h2>
|
||||
|
||||
<img src="{$errorimage}" style="width: 700px;">
|
||||
</div>
|
||||
<center>
|
||||
<div class="ban">
|
||||
<h2>404 Not Found</h2>
|
||||
|
||||
<img src="{$errorimage}" style="width: 700px;">
|
||||
</div>
|
||||
</center>
|
||||
EOT;
|
||||
|
||||
echo Element("page.html", array("config" => $config, "body" => $page, "title" => ""));
|
||||
|
Loading…
Reference in New Issue
Block a user