root/original/common/campaigns.php

Revision 1, 1.1 KB (checked in by andrewgunn, 14 years ago)

Added original EVE-Killboard.net source code.

Line 
1<?
2  require_once( "class.page.php" );
3  require_once( "class.contract.php" );
4  require_once( "class.box.php" );
5 
6  $page = new Page( "Campaigns" );
7
8  switch( $_GET['view'] ) {
9    case "":
10      $activelist = new ContractList();
11      $activelist->setCampaigns( true );
12      $activelist->setActive( "yes" );
13      $page->setTitle( "Active campaigns" );
14      $table = new ContractListTable( $activelist );
15      $table->paginate( 10, $_GET['page'] );
16      $html .= $table->generate();
17      break;
18    case "past":
19      $pastlist = new ContractList();
20      $pastlist->setCampaigns( true );
21      $pastlist->setActive( "no" );
22      $page->setTitle( "Past campaigns" );
23      $table = new ContractListTable( $pastlist );
24      $table->paginate( 10, $_GET['page'] );
25      $html .= $table->generate();
26      break;
27  }
28
29  $menubox = new MenuBox();
30  $menubox->addOption( "Active campaigns", "?a=campaigns" );
31  $menubox->addOption( "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.