root/dev/common/contracts.php @ 190

Revision 190, 1.0 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.page.php');
3require_once('common/includes/class.contract.php');
4
5$page = new Page('Contracts');
6
7switch ($_GET['view'])
8{
9    case '':
10        $activelist = new ContractList();
11        $activelist->setCampaigns(false);
12        $activelist->setActive('yes');
13        $page->setTitle('Active contracts');
14        $table = new ContractListTable($activelist);
15        $html .= $table->generate();
16        break;
17    case 'past':
18        $pastlist = new ContractList();
19        $pastlist->setCampaigns(false);
20        $pastlist->setActive('no');
21        $page->setTitle('Past contracts');
22        $table = new ContractListTable($pastlist);
23        $html .= $table->generate();
24        break;
25}
26
27$menubox = new box('Menu');
28$menubox->setIcon('menu-item.gif');
29$menubox->addOption('link', 'Active contracts', '?a=contracts');
30$menubox->addOption('link', 'Past contracts', '?a=contracts&view=past');
31
32$page->addContext($menubox->generate());
33$page->setContent($html);
34$page->generate();
35?>
Note: See TracBrowser for help on using the browser.