aboutsummaryrefslogtreecommitdiff
path: root/modules/index
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-20 13:38:08 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-20 13:38:08 -0500
commitbe4f83cd2a17a0ec05f5bce50c91befaafaa6e0c (patch)
tree6f20672cf5df66044b3fa9dd71fc3bcdc484abe6 /modules/index
parent1a619f2638a4f77fb8ea9557edeefb883d8c06f8 (diff)
downloadbayonetcms-be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c.tar.gz
Test.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@376 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'modules/index')
-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