1 | <?php |
---|
2 | require_once('common/includes/class.kill.php'); |
---|
3 | |
---|
4 | $kll_id = intval($_GET['kll_id']); |
---|
5 | $kill = new Kill($kll_id); |
---|
6 | $ship = $kill->getVictimShip(); |
---|
7 | $shipclass = $ship->getClass(); |
---|
8 | $system = $kill->getSystem(); |
---|
9 | |
---|
10 | $fitting_array[1] = array(); // high slots |
---|
11 | $fitting_array[2] = array(); // med slots |
---|
12 | $fitting_array[3] = array(); // low slots |
---|
13 | $fitting_array[5] = array(); // rig slots |
---|
14 | $fitting_array[6] = array(); // drone bay |
---|
15 | |
---|
16 | |
---|
17 | // ship fitting |
---|
18 | if (count($kill->destroyeditems_) > 0) |
---|
19 | { |
---|
20 | foreach($kill->destroyeditems_ as $destroyed) |
---|
21 | { |
---|
22 | $item = $destroyed->getItem(); |
---|
23 | //Fitting, KE - add destroyed items to an array of all fitted items. |
---|
24 | if(($destroyed->getLocationID() != 4) && ($item->get_used_launcher_group($item->getName()) == 0)) |
---|
25 | { |
---|
26 | for ($count = 0; $count < $destroyed->getQuantity(); $count++) |
---|
27 | { |
---|
28 | $fitting_array[$destroyed->getLocationID()][]=$item->getName(); |
---|
29 | } |
---|
30 | } |
---|
31 | //fitting thing end |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | if (count($kill->droppeditems_) > 0) |
---|
36 | { |
---|
37 | foreach($kill->droppeditems_ as $dropped) |
---|
38 | { |
---|
39 | $item = $dropped->getItem(); |
---|
40 | |
---|
41 | //Fitting -KE, add dropped items to the list |
---|
42 | if(($dropped->getLocationID() != 4) && ($item->get_used_launcher_group($item->getName()) == 0)) |
---|
43 | { |
---|
44 | for ($count = 0; $count < $dropped->getQuantity(); $count++) |
---|
45 | { |
---|
46 | $fitting_array[$dropped->getLocationID()][]=$item->getName(); |
---|
47 | } |
---|
48 | } |
---|
49 | //fitting thing end |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | $slots = array(3 => "[empty low slot]", |
---|
54 | 2 => "[empty mid slot]", |
---|
55 | 1 => "[empty high slot]", |
---|
56 | 5 => "[empty rig slot]", |
---|
57 | 6 => "") |
---|
58 | |
---|
59 | ?> |
---|
60 | popup|<form> |
---|
61 | <table class="popup-table" height="100%" width="355px"> |
---|
62 | <tr> |
---|
63 | <td align="center"><strong>EFT Fitting</strong></td> |
---|
64 | </tr> |
---|
65 | <tr> |
---|
66 | <td align="center"><input type="button" value="Close" onClick="ReverseContentDisplay('popup');"></td> |
---|
67 | </tr> |
---|
68 | <tr> |
---|
69 | <td valign="top" align="center"> |
---|
70 | <textarea class="killmail" name="killmail" cols="60" rows="30" readonly="readonly"> |
---|
71 | [<?php echo $ship->getName(); ?>, <?php echo $kll_id; ?>] |
---|
72 | <?php |
---|
73 | foreach ($slots as $i => $empty) |
---|
74 | { |
---|
75 | if (empty($fitting_array[$i])) |
---|
76 | { |
---|
77 | echo $empty."\n"; |
---|
78 | } |
---|
79 | else |
---|
80 | { |
---|
81 | sort($fitting_array[$i]); |
---|
82 | foreach ($fitting_array[$i] as $item) |
---|
83 | { |
---|
84 | if ($i == 6) |
---|
85 | $item .= ' x1'; |
---|
86 | echo $item."\n"; |
---|
87 | } |
---|
88 | } |
---|
89 | echo "\n"; |
---|
90 | } |
---|
91 | ?> |
---|
92 | </textarea></td></tr> |
---|
93 | <tr><td align="center"><input type="button" value="Select All" onClick="this.form.killmail.select();this.form.killmail.focus(); document.execCommand('Copy')"> <input type="button" value="Close" onClick="ReverseContentDisplay('popup');"></td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | </table> |
---|
97 | </form> |
---|
98 | |
---|
99 | |
---|