1 | <?php |
---|
2 | require_once('common/includes/class.kill.php'); |
---|
3 | require_once('common/includes/class.pilot.php'); |
---|
4 | require_once('common/includes/class.corp.php'); |
---|
5 | require_once('common/includes/class.alliance.php'); |
---|
6 | |
---|
7 | $page = new Page('Kill details'); |
---|
8 | |
---|
9 | if(config::get('kd_lgreen')) |
---|
10 | { |
---|
11 | $d_col = '#006000'; |
---|
12 | } |
---|
13 | else |
---|
14 | { |
---|
15 | $d_col = '#004000'; |
---|
16 | } |
---|
17 | |
---|
18 | if(config::get('fp_theme') == 'Black') |
---|
19 | { |
---|
20 | $th_dir = 'panel/black'; |
---|
21 | } |
---|
22 | else |
---|
23 | { |
---|
24 | $th_dir = 'panel'; |
---|
25 | } |
---|
26 | |
---|
27 | |
---|
28 | $smarty->assign('panel_style', config::get('fp_style')); |
---|
29 | $smarty->assign('panel_colour', config::get('fp_theme')); |
---|
30 | $smarty->assign('dropped_colour', $d_col); |
---|
31 | $smarty->assign('themedir', $th_dir); |
---|
32 | |
---|
33 | if (config::get('item_values')) |
---|
34 | { |
---|
35 | $smarty->assign('item_values', 'true'); |
---|
36 | if ($page->isAdmin()) |
---|
37 | { |
---|
38 | $smarty->assign('admin', 'true'); |
---|
39 | if (isset($_POST['submit']) && $_POST['submit'] == 'UpdateValue') |
---|
40 | { |
---|
41 | // Send new value for item to the database |
---|
42 | $IID = $_POST['IID']; |
---|
43 | $Val = $_POST[$IID]; |
---|
44 | $qry = new DBQuery(); |
---|
45 | $qry->execute("INSERT INTO kb3_item_price (typeID, price) VALUES ('".$IID."', '".$Val."') ON DUPLICATE KEY UPDATE price = '".$Val."'"); |
---|
46 | } |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | if ($page->isAdmin()) |
---|
51 | { |
---|
52 | if (isset($_GET['view']) && $_GET['view']== 'FixSlot') |
---|
53 | { |
---|
54 | $smarty->assign('fixSlot', 'true'); |
---|
55 | } |
---|
56 | |
---|
57 | $smarty->assign('admin', 'true'); |
---|
58 | if (isset($_POST['submit']) && $_POST['submit'] == 'UpdateSlot') |
---|
59 | { |
---|
60 | $IID = $_POST['IID']; |
---|
61 | $KID = $_POST['KID']; |
---|
62 | $Val = $_POST[$IID]; |
---|
63 | $table = $_POST['TYPE']; |
---|
64 | $old = $_POST['OLDSLOT']; |
---|
65 | $qry = new DBQuery(); |
---|
66 | $qry->execute("UPDATE kb3_items_".$table." SET itd_itl_id ='".$Val."' WHERE itd_itm_id=".$IID." AND itd_kll_id = ".$KID." AND itd_itl_id = ".$old); |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | if (!$kll_id = intval($_GET['kll_id'])) |
---|
71 | { |
---|
72 | $html = "No kill id specified."; |
---|
73 | $page->setContent($html); |
---|
74 | $page->generate($html); |
---|
75 | exit; |
---|
76 | } |
---|
77 | |
---|
78 | $kill = new Kill($kll_id); |
---|
79 | if (!$kill->exists()) |
---|
80 | { |
---|
81 | $html = "That kill doesn't exist."; |
---|
82 | $page->setContent($html); |
---|
83 | $page->generate($html); |
---|
84 | exit; |
---|
85 | } |
---|
86 | |
---|
87 | // victim $smarty->assign('',); |
---|
88 | $smarty->assign('KillId', $kill->getID()); |
---|
89 | $smarty->assign('VictimPortrait', $kill->getVictimPortrait(64)); |
---|
90 | $smarty->assign('VictimURL', "?a=pilot_detail&plt_id=".$kill->getVictimID()); |
---|
91 | $smarty->assign('VictimName', $kill->getVictimName()); |
---|
92 | $smarty->assign('VictimCorpURL', "?a=corp_detail&crp_id=".$kill->getVictimCorpID()); |
---|
93 | $smarty->assign('VictimCorpName', $kill->getVictimCorpName()); |
---|
94 | $smarty->assign('VictimAllianceURL', "?a=alliance_detail&all_id=".$kill->getVictimAllianceID()); |
---|
95 | $smarty->assign('VictimAllianceName', $kill->getVictimAllianceName()); |
---|
96 | $smarty->assign('VictimDamageTaken', $kill->VictimDamageTaken); |
---|
97 | |
---|
98 | // involved |
---|
99 | $i = 1; |
---|
100 | $involved = array(); |
---|
101 | foreach ($kill->involvedparties_ as $inv) |
---|
102 | { |
---|
103 | $pilot = new Pilot($inv->getPilotID()); |
---|
104 | $corp = new Corporation($inv->getCorpID()); |
---|
105 | $alliance = new Alliance($inv->getAllianceID()); |
---|
106 | $ship = $inv->getShip(); |
---|
107 | $weapon = $inv->getWeapon(); |
---|
108 | |
---|
109 | $involved[$i]['shipImage'] = $ship->getImage(64); |
---|
110 | $involved[$i]['PilotURL'] = "?a=pilot_detail&plt_id=".$pilot->getID(); |
---|
111 | $involved[$i]['PilotName'] = $pilot->getName(); |
---|
112 | $involved[$i]['CorpURL'] = "?a=corp_detail&crp_id=".$corp->getID(); |
---|
113 | $involved[$i]['CorpName'] = $corp->getName(); |
---|
114 | $involved[$i]['AlliURL'] = "?a=alliance_detail&all_id=".$alliance->getID(); |
---|
115 | $involved[$i]['AlliName'] = $alliance->getName(); |
---|
116 | $involved[$i]['ShipName'] = $ship->getName(); |
---|
117 | $involved[$i]['ShipID'] = $ship->externalid_; |
---|
118 | $involved[$i]['damageDone'] = $inv->dmgdone_; |
---|
119 | |
---|
120 | if ($pilot->getID() == $kill->getFBPilotID()) |
---|
121 | { |
---|
122 | $involved[$i]['FB'] = "true"; |
---|
123 | } |
---|
124 | else |
---|
125 | { |
---|
126 | $involved[$i]['FB'] = "false"; |
---|
127 | } |
---|
128 | |
---|
129 | if ($corp->isNPCCorp()) |
---|
130 | { |
---|
131 | $involved[$i]['portrait'] = $corp->getPortraitURL(64); |
---|
132 | } |
---|
133 | else |
---|
134 | { |
---|
135 | $involved[$i]['portrait'] = $pilot->getPortraitURL(64); |
---|
136 | } |
---|
137 | |
---|
138 | if ($weapon->getName() != "Unknown" && $weapon->getName() != $ship->getName()) |
---|
139 | { |
---|
140 | $involved[$i]['weaponName'] = $weapon->getName(); |
---|
141 | $involved[$i]['weaponID'] = $weapon->row_['itm_externalid']; |
---|
142 | } |
---|
143 | else |
---|
144 | $involved[$i]['weaponName'] = "Unknown"; |
---|
145 | ++$i; |
---|
146 | } |
---|
147 | $smarty->assign_by_ref('involved', $involved); |
---|
148 | |
---|
149 | if (config::get('comments')) |
---|
150 | { |
---|
151 | include('common/comments.php'); |
---|
152 | $smarty->assign('comments', $comment); |
---|
153 | } |
---|
154 | // ship, ship details |
---|
155 | $ship = $kill->getVictimShip(); |
---|
156 | $shipclass = $ship->getClass(); |
---|
157 | $system = $kill->getSystem(); |
---|
158 | |
---|
159 | $smarty->assign('VictimShip', $kill->getVictimShip()); |
---|
160 | $smarty->assign('ShipClass', $ship->getClass()); |
---|
161 | $smarty->assign('ShipImage', $ship->getImage(64)); |
---|
162 | $smarty->assign('ShipName', $ship->getName()); |
---|
163 | $smarty->assign('ShipID', $ship->externalid_); |
---|
164 | $smarty->assign('ClassName', $shipclass->getName()); |
---|
165 | |
---|
166 | include_once('common/includes/class.dogma.php'); |
---|
167 | |
---|
168 | $ssc = new dogma($ship->externalid_); |
---|
169 | |
---|
170 | $smarty->assign_by_ref('ssc', $ssc); |
---|
171 | |
---|
172 | if ($kill->isClassified()) |
---|
173 | { |
---|
174 | //Admin is able to see classified Systems |
---|
175 | if ($page->isAdmin()) |
---|
176 | { |
---|
177 | $smarty->assign('System', $system->getName().' (Classified)'); |
---|
178 | $smarty->assign('SystemURL', "?a=system_detail&sys_id=".$system->getID()); |
---|
179 | $smarty->assign('SystemSecurity', $system->getSecurity(true)); |
---|
180 | } |
---|
181 | else |
---|
182 | { |
---|
183 | $smarty->assign('System', 'Classified'); |
---|
184 | $smarty->assign('SystemURL', ""); |
---|
185 | $smarty->assign('SystemSecurity', '0.0'); |
---|
186 | } |
---|
187 | } |
---|
188 | else |
---|
189 | { |
---|
190 | $smarty->assign('System', $system->getName()); |
---|
191 | $smarty->assign('SystemURL', "?a=system_detail&sys_id=".$system->getID()); |
---|
192 | $smarty->assign('SystemSecurity', $system->getSecurity(true)); |
---|
193 | } |
---|
194 | $smarty->assign('TimeStamp', $kill->getTimeStamp()); |
---|
195 | $smarty->assign('VictimShipImg', $ship->getImage(64)); |
---|
196 | |
---|
197 | // preparing slot layout |
---|
198 | |
---|
199 | $slot_array = array(); |
---|
200 | $slot_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array()); |
---|
201 | $slot_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array()); |
---|
202 | $slot_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array()); |
---|
203 | $slot_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array()); |
---|
204 | $slot_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array()); |
---|
205 | $slot_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array()); |
---|
206 | |
---|
207 | // ship fitting |
---|
208 | if (count($kill->destroyeditems_) > 0) |
---|
209 | { |
---|
210 | $dest_array = array(); |
---|
211 | foreach($kill->destroyeditems_ as $destroyed) |
---|
212 | { |
---|
213 | $item = $destroyed->getItem(); |
---|
214 | $i_qty = $destroyed->getQuantity(); |
---|
215 | if (config::get('item_values')) |
---|
216 | { |
---|
217 | $value = $destroyed->getValue(); |
---|
218 | $TotalValue += $value*$i_qty; |
---|
219 | $formatted = $destroyed->getFormatttedValue(); |
---|
220 | } |
---|
221 | $i_name = $item->getName(); |
---|
222 | $i_location = $destroyed->getLocationID(); |
---|
223 | $i_id = $item->getID(); |
---|
224 | $i_usedgroup = $item->get_used_launcher_group($i_name); |
---|
225 | $dest_array[$i_location][] = array('Icon' => $item->getIcon(32), 'Name' => $i_name, 'Quantity' => $i_qty, 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $i_id,'slotID' => $i_location); |
---|
226 | if(config::get('fp_show')) |
---|
227 | { // BEGIN ADDING DESTROYED ITEMS TO FITTING LAYOUT |
---|
228 | if(($i_location != 4) && ($i_location != 5) && ($i_location != 6)) // NOT IN CARGO, DRONE BAY OR RIG SLOT |
---|
229 | { |
---|
230 | if(($i_usedgroup != 0)) // AMMO |
---|
231 | { |
---|
232 | if ($i_location == 1) |
---|
233 | { |
---|
234 | $i_ammo=$item->get_ammo_size($i_name); // GET SIZE IF IN HI SLOT |
---|
235 | |
---|
236 | } |
---|
237 | else |
---|
238 | { |
---|
239 | $i_ammo = 0; // NULL FOR OTHER SLOTS |
---|
240 | } |
---|
241 | $ammo_array[$i_location][]=array('Name'=>$i_name, 'Icon' => $item->getIcon(24), 'itemID' => $i_id, 'usedgroupID' => $i_usedgroup, 'size' => $i_ammo); |
---|
242 | } |
---|
243 | else // MODULES |
---|
244 | { |
---|
245 | for ($count = 0; $count < $i_qty; $count++) |
---|
246 | { |
---|
247 | if ($i_location == 1) |
---|
248 | { |
---|
249 | $i_charge=$item->get_used_charge_size($i_name); // GET TURRET SIZE |
---|
250 | } |
---|
251 | else |
---|
252 | { |
---|
253 | $i_charge = 0; // NULL FOR OTHER MODULES |
---|
254 | } |
---|
255 | $fitting_array[$i_location][]=array('Name'=>$i_name, 'Icon' => $item->getIcon(48), 'itemID' => $i_id, 'groupID' => $item->get_group_id($i_name), 'chargeSize' => $i_charge); |
---|
256 | } |
---|
257 | } |
---|
258 | } |
---|
259 | else if(($destroyed->getLocationID() == 5)) // RIG SLOT |
---|
260 | { |
---|
261 | for ($count = 0; $count < $i_qty; $count++) |
---|
262 | { |
---|
263 | $fitting_array[$i_location][]=array('Name'=>$i_name, 'Icon' => $item->getIcon(32), 'itemID' => $i_id); |
---|
264 | } |
---|
265 | } |
---|
266 | } // END ADDING DESTROYED ITEMS TO FITTING LAYOUT |
---|
267 | } |
---|
268 | } |
---|
269 | |
---|
270 | if (count($kill->droppeditems_) > 0) |
---|
271 | { |
---|
272 | $drop_array = array(); |
---|
273 | foreach($kill->droppeditems_ as $dropped) |
---|
274 | { |
---|
275 | $item = $dropped->getItem(); |
---|
276 | $i_qty = $dropped->getQuantity(); |
---|
277 | if (config::get('item_values')) |
---|
278 | { |
---|
279 | $value = $dropped->getValue(); |
---|
280 | $dropvalue += $value*$i_qty; |
---|
281 | $formatted = $dropped->getFormatttedValue(); |
---|
282 | } |
---|
283 | $i_name = $item->getName(); |
---|
284 | $i_location = $dropped->getLocationID(); |
---|
285 | $i_id = $item->getID(); |
---|
286 | $i_usedgroup = $item->get_used_launcher_group($i_name); |
---|
287 | $drop_array[$i_location][] = array('Icon' => $item->getIcon(32), 'Name' => $i_name, 'Quantity' => $i_qty, 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $i_id,'slotID' => $i_location); |
---|
288 | if(config::get('fp_show')) |
---|
289 | { // BEGIN ADDING DROPPED ITEMS TO FITTING LAYOUT |
---|
290 | if(($i_location != 4) && ($i_location != 6)) |
---|
291 | { |
---|
292 | if(($i_usedgroup != 0)) // AMMO |
---|
293 | { |
---|
294 | if ($i_location == 1) |
---|
295 | { |
---|
296 | $i_ammo=$item->get_ammo_size($i_name); // GET SIZE IF IN HI SLOT |
---|
297 | |
---|
298 | } |
---|
299 | else |
---|
300 | { |
---|
301 | $i_ammo = 0; // NULL FOR OTHER SLOTS |
---|
302 | } |
---|
303 | $ammo_array[$i_location][]=array('Name'=>$i_name, 'Icon' => $item->getIcon(24), 'itemID' => $i_id, 'usedgroupID' => $i_usedgroup, 'size' => $i_ammo); |
---|
304 | } |
---|
305 | else // MODULES |
---|
306 | { |
---|
307 | for ($count = 0; $count < $i_qty; $count++) |
---|
308 | { |
---|
309 | if ($i_location == 1) |
---|
310 | { |
---|
311 | $i_charge=$item->get_used_charge_size($i_name); // GET TURRET SIZE |
---|
312 | } |
---|
313 | else |
---|
314 | { |
---|
315 | $i_charge = 0; // NULL FOR OTHER MODULES |
---|
316 | } |
---|
317 | $fitting_array[$i_location][]=array('Name'=>$i_name, 'Icon' => $item->getIcon(48), 'itemID' => $i_id, 'groupID' => $item->get_group_id($i_name), 'chargeSize' => $i_charge); |
---|
318 | } |
---|
319 | } |
---|
320 | } |
---|
321 | } // END ADDING DROPPED ITEMS TO FITTING LAYOUT |
---|
322 | |
---|
323 | } |
---|
324 | } |
---|
325 | if(config::get('fp_show')) |
---|
326 | { // BEGIN AMMO FITTING & ITEM SORTING |
---|
327 | if(is_array($fitting_array[1])) |
---|
328 | { |
---|
329 | foreach ($fitting_array[1] as $array_rowh) |
---|
330 | { |
---|
331 | $sort_by_nameh["groupID"][] = $array_rowh["groupID"]; // SORTING BY GROUP ID |
---|
332 | } |
---|
333 | array_multisort($sort_by_nameh["groupID"],SORT_ASC,$fitting_array[1]); |
---|
334 | } |
---|
335 | |
---|
336 | if(is_array($fitting_array[2])) |
---|
337 | { |
---|
338 | foreach ($fitting_array[2] as $array_rowm) |
---|
339 | { |
---|
340 | $sort_by_namem["groupID"][] = $array_rowm["groupID"]; // SORTING BY GROUP ID |
---|
341 | } |
---|
342 | array_multisort($sort_by_namem["groupID"],SORT_ASC,$fitting_array[2]); |
---|
343 | } |
---|
344 | |
---|
345 | if(is_array($fitting_array[3])) |
---|
346 | { |
---|
347 | foreach ($fitting_array[3] as $array_rowl) |
---|
348 | { |
---|
349 | $sort_by_namel["groupID"][] = $array_rowl["groupID"]; // SORTING BY GROUP ID |
---|
350 | } |
---|
351 | array_multisort($sort_by_namel["groupID"],SORT_ASC,$fitting_array[3]); |
---|
352 | } |
---|
353 | |
---|
354 | if(is_array($fitting_array[5])) |
---|
355 | { |
---|
356 | foreach ($fitting_array[5] as $array_rowr) |
---|
357 | { |
---|
358 | $sort_by_namer["Name"][] = $array_rowr["Name"]; // SORTING BY NAME |
---|
359 | } |
---|
360 | array_multisort($sort_by_namer["Name"],SORT_ASC,$fitting_array[5]); |
---|
361 | } |
---|
362 | |
---|
363 | // SORTING THINGY END |
---|
364 | |
---|
365 | $lenght = count($ammo_array[1]); |
---|
366 | $temp = array(); |
---|
367 | if(is_array($fitting_array[1])) // AMMO FOR HIGH SLOTS |
---|
368 | { |
---|
369 | $hiammo = array(); |
---|
370 | foreach ($fitting_array[1] as $highfit) |
---|
371 | { |
---|
372 | $group = $highfit["groupID"]; |
---|
373 | $size = $highfit["chargeSize"]; |
---|
374 | if($group == 483 // Modulated Deep Core Miner II, Modulated Strip Miner II and Modulated Deep Core Strip Miner II |
---|
375 | || $group == 53 // Laser Turrets |
---|
376 | || $group == 55 // Projectile Turrets |
---|
377 | || $group == 74 // Hybrid Turrets |
---|
378 | || ($group >= 506 && $group <= 511) // Some Missile Lauchers |
---|
379 | || $group == 481 // Probe Launchers |
---|
380 | || $group == 899 // Warp Disruption Field Generator I |
---|
381 | || $group == 771 // Heavy Assault Missile Launchers |
---|
382 | || $group == 589 // Interdiction Sphere Lauchers |
---|
383 | || $group == 524 // Citadel Torpedo Launchers |
---|
384 | ) |
---|
385 | { |
---|
386 | $found = 0; |
---|
387 | if ($group == 511) { $group = 509; } // Assault Missile Lauchers uses same ammo as Standard Missile Lauchers |
---|
388 | if(is_array($ammo_array[1])) |
---|
389 | { |
---|
390 | $i = 0; |
---|
391 | while (!($found) && $i<$lenght) |
---|
392 | { |
---|
393 | $temp = array_shift($ammo_array[1]); |
---|
394 | if (($temp["usedgroupID"] == $group) && ($temp["size"] == $size)) |
---|
395 | { |
---|
396 | $hiammo[]=array('show'=>$smarty->fetch(get_tpl('ammo')), 'type'=>$temp["Icon"]); |
---|
397 | $found = 1; |
---|
398 | } |
---|
399 | array_push($ammo_array[1],$temp); |
---|
400 | $i++; |
---|
401 | } |
---|
402 | } |
---|
403 | if (!($found)) |
---|
404 | { |
---|
405 | $hiammo[]=array('show'=>$smarty->fetch(get_tpl('ammo')), 'type'=>$smarty->fetch(get_tpl('noicon'))); |
---|
406 | } |
---|
407 | } else { |
---|
408 | $hiammo[]=array('show'=>$smarty->fetch(get_tpl('blank')), 'type'=>$smarty->fetch(get_tpl('blank'))); |
---|
409 | } |
---|
410 | } |
---|
411 | } |
---|
412 | |
---|
413 | $lenght = count($ammo_array[2]); |
---|
414 | if(is_array($fitting_array[2])) // AMMO FOR MID SLOTS |
---|
415 | { |
---|
416 | $midammo = array(); |
---|
417 | foreach ($fitting_array[2] as $midfit) |
---|
418 | { |
---|
419 | $group = $midfit["groupID"]; |
---|
420 | if($group == 76 // Capacitor Boosters |
---|
421 | || $group == 208 // Remote Sensor Dampeners |
---|
422 | || $group == 212 // Sensor Boosters |
---|
423 | || $group == 291 // Tracking Disruptors |
---|
424 | || $group == 213 // Tracking Computers |
---|
425 | || $group == 209 // Tracking Links |
---|
426 | || $group == 290 // Remote Sensor Boosters |
---|
427 | ) |
---|
428 | { |
---|
429 | $found = 0; |
---|
430 | if(is_array($ammo_array[2])) |
---|
431 | { |
---|
432 | $i = 0; |
---|
433 | while (!($found) && $i<$lenght) |
---|
434 | { |
---|
435 | $temp = array_shift($ammo_array[2]); |
---|
436 | if ($temp["usedgroupID"] == $group) |
---|
437 | { |
---|
438 | $midammo[]=array('show'=>$smarty->fetch(get_tpl('ammo')), 'type'=>$temp["Icon"]); |
---|
439 | $found = 1; |
---|
440 | } |
---|
441 | array_push($ammo_array[2],$temp); |
---|
442 | $i++; |
---|
443 | } |
---|
444 | } |
---|
445 | if (!($found)) |
---|
446 | { |
---|
447 | $midammo[]=array('show'=>$smarty->fetch(get_tpl('ammo')), 'type'=>$smarty->fetch(get_tpl('noicon'))); |
---|
448 | } |
---|
449 | } else { |
---|
450 | $midammo[]=array('show'=>$smarty->fetch(get_tpl('blank')), 'type'=>$smarty->fetch(get_tpl('blank'))); |
---|
451 | } |
---|
452 | } |
---|
453 | } |
---|
454 | } // END FITTING PANEL AMMO THINGY |
---|
455 | |
---|
456 | if ($TotalValue >= 0) |
---|
457 | { |
---|
458 | $Formatted = number_format($TotalValue, 2); |
---|
459 | } |
---|
460 | |
---|
461 | // Get Ship Value |
---|
462 | $ShipValue = $ship->getPrice(); |
---|
463 | if (config::get('kd_droptototal')) |
---|
464 | { |
---|
465 | $TotalValue += $dropvalue; |
---|
466 | } |
---|
467 | $TotalLoss = number_format($TotalValue + $ShipValue, 2); |
---|
468 | $ShipValue = number_format($ShipValue, 2); |
---|
469 | $dropvalue = number_format($dropvalue, 2); |
---|
470 | |
---|
471 | $smarty->assign_by_ref('destroyed', $dest_array); |
---|
472 | $smarty->assign_by_ref('dropped', $drop_array); |
---|
473 | $smarty->assign_by_ref('slots', $slot_array); |
---|
474 | $smarty->assign_by_ref('fitting_high', $fitting_array[1]); |
---|
475 | $smarty->assign_by_ref('fitting_med', $fitting_array[2]); |
---|
476 | $smarty->assign_by_ref('fitting_low', $fitting_array[3]); |
---|
477 | $smarty->assign_by_ref('fitting_rig', $fitting_array[5]); |
---|
478 | $smarty->assign_by_ref('fitting_ammo_high', $hiammo); |
---|
479 | $smarty->assign_by_ref('fitting_ammo_mid', $midammo); |
---|
480 | $smarty->assign('ItemValue', $Formatted); |
---|
481 | $smarty->assign('DropValue', $dropvalue); |
---|
482 | $smarty->assign('ShipValue', $ShipValue); |
---|
483 | $smarty->assign('TotalLoss', $TotalLoss); |
---|
484 | |
---|
485 | $hicount = count($fitting_array[1]); |
---|
486 | $medcount = count($fitting_array[2]); |
---|
487 | $lowcount = count($fitting_array[3]); |
---|
488 | |
---|
489 | $smarty->assign('hic', $hicount); |
---|
490 | $smarty->assign('medc', $medcount); |
---|
491 | $smarty->assign('lowc', $lowcount); |
---|
492 | |
---|
493 | $menubox = new Box("Menu"); |
---|
494 | $menubox->setIcon("menu-item.gif"); |
---|
495 | $menubox->addOption("caption", "View"); |
---|
496 | $menubox->addOption("link", "Killmail", "javascript:sndReq('index.php?a=kill_mail&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')"); |
---|
497 | if (config::get('kd_EFT')) // CHECKS IF EFT EXPORT IS ENABLED |
---|
498 | { |
---|
499 | $menubox->addOption("link", "EFT Fitting", "javascript:sndReq('index.php?a=eft_fitting&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')"); |
---|
500 | } |
---|
501 | if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) |
---|
502 | { |
---|
503 | $menubox->addOption("link", "Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); |
---|
504 | } |
---|
505 | if ($page->isAdmin()) |
---|
506 | { |
---|
507 | $menubox->addOption("caption", "Admin"); |
---|
508 | $menubox->addOption("link", "Delete", "javascript:openWindow('?a=admin_kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); |
---|
509 | if (isset($_GET['view']) && $_GET['view'] == 'FixSlot') |
---|
510 | { |
---|
511 | $menubox->addOption("link", "Adjust Values", "?a=kill_detail&kll_id=".$kill->getID().""); |
---|
512 | } |
---|
513 | else |
---|
514 | { |
---|
515 | $menubox->addOption("link", "Fix Slots", "?a=kill_detail&kll_id=".$kill->getID()."&view=FixSlot"); |
---|
516 | } |
---|
517 | } |
---|
518 | $page->addContext($menubox->generate()); |
---|
519 | |
---|
520 | if (config::get('kill_points')) |
---|
521 | { |
---|
522 | $scorebox = new Box("Points"); |
---|
523 | $scorebox->addOption("points", $kill->getKillPoints()); |
---|
524 | $page->addContext($scorebox->generate()); |
---|
525 | } |
---|
526 | |
---|
527 | //Admin is able to see classsiefied systems |
---|
528 | if ((!$kill->isClassified()) || ($page->isAdmin())) |
---|
529 | { |
---|
530 | $mapbox = new Box("Map"); |
---|
531 | $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=map&size=145"); |
---|
532 | $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=region&size=145"); |
---|
533 | $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145"); |
---|
534 | $page->addContext($mapbox->generate()); |
---|
535 | } |
---|
536 | |
---|
537 | |
---|
538 | $html = $smarty->fetch(get_tpl('kill_detail')); |
---|
539 | $page->setContent($html); |
---|
540 | $page->generate(); |
---|
541 | ?> |
---|