blob: 7d23bc6f25cb1af271b2d6782ed70ce89b7ef9fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?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 `dir_name` FROM `bayonet_modules` ORDER BY `weight` ASC");
while(($row = $db->Fetch($result))!==false)
{
$indexModules[] = $row['dir_name'];
}
foreach($indexModules as $module)
{
if(file_exists("modules/" . $module))
{
include 'modules/' . $module . '/index.php';
}
else
{
OpenContent();
ReportError("Cannot load module '{$module}' directory.<br>\n");
CloseContent();
}
echo "<br />";
}
?>
|