diff --git a/public/index.php b/public/index.php index f8ccb438..db94059e 100644 --- a/public/index.php +++ b/public/index.php @@ -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)) { diff --git a/public/templates/mmcFE/error/404/default.tpl b/public/templates/mmcFE/error/404/default.tpl new file mode 100644 index 00000000..a951eb30 --- /dev/null +++ b/public/templates/mmcFE/error/404/default.tpl @@ -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;"} +
The page you requested was not found.
+{include file="global/block_footer.tpl"} diff --git a/public/templates/mmcFE/error/default.tpl b/public/templates/mmcFE/error/default.tpl new file mode 100644 index 00000000..a951eb30 --- /dev/null +++ b/public/templates/mmcFE/error/default.tpl @@ -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;"} +The page you requested was not found.
+{include file="global/block_footer.tpl"} diff --git a/public/templates/mmcFE/global/login.tpl b/public/templates/mmcFE/global/login.tpl index 363f403e..9df043a0 100644 --- a/public/templates/mmcFE/global/login.tpl +++ b/public/templates/mmcFE/global/login.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;"}