[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:
parent
13c06715fc
commit
bbbd5eda52
@ -51,7 +51,13 @@ if (is_dir(INCLUDE_DIR . '/pages/')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a default action here if no page has been requested
|
// 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
|
// Create our pages array from existing files
|
||||||
if (is_dir(INCLUDE_DIR . '/pages/' . $page)) {
|
if (is_dir(INCLUDE_DIR . '/pages/' . $page)) {
|
||||||
|
|||||||
3
public/templates/mmcFE/error/404/default.tpl
Normal file
3
public/templates/mmcFE/error/404/default.tpl
Normal 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"}
|
||||||
3
public/templates/mmcFE/error/default.tpl
Normal file
3
public/templates/mmcFE/error/default.tpl
Normal 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"}
|
||||||
@ -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">
|
<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="text" name="username" value="" id="userForm" maxlength="20" required></p>
|
||||||
<p><input type="password" name="password" value="" id="passForm" maxlength="20" required></p>
|
<p><input type="password" name="password" value="" id="passForm" maxlength="20" required></p>
|
||||||
|
|||||||
1
public/templates/mobile/error/404/default.tpl
Normal file
1
public/templates/mobile/error/404/default.tpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>The page you requested was not found.</p>
|
||||||
1
public/templates/mobile/error/default.tpl
Normal file
1
public/templates/mobile/error/default.tpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>The page you requested was not found.</p>
|
||||||
Loading…
Reference in New Issue
Block a user