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

Revision 398, 2.5 KB (checked in by kovell, 13 years ago)

Upgrades now force admin page to be run. Admin menu has an option to list settings for error reporting.

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('Maintenance', "Settings Report", "?a=admin_status");
62options::oldMenu('Kill Import/Export', "Kill Import - files", "?a=admin_kill_import");
63options::oldMenu('Kill Import/Export', "Kill Import - csv", "?a=admin_kill_import_csv");
64options::oldMenu('Kill Import/Export', "Kill Export - files", "?a=admin_kill_export");
65options::oldMenu('Kill Import/Export', "Kill Export - csv", "?a=admin_kill_export_search");
66options::oldMenu('- Logout -', "Logout", "?a=logout");
67
68#options::oldMenu('User', 'Titles', '?a=admin_titles');
69
70options::oldMenu('Appearance', "Top Navigation", "?a=admin_navmanager");
71?>
Note: See TracBrowser for help on using the browser.