root/dev/common/campaigns.php @ 206

Revision 206, 1.1 KB (checked in by ralle030583, 16 years ago)

-bugfix in Known Member mod corp detail
-deleted includes(db.php/class.page.php/class.killboard.php) which arent needed anymore everywhere cause of the include in the common/index.php

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