aboutsummaryrefslogtreecommitdiff
path: root/modules/index/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/index/index.php')
-rw-r--r--modules/index/index.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/index/index.php b/modules/index/index.php
new file mode 100644
index 0000000..fd1eef1
--- /dev/null
+++ b/modules/index/index.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * MODULE - INDEX >>
+ * This page is a module that displays multiple modules
+ * Database should store a list of module names in the order they are to be displayed
+ * This should be fairly simple to produce -- Dont forget to set this as the default
+ * in the config.php array
+ *
+ */
+?>
+
+<?php
+
+ $result = $db->Query("SELECT `index_modules` FROM `bayonet_settings` WHERE `title` = 'Default'");
+ while(($row = $db->Fetch($result))!==false)
+ {
+ $indexModules = $row['index_modules'];
+ }
+
+ $indexModules = explode(',',$indexModules);
+
+ foreach($indexModules as $module)
+ {
+ if(file_exists("modules/" . $module))
+ {
+ include 'modules/' . $module . '/index.php';
+ }
+ else
+ {
+ OpenTable();
+ ReportError("Cannot load module '{$module}' directory.<br>\n");
+ CloseTable();
+ }
+ echo "<br />";
+ }
+?> \ No newline at end of file