root/dev/common/admin/admin_menu.php @ 370

Revision 370, 2.4 KB (checked in by kovell, 13 years ago)

- SQL queries optimised for speed and error protection.
- feed syndication optimised
- front page includes optional clock and optional kill/loss display
- mysqli support added
- transaction protection of kills added where supported (mysqli and InnoDB)
- summary tables and contracts show total destroyed value instead of ship value
- html errors reduced
- related kill calculation improved
- query caching errors reduced
- minor bugfixes
- Smarty 2.6.25 added
- apoc fitting mod added and modded
- code optimisations
- code comments added (doxygen format)
- conflicting mods are now identified

Line 
1<?php
2require_once('common/includes/class.options.php');
3
4// include all admin modules
5// this doesnt need to check for itself because its already loaded
6$dir = 'common/admin/';
7if (is_dir($dir))
8{
9    if ($dh = opendir($dir))
10    {
11        while (($file = readdir($dh)) !== false)
12        {
13            // only load auto-option files
14            if (strstr($file, 'option_') && substr($file, -4) == '.php')
15            {
16                require_once($dir.$file);
17            }
18        }
19        closedir($dh);
20    }
21}
22
23// load all auto-options from mods
24$mods_active = explode(',', config::get('mods_active'));
25$modOverrides = false;
26foreach ($mods_active as $mod)
27{
28    if (file_exists('mods/'.$mod.'/auto_settings.php'))
29    {
30        include('mods/'.$mod.'/auto_settings.php');
31    }
32}
33
34// overload the box object to force every admin page to use the new options menu
35class Box2 extends Box
36{
37    function generate()
38    {
39        return options::genAdminMenu();
40    }
41}
42
43$menubox = new Box2();
44
45options::oldMenu('Features', "Contracts", "?a=admin_cc&amp;op=view&amp;type=contract");
46options::oldMenu('Features', "Campaigns", "?a=admin_cc&amp;op=view&amp;type=campaign");
47options::oldMenu('Features', "Standings", "?a=admin_standings");
48options::oldMenu('Appearance', "Map Options", "?a=admin_mapoptions");
49
50options::oldMenu('Advanced', "Ship Values", "?a=admin_shp_val");
51#options::oldMenu('Advanced', "Synchronization", "?a=admin_sync");
52options::oldMenu('Advanced', "Post Permissions", "?a=admin_postperm");
53
54options::oldMenu('Features', "Modules", "?a=admin_mods");
55
56options::oldMenu('Features', "Feed Syndication", "?a=admin_feedsyndication");
57options::oldMenu('Features', "API Mod", "?a=admin_apimod");
58
59options::oldMenu('Maintenance', "Auditing", "?a=admin_audit");
60options::oldMenu('Maintenance', "Troubleshooting", "?a=admin_troubleshooting");
61options::oldMenu('Kill Import/Export', "Kill Import - files", "?a=admin_kill_import");
62options::oldMenu('Kill Import/Export', "Kill Import - csv", "?a=admin_kill_import_csv");
63options::oldMenu('Kill Import/Export', "Kill Export - files", "?a=admin_kill_export");
64options::oldMenu('Kill Import/Export', "Kill Export - csv", "?a=admin_kill_export_search");
65options::oldMenu('- Logout -', "Logout", "?a=logout");
66
67#options::oldMenu('User', 'Titles', '?a=admin_titles');
68
69options::oldMenu('Appearance', "Top Navigation", "?a=admin_navmanager");
70?>
Note: See TracBrowser for help on using the browser.