summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorSimon Rettberg2013-10-31 12:38:25 +0100
committerSimon Rettberg2013-10-31 12:38:25 +0100
commita362ac12b119b49519f5af51b92ebb7d6e127b87 (patch)
treea2334426c8af99f864e2dd90c2f275e3ed50083a /index.php
parentRemodel zeug mit settings und so (diff)
downloadslx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.tar.gz
slx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.tar.xz
slx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.zip
Comments, minor refactoring, possiblity to validate configuration parameters
Diffstat (limited to 'index.php')
-rw-r--r--index.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/index.php b/index.php
index aa88db53..d693b9e8 100644
--- a/index.php
+++ b/index.php
@@ -9,6 +9,8 @@ require_once('inc/util.inc.php');
require_once('inc/message.inc.php');
require_once('inc/db.inc.php');
require_once('inc/permission.inc.php');
+require_once('inc/crypto.inc.php');
+require_once('inc/validator.inc.php');
if (empty($_REQUEST['do'])) {
// No specific module - set default
@@ -23,15 +25,28 @@ if (!file_exists($module)) {
Util::traceError('Invalid module: ' . $module);
}
+// Display any messages
+if (isset($_REQUEST['message'])) {
+ Message::fromRequest();
+}
+
+// Load module - it will execute pre-processing, or act upon request parameters
require_once($module);
unset($module);
+// Main menu
$menu = new Menu;
Render::addTemplate('main-menu', $menu);
Message::renderList();
+// Render module. If the module wants to output anything, it will be done here
render_module();
+if (defined('CONFIG_DEBUG') && CONFIG_DEBUG) {
+ Message::addWarning('debug-mode');
+}
+
+// Send page to client.
Render::output();