From df4fe46ca80846087e00807eeb76ac7dff92b59f Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 11 May 2012 01:48:02 +0200 Subject: [PATCH] Add some stuff to admin panel --- frontend/module.admin.php | 46 +++++++++++++++++++++++++++++++ frontend/templates/main.admin.tpl | 7 +++++ 2 files changed, 53 insertions(+) create mode 100644 frontend/module.admin.php create mode 100644 frontend/templates/main.admin.tpl diff --git a/frontend/module.admin.php b/frontend/module.admin.php new file mode 100644 index 0000000..ac5bba1 --- /dev/null +++ b/frontend/module.admin.php @@ -0,0 +1,46 @@ +RequireAccessLevel(20); + + $sError = ""; + $sPageContents = ""; + + $sMainClass = "shift"; + + $router = new CPHPRouter(); + + $router->ignore_query = true; + + $router->routes = array( + 0 => array( + '^/admin/?$' => "module.admin.overview.php" + ) + ); + + $router->RouteRequest(); + + $sMainContents .= Templater::InlineRender("main.admin", $locale->strings, array( + 'contents' => $sPageContents + )); +} +catch (InsufficientAccessLevelException $e) +{ + $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "You are not authorized to view this page", "Your access level is not sufficient."); + $sMainContents .= $err->Render(); +} +?> diff --git a/frontend/templates/main.admin.tpl b/frontend/templates/main.admin.tpl new file mode 100644 index 0000000..573d899 --- /dev/null +++ b/frontend/templates/main.admin.tpl @@ -0,0 +1,7 @@ + + +<%?contents>