root/dev/common/admin_menu.php @ 181

Revision 181, 1.9 KB (checked in by exi, 16 years ago)

Changed admin/options to show the actual page as page title.
admin_menu.php now also loads settings from mods.
Added event manager and the first 2 events (comment/killmail added).
Changed config to be in a separate file and modified it to be called static with config::get().
http_request now stores the socket status in $this->status.
Changed MapView? to store pictures based on KB_SITE so it doesnt show a map with wrong colors for the current killboard on a multi-site installation.
Changed options to handle element options (like 'edit:size:40').
Changed options to use the static calls to config.
Changed Page to use the static calls to config.
Changed Session to use session_name() to determine if it should start a session.
index.php now loads module-init-scripts.
Changed post.php to use config and it should now also use the mailserver configuration directive to send emails.
Added a mail_forward-mod to show how easy it can be to develop mods once there are enough events listed.
Fixed 2 typos in battle_overview.tpl.

Line 
1<?php
2require_once("class.box.php");
3require_once('class.options.php');
4
5// include all admin modules
6$dir = 'common/admin/';
7if (is_dir($dir))
8{
9    if ($dh = opendir($dir))
10    {
11        while (($file = readdir($dh)) !== false)
12        {
13            if (strstr($file, 'admin_') && substr($file, -4) == '.php')
14            {
15                require_once($dir.$file);
16            }
17        }
18        closedir($dh);
19    }
20}
21
22$mods_active = explode(',', config::get('mods_active'));
23$modOverrides = false;
24foreach ($mods_active as $mod)
25{
26    if (file_exists('mods/'.$mod.'/auto_settings.php'))
27    {
28        include('mods/'.$mod.'/auto_settings.php');
29    }
30}
31
32// overload the box object to force every admin page to use the new options menu
33class Box2 extends Box
34{
35    function generate()
36    {
37        return options::genAdminMenu();
38    }
39}
40
41$menubox = new Box2();
42
43options::oldMenu('Appearance', "Contracts", "?a=admin_cc&op=view&type=contract");
44options::oldMenu('Appearance', "Campaigns", "?a=admin_cc&op=view&type=campaign");
45options::oldMenu('Appearance', "Standings", "?a=admin_standings");
46options::oldMenu('Appearance', "Map Options", "?a=admin_mapoptions");
47options::oldMenu('Advanced', "Ship Values", "?a=admin_shp_val");
48options::oldMenu('Advanced', "Synchronization", "?a=admin_sync");
49options::oldMenu('Advanced', "Post Permissions", "?a=admin_postperm");
50options::oldMenu('Modules', "Mods", "?a=admin_mods");
51options::oldMenu('Maintenance', "Auditing", "?a=admin_audit");
52options::oldMenu('Maintenance', "Kill Import - files", "?a=kill_import");
53options::oldMenu('Maintenance', "Kill Import - csv", "?a=kill_import_csv");
54options::oldMenu('Maintenance', "Kill Export - files", "?a=kill_export");
55options::oldMenu('Maintenance', "Kill Export - csv", "?a=kill_export_search");
56options::oldMenu('Maintenance', "Logout", "?a=logout");
57?>
Note: See TracBrowser for help on using the browser.