root/dev/common/admin/admin.php @ 190

Revision 190, 0.8 KB (checked in by exi, 16 years ago)

This is a big update...
Moved all admin scripts to common/admin.
Moved all includes and classes to common/includes.
Edited all include-paths to reflect the movement.
Fixed a bug with the session system allowing every registered user to access admin pages.
Replaced calls to date() to use a wrapper so gmdate can be used.
Replaced some calls to $config with calls to the static object.
Fixed a big which caused the portrait_grab to not download a new picute.
Added a classified-state to kills.
Removed the sync_server server script in this tree.
Added code to help modules find the includes to index.php.

Line 
1<?php
2require_once('common/includes/class.killboard.php');
3require_once('common/includes/class.page.php');
4
5// admin menu now loads all admin pages with options
6require_once('common/admin/admin_menu.php');
7
8$killboard = new Killboard(KB_SITE);
9$page = new Page();
10$page->setAdmin();
11
12if (!$_REQUEST['field'] && !$_REQUEST['sub'])
13{
14    $_REQUEST['field'] = 'Appearance';
15    $_REQUEST['sub'] = 'Generic';
16}
17if ($_REQUEST['field'] && $_REQUEST['sub'])
18{
19    if ($_POST)
20    {
21        options::handlePost();
22    }
23    $page->setContent(options::genOptionsPage());
24    $page->addContext(options::genAdminMenu());
25    if ($_REQUEST['sub'] == 'Generic' && $_REQUEST['field'] == 'Appearance')
26    {
27        $page->setTitle('Administration - Generic (Current version: '.KB_VERSION.' Build '.SVN_REV.')');
28    }
29    $page->generate();
30}
31?>
Note: See TracBrowser for help on using the browser.