|
|
|
@ -1,5 +1,24 @@
|
|
|
|
|
<?php
|
|
|
|
|
if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') {
|
|
|
|
|
$files = scandir(".");
|
|
|
|
|
//
|
|
|
|
|
$check = preg_replace('/^\.$/', '', $files);
|
|
|
|
|
//remove .
|
|
|
|
|
$check = preg_replace('/^\.\.$/', '', $check);
|
|
|
|
|
//remove ..
|
|
|
|
|
$check = preg_replace('/^\_index\.php$/', '', $check);
|
|
|
|
|
//remove _index.php
|
|
|
|
|
$check = implode(" ", $check);
|
|
|
|
|
if (preg_match("/\.+/", $check) == 0) {
|
|
|
|
|
require "article-start.php";
|
|
|
|
|
echo '<div class="lostimg centre">';
|
|
|
|
|
echo '<a class="lostimglink" href="/home.php">';
|
|
|
|
|
echo '<span class="largefont">404 - File Not Found. Press left mouse button to continue.<br /><br />';
|
|
|
|
|
echo 'Guru Meditation: No Content</span>';
|
|
|
|
|
echo '</a>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
require "article-end.php";
|
|
|
|
|
// Checks if theres actually contnet, prevents a blackscreen
|
|
|
|
|
} elseif (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') {
|
|
|
|
|
require $root."includes/article-start.php";
|
|
|
|
|
if (!file_exists($_GET['post'])) {
|
|
|
|
|
echo '<div class="lostimg centre">';
|
|
|
|
|