mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
Added basis for query handling.
This commit is contained in:
parent
3e91dbadd4
commit
162fcff691
16
mod.php
16
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...
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user