1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 17:31:00 +01:00
vichan/404.php
anonfagola 0fee740147 Update 404.php
Made it loop through directory
2014-09-24 17:02:40 -07:00

26 lines
436 B
PHP

<?php
include "inc/functions.php";
if(!file_exists("404/"))
mkdir("404/");
$files = glob("404/*.*");
if(count($files) == 0)
$errorimage = "";
else
$errorimage = $files[array_rand($files)];
$page = <<<EOT
<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" => ""));