From 162fcff691f8bd4a14e1985131af3a1fd52a7ff9 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 2 Dec 2010 01:17:27 +1100 Subject: [PATCH] Added basis for query handling. --- mod.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mod.php b/mod.php index bee64011..462f6797 100644 --- a/mod.php +++ b/mod.php @@ -34,6 +34,22 @@ loginForm(); } } else { + $query = $_SERVER['QUERY_STRING']; + $regex = Array( + 'board' => str_replace('%s', '\w{1,8}', preg_quote(BOARD_PATH, '/')) + ); + + // Dashboard + if(preg_match('/^\/?$/', $query)) { + + + // Board index + } elseif(preg_match('/^\/' . $regex['board'] . '(' . preg_quote(FILE_INDEX, '/') . ')?$/', $query)) { + + + } else { + error("Page not found."); + } // The rest is not done yet... } ?>