[IMPROVE] 404 handling

* [ADDED] Error/404 templates to mmcFE & mobile themes
* [IMPROVED] Make 404 default error with unknown page parameter
This commit is contained in:
Sebastian Grewe 2013-10-22 16:05:55 +02:00
parent 13c06715fc
commit bbbd5eda52
6 changed files with 16 additions and 2 deletions

View File

@ -51,7 +51,13 @@ if (is_dir(INCLUDE_DIR . '/pages/')) {
}
// Set a default action here if no page has been requested
$page = isset($_REQUEST['page']) && isset($arrPages[$_REQUEST['page']]) ? $_REQUEST['page'] : 'home';
if (isset($_REQUEST['page']) && isset($arrPages[$_REQUEST['page']])) {
$page = $_REQUEST['page'];
} else if (isset($_REQUEST['page']) && ! isset($arrPages[$_REQUEST['page']])) {
$page = 'error';
} else {
$page = 'home';
}
// Create our pages array from existing files
if (is_dir(INCLUDE_DIR . '/pages/' . $page)) {

View File

@ -0,0 +1,3 @@
{include file="global/block_header.tpl" BLOCK_HEADER="{$GLOBAL.website.name}" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<p>The page you requested was not found.</p>
{include file="global/block_footer.tpl"}

View File

@ -0,0 +1,3 @@
{include file="global/block_header.tpl" BLOCK_HEADER="{$GLOBAL.website.name}" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<p>The page you requested was not found.</p>
{include file="global/block_footer.tpl"}

View File

@ -1,4 +1,4 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Login" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
{include file="global/block_header.tpl" BLOCK_HEADER="Login" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<form action="{$smarty.server.PHP_SELF}?page=login" method="post" id="loginForm">
<p><input type="text" name="username" value="" id="userForm" maxlength="20" required></p>
<p><input type="password" name="password" value="" id="passForm" maxlength="20" required></p>

View File

@ -0,0 +1 @@
<p>The page you requested was not found.</p>

View File

@ -0,0 +1 @@
<p>The page you requested was not found.</p>