root/dev/common/system_detail.php @ 296

Revision 289, 2.7 KB (checked in by exi, 14 years ago)

Added the change from ticket:54 - customizable rowcount on KillSummaryTable?.
Added the change from ticket:55 - ship classes shouldnt wrap anymore.
Added the fix from ticket:56 - proper png output by the signature generator.

Line 
1<?php
2require_once('common/includes/class.system.php');
3require_once('common/includes/class.killlist.php');
4require_once('common/includes/class.killlisttable.php');
5require_once('common/includes/class.killsummarytable.php');
6
7$sys_id = intval($_GET['sys_id']);
8
9if (!$sys_id)
10{
11    echo 'no valid id supplied<br/>';
12    exit;
13}
14$system = new SolarSystem($sys_id);
15
16$page = new Page('System details - '.$system->getName());
17
18$html .= "<table border=\"0\" class=\"kb-table\"><tr class=\"kb-table-header\"><td colspan=\"3\">Graphical Overview</td></tr><tr>";
19$html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=map&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>";
20$html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=region&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>";
21$html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=cons&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>";
22$html .= "</tr></table><br/>";
23
24$kslist = new KillList();
25involved::load($kslist,'kill');
26$kslist->addSystem($system);
27
28$lslist = new KillList();
29involved::load($lslist,'loss');
30$lslist->addSystem($system);
31
32$summarytable = new KillSummaryTable($kslist, $lslist);
33$summarytable->setBreak(config::get('summarytable_rowcount'));
34$html .= $summarytable->generate();
35
36$klist = new KillList();
37$klist->setOrdered(true);
38if ($_GET['view'] == 'losses')
39{
40        involved::load($klist,'loss');
41}
42else
43{
44   involved::load($klist,'kill');
45}
46$klist->addSystem($system);
47if ($_GET['scl_id'])
48    $klist->addVictimShipClass(new ShipClass($_GET['scl_id']));
49else
50    $klist->setPodsNoobShips(false);
51
52if ($_GET['view'] == 'recent' || !isset($_GET['view']))
53{
54    $html .= "<div class=kb-kills-header>20 most recent kills</div>";
55    $klist->setLimit(20);
56}
57else
58{
59    if ($_GET['view'] == 'losses')
60    {
61        $html .= "<div class=kb-kills-header>All losses</div>";
62    }
63    else
64    {
65        $html .= "<div class=kb-kills-header>All kills</div>";
66    }
67    $pagesplitter = new PageSplitter($klist->getCount(), 20);
68    $klist->setPageSplitter($pagesplitter);
69}
70
71$table = new KillListTable($klist);
72$html .= $table->generate();
73if (is_object($pagesplitter))
74{
75    $html .= $pagesplitter->generate();
76}
77
78$page->setContent($html);
79$menubox = new box("Menu");
80$menubox->setIcon("menu-item.gif");
81$menubox->addOption("caption","Navigation");
82$menubox->addOption("link","All kills", "?a=system_detail&amp;sys_id=".$sys_id."&amp;view=kills");
83$menubox->addOption("link","All losses", "?a=system_detail&amp;sys_id=".$sys_id."&amp;view=losses");
84$menubox->addOption("link","Recent Activity", "?a=system_detail&amp;sys_id=".$sys_id."&amp;view=recent");
85$page->addContext($menubox->generate());
86
87$page->generate();
88?>
Note: See TracBrowser for help on using the browser.