From be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Sun, 20 Dec 2009 18:38:08 +0000 Subject: Test. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@376 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- modules/index/index.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/index/index.php (limited to 'modules/index') 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 @@ +> + * 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 + * + */ +?> + +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.
\n"); + CloseTable(); + } + echo "
"; + } +?> \ No newline at end of file -- cgit