1 | <?php |
---|
2 | require_once("common/includes/class.corp.php"); |
---|
3 | require_once("common/includes/class.alliance.php"); |
---|
4 | require_once("common/includes/class.killlist.php"); |
---|
5 | require_once("common/includes/class.killlisttable.php"); |
---|
6 | require_once("common/includes/class.killsummarytable.php"); |
---|
7 | require_once("common/includes/class.box.php"); |
---|
8 | require_once("common/includes/class.toplist.php"); |
---|
9 | require_once("common/includes/class.pilot.php"); |
---|
10 | |
---|
11 | |
---|
12 | if (!$crp_id = intval($_GET['crp_id'])) |
---|
13 | { |
---|
14 | echo 'no valid corp id specified<br/>'; |
---|
15 | exit; |
---|
16 | } |
---|
17 | $all_id = $_GET['all_id']; |
---|
18 | $corp = new Corporation($crp_id); |
---|
19 | $alliance = $corp->getAlliance(); |
---|
20 | |
---|
21 | $klist = new KillList(); |
---|
22 | $tklist = new KillList(); |
---|
23 | $llist = new KillList(); |
---|
24 | $klist->addInvolvedCorp($corp); |
---|
25 | $tklist->addInvolvedCorp($corp); |
---|
26 | $tklist->setPodsNoobShips(false); |
---|
27 | $llist->addVictimCorp($corp); |
---|
28 | $klist->getAllKills(); |
---|
29 | $llist->getAllKills(); |
---|
30 | |
---|
31 | $page = new Page("Corporation details - " . $corp->getName()); |
---|
32 | $html .= "<table class=kb-table width=\"100%\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=8 width=128 align=center>"; |
---|
33 | |
---|
34 | if (file_exists("img/corps/".$corp->getID().".jpg")) |
---|
35 | { |
---|
36 | $html .= "<img src=\"".$corp->getPortraitURL(128)."\" border=\"0\"></td>"; |
---|
37 | } |
---|
38 | else |
---|
39 | { |
---|
40 | $html .= "<img src=\"" . IMG_URL . "/campaign-big.gif\" border=\"0\"></td>"; |
---|
41 | } |
---|
42 | |
---|
43 | // $html .= "</tr>"; |
---|
44 | $html .= "<td class=kb-table-cell width=180><b>Alliance:</b></td><td class=kb-table-cell>"; |
---|
45 | if ($alliance->getName() == "Unknown" || $alliance->getName() == "None") |
---|
46 | $html .= "<b>" . $alliance->getName() . "</b>"; |
---|
47 | else |
---|
48 | $html .= "<a href=\"?a=alliance_detail&all_id=" . $alliance->getID() . "\">" . $alliance->getName() . "</a>"; |
---|
49 | $html .= "</td></tr>"; |
---|
50 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>" . $klist->getCount() . "</td></tr>"; |
---|
51 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Real kills:</b></td><td class=kl-kill>" . $tklist->getCount() . "</td></tr>"; |
---|
52 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>" . $llist->getCount() . "</td></tr>"; |
---|
53 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>" . round($klist->getISK()/1000000,2) . "M</td></tr>"; |
---|
54 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>" . round($llist->getISK()/1000000,2) . "M</td></tr>"; |
---|
55 | if ($klist->getISK()) |
---|
56 | $efficiency = round($klist->getISK() / ($klist->getISK() + $llist->getISK()) * 100, 2); |
---|
57 | else |
---|
58 | $efficiency = 0; |
---|
59 | |
---|
60 | $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Efficiency:</b></td><td class=kb-table-cell><b>" . $efficiency . "%</b></td></tr>"; |
---|
61 | |
---|
62 | $html .= "</table>"; |
---|
63 | |
---|
64 | $html .= "<br/>"; |
---|
65 | |
---|
66 | if ($_GET['view'] == "" || $_GET['view'] == "kills" || $_GET['view'] == "losses") |
---|
67 | { |
---|
68 | $summarytable = new KillSummaryTable($klist, $llist); |
---|
69 | $summarytable->setBreak(6); |
---|
70 | |
---|
71 | $html .= $summarytable->generate(); |
---|
72 | } |
---|
73 | |
---|
74 | switch ($_GET['view']) |
---|
75 | { |
---|
76 | case "": |
---|
77 | $html .= "<div class=kb-kills-header>10 Most recent kills</div>"; |
---|
78 | |
---|
79 | $list = new KillList(); |
---|
80 | $list->setOrdered(true); |
---|
81 | $list->setLimit(10); |
---|
82 | $list->setPodsNoobships(true); |
---|
83 | $list->addInvolvedCorp($corp); |
---|
84 | if ($_GET['scl_id']) |
---|
85 | $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); |
---|
86 | |
---|
87 | $ktab = new KillListTable($list); |
---|
88 | $ktab->setLimit(10); |
---|
89 | $ktab->setDayBreak(false); |
---|
90 | $html .= $ktab->generate(); |
---|
91 | |
---|
92 | $html .= "<div class=kb-losses-header>10 Most recent losses</div>"; |
---|
93 | |
---|
94 | $list = new KillList(); |
---|
95 | $list->setOrdered(true); |
---|
96 | $list->setLimit(10); |
---|
97 | $list->setPodsNoobships(true); |
---|
98 | $list->addVictimCorp($corp); |
---|
99 | if ($_GET['scl_id']) |
---|
100 | $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); |
---|
101 | |
---|
102 | $ltab = new KillListTable($list); |
---|
103 | $ltab->setLimit(10); |
---|
104 | $ltab->setDayBreak(false); |
---|
105 | $html .= $ltab->generate(); |
---|
106 | |
---|
107 | break; |
---|
108 | case "kills": |
---|
109 | $html .= "<div class=kb-kills-header>All kills</div>"; |
---|
110 | |
---|
111 | $list = new KillList(); |
---|
112 | $list->setOrdered(true); |
---|
113 | $list->addInvolvedCorp($corp); |
---|
114 | if ($_GET['scl_id']) |
---|
115 | $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); |
---|
116 | $pagesplitter = new PageSplitter($list->getCount(), 30); |
---|
117 | $list->setPageSplitter($pagesplitter); |
---|
118 | $table = new KillListTable($list); |
---|
119 | $table->setDayBreak(false); |
---|
120 | $html .= $table->generate(); |
---|
121 | $html .= $pagesplitter->generate(); |
---|
122 | |
---|
123 | break; |
---|
124 | case "losses": |
---|
125 | $html .= "<div class=kb-losses-header>All losses</div>"; |
---|
126 | |
---|
127 | $list = new KillList(); |
---|
128 | $list->setOrdered(true); |
---|
129 | $list->setPodsNoobships(true); |
---|
130 | $list->addVictimCorp($corp); |
---|
131 | if ($_GET['scl_id']) |
---|
132 | $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); |
---|
133 | $pagesplitter = new PageSplitter($list->getCount(), 30); |
---|
134 | $list->setPageSplitter($pagesplitter); |
---|
135 | |
---|
136 | $table = new KillListTable($list); |
---|
137 | $table->setDayBreak(false); |
---|
138 | $html .= $table->generate(); |
---|
139 | $html .= $pagesplitter->generate(); |
---|
140 | |
---|
141 | break; |
---|
142 | case "pilot_kills": |
---|
143 | $html .= "<div class=block-header2>Top killers</div>"; |
---|
144 | |
---|
145 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
146 | $html .= "<div class=block-header>This month</div>"; |
---|
147 | |
---|
148 | $list = new TopKillsList(); |
---|
149 | $list->addInvolvedCorp($corp); |
---|
150 | $list->setPodsNoobShips(false); |
---|
151 | $list->setMonth(date("m")); |
---|
152 | $list->setYear(date("Y")); |
---|
153 | $table = new TopPilotTable($list, "Kills"); |
---|
154 | $html .= $table->generate(); |
---|
155 | |
---|
156 | $html .= "</td><td valign=top width=400>"; |
---|
157 | $html .= "<div class=block-header>All time</div>"; |
---|
158 | |
---|
159 | $list = new TopKillsList(); |
---|
160 | $list->addInvolvedCorp($corp); |
---|
161 | $list->setPodsNoobShips(false); |
---|
162 | $table = new TopPilotTable($list, "Kills"); |
---|
163 | $html .= $table->generate(); |
---|
164 | |
---|
165 | $html .= "</td></tr></table>"; |
---|
166 | |
---|
167 | break; |
---|
168 | case "pilot_scores": |
---|
169 | $html .= "<div class=block-header2>Top scorers</div>"; |
---|
170 | |
---|
171 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
172 | $html .= "<div class=block-header>This month</div>"; |
---|
173 | |
---|
174 | $list = new TopScoreList(); |
---|
175 | $list->addInvolvedCorp($corp); |
---|
176 | $list->setPodsNoobShips(false); |
---|
177 | $list->setMonth(date("m")); |
---|
178 | $list->setYear(date("Y")); |
---|
179 | $table = new TopPilotTable($list, "Points"); |
---|
180 | $html .= $table->generate(); |
---|
181 | |
---|
182 | $html .= "</td><td valign=top width=400>"; |
---|
183 | $html .= "<div class=block-header>All time</div>"; |
---|
184 | |
---|
185 | $list = new TopScoreList(); |
---|
186 | $list->addInvolvedCorp($corp); |
---|
187 | $list->setPodsNoobShips(false); |
---|
188 | $table = new TopPilotTable($list, "Points"); |
---|
189 | $html .= $table->generate(); |
---|
190 | |
---|
191 | $html .= "</td></tr></table>"; |
---|
192 | |
---|
193 | break; |
---|
194 | case "pilot_solo": |
---|
195 | $html .= "<div class=block-header2>Top solokillers</div>"; |
---|
196 | |
---|
197 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
198 | $html .= "<div class=block-header>This month</div>"; |
---|
199 | |
---|
200 | $list = new TopSoloKillerList(); |
---|
201 | $list->addInvolvedCorp($corp); |
---|
202 | $list->setPodsNoobShips(false); |
---|
203 | $list->setMonth(date("m")); |
---|
204 | $list->setYear(date("Y")); |
---|
205 | $table = new TopPilotTable($list, "Solokills"); |
---|
206 | $html .= $table->generate(); |
---|
207 | |
---|
208 | $html .= "</td><td valign=top width=400>"; |
---|
209 | $html .= "<div class=block-header>All time</div>"; |
---|
210 | |
---|
211 | $list = new TopSoloKillerList(); |
---|
212 | $list->addInvolvedCorp($corp); |
---|
213 | $list->setPodsNoobShips(false); |
---|
214 | $table = new TopPilotTable($list, "Solokills"); |
---|
215 | $html .= $table->generate(); |
---|
216 | |
---|
217 | $html .= "</td></tr></table>"; |
---|
218 | |
---|
219 | break; |
---|
220 | |
---|
221 | case "pilot_damage": |
---|
222 | $html .= "<div class=block-header2>Top damagedealers</div>"; |
---|
223 | |
---|
224 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
225 | $html .= "<div class=block-header>This month</div>"; |
---|
226 | |
---|
227 | $list = new TopDamageDealerList(); |
---|
228 | $list->addInvolvedCorp($corp); |
---|
229 | $list->setPodsNoobShips(false); |
---|
230 | $list->setMonth(date("m")); |
---|
231 | $list->setYear(date("Y")); |
---|
232 | $table = new TopPilotTable($list, "Kills"); |
---|
233 | $html .= $table->generate(); |
---|
234 | |
---|
235 | $html .= "</td><td valign=top width=400>"; |
---|
236 | $html .= "<div class=block-header>All time</div>"; |
---|
237 | |
---|
238 | $list = new TopDamageDealerList(); |
---|
239 | $list->addInvolvedCorp($corp); |
---|
240 | $list->setPodsNoobShips(false); |
---|
241 | $table = new TopPilotTable($list, "Kills"); |
---|
242 | $html .= $table->generate(); |
---|
243 | |
---|
244 | $html .= "</td></tr></table>"; |
---|
245 | |
---|
246 | break; |
---|
247 | |
---|
248 | case "pilot_griefer": |
---|
249 | $html .= "<div class=block-header2>Top griefers</div>"; |
---|
250 | |
---|
251 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
252 | $html .= "<div class=block-header>This month</div>"; |
---|
253 | |
---|
254 | $list = new TopGrieferList(); |
---|
255 | $list->addInvolvedCorp($corp); |
---|
256 | $list->setMonth(date("m")); |
---|
257 | $list->setYear(date("Y")); |
---|
258 | $table = new TopPilotTable($list, "Kills"); |
---|
259 | $html .= $table->generate(); |
---|
260 | |
---|
261 | $html .= "</td><td valign=top width=400>"; |
---|
262 | $html .= "<div class=block-header>All time</div>"; |
---|
263 | |
---|
264 | $list = new TopGrieferList(); |
---|
265 | $list->addInvolvedCorp($corp); |
---|
266 | $table = new TopPilotTable($list, "Kills"); |
---|
267 | $html .= $table->generate(); |
---|
268 | |
---|
269 | $html .= "</td></tr></table>"; |
---|
270 | |
---|
271 | break; |
---|
272 | |
---|
273 | case "pilot_losses": |
---|
274 | $html .= "<div class=block-header2>Top losers</div>"; |
---|
275 | |
---|
276 | $html .= "<table class=kb-subtable><tr><td valign=top width=440>"; |
---|
277 | $html .= "<div class=block-header>This month</div>"; |
---|
278 | |
---|
279 | $list = new TopLossesList(); |
---|
280 | $list->addVictimCorp($corp); |
---|
281 | $list->setPodsNoobShips(false); |
---|
282 | $list->setMonth(date("m")); |
---|
283 | $list->setYear(date("Y")); |
---|
284 | $table = new TopPilotTable($list, "Losses"); |
---|
285 | $html .= $table->generate(); |
---|
286 | |
---|
287 | $html .= "</td><td valign=top width=400>"; |
---|
288 | $html .= "<div class=block-header>All time</div>"; |
---|
289 | |
---|
290 | $list = new TopLossesList(); |
---|
291 | $list->addVictimCorp($corp); |
---|
292 | $list->setPodsNoobShips(false); |
---|
293 | $table = new TopPilotTable($list, "Losses"); |
---|
294 | $html .= $table->generate(); |
---|
295 | |
---|
296 | $html .= "</td></tr></table>"; |
---|
297 | |
---|
298 | break; |
---|
299 | case "ships_weapons": |
---|
300 | $html .= "<div class=block-header2>Ships & weapons used</div>"; |
---|
301 | |
---|
302 | $html .= "<table class=kb-subtable><tr><td valign=top width=400>"; |
---|
303 | $shiplist = new TopShipList(); |
---|
304 | $shiplist->addInvolvedCorp($corp); |
---|
305 | $shiplisttable = new TopShipListTable($shiplist); |
---|
306 | $html .= $shiplisttable->generate(); |
---|
307 | $html .= "</td><td valign=top align=right width=400>"; |
---|
308 | |
---|
309 | $weaponlist = new TopWeaponList(); |
---|
310 | $weaponlist->addInvolvedCorp($corp); |
---|
311 | $weaponlisttable = new TopWeaponListTable($weaponlist); |
---|
312 | $html .= $weaponlisttable->generate(); |
---|
313 | $html .= "</td></tr></table>"; |
---|
314 | |
---|
315 | break; |
---|
316 | |
---|
317 | case 'violent_systems': |
---|
318 | $html .= "<div class=block-header2>Most violent systems</div>"; |
---|
319 | $html .= "<table width=\"99%\"><tr><td align=center valign=top>"; |
---|
320 | |
---|
321 | $html .= "<div class=block-header>This month</div>"; |
---|
322 | $html .= "<table class=kb-table>"; |
---|
323 | $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center >Kills</td></tr>"; |
---|
324 | |
---|
325 | $sql = "select sys.sys_name, sys.sys_sec, sys.sys_id, count(distinct kll.kll_id) as kills |
---|
326 | from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv |
---|
327 | where kll.kll_system_id = sys.sys_id |
---|
328 | and inv.ind_kll_id = kll.kll_id"; |
---|
329 | |
---|
330 | if ($crp_id) |
---|
331 | $sql .= " and inv.ind_crp_id in (".$crp_id.")"; |
---|
332 | if (ALLIANCE_ID) |
---|
333 | $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; |
---|
334 | |
---|
335 | $sql .= " and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." |
---|
336 | and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." |
---|
337 | group by sys.sys_name |
---|
338 | order by kills desc |
---|
339 | limit 25"; |
---|
340 | |
---|
341 | $qry = new DBQuery(); |
---|
342 | $qry->execute($sql); |
---|
343 | $odd = false; |
---|
344 | $counter = 1; |
---|
345 | while ($row = $qry->getRow()) |
---|
346 | { |
---|
347 | if (!$odd) |
---|
348 | { |
---|
349 | $odd = true; |
---|
350 | $rowclass = 'kb-table-row-odd'; |
---|
351 | } |
---|
352 | else |
---|
353 | { |
---|
354 | $odd = false; |
---|
355 | $rowclass = 'kb-table-row-even'; |
---|
356 | } |
---|
357 | |
---|
358 | $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell width=180><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; |
---|
359 | $counter++; |
---|
360 | } |
---|
361 | |
---|
362 | $html .= "</table>"; |
---|
363 | |
---|
364 | $html .= "</td><td align=center valign=top>"; |
---|
365 | $html .= "<div class=block-header>All-Time</div>"; |
---|
366 | $html .= "<table class=kb-table>"; |
---|
367 | $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center>Kills</td></tr>"; |
---|
368 | |
---|
369 | $sql = "select sys.sys_name, sys.sys_id, sys.sys_sec, count(distinct kll.kll_id) as kills |
---|
370 | from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv |
---|
371 | where kll.kll_system_id = sys.sys_id |
---|
372 | and inv.ind_kll_id = kll.kll_id"; |
---|
373 | |
---|
374 | if ($crp_id) |
---|
375 | $sql .= " and inv.ind_crp_id in (".$crp_id.")"; |
---|
376 | if ($all_id) |
---|
377 | $sql .= " and inv.ind_all_id = ".$all_id; |
---|
378 | |
---|
379 | $sql .= " group by sys.sys_name |
---|
380 | order by kills desc |
---|
381 | limit 25"; |
---|
382 | |
---|
383 | $qry = new DBQuery(); |
---|
384 | $qry->execute($sql); |
---|
385 | $odd = false; |
---|
386 | $counter = 1; |
---|
387 | while ($row = $qry->getRow()) |
---|
388 | { |
---|
389 | if (!$odd) |
---|
390 | { |
---|
391 | $odd = true; |
---|
392 | $rowclass = 'kb-table-row-odd'; |
---|
393 | } |
---|
394 | else |
---|
395 | { |
---|
396 | $odd = false; |
---|
397 | $rowclass = 'kb-table-row-even'; |
---|
398 | } |
---|
399 | |
---|
400 | $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; |
---|
401 | $counter++; |
---|
402 | } |
---|
403 | $html .= "</table>"; |
---|
404 | $html .= "</td></tr></table>"; |
---|
405 | break; |
---|
406 | |
---|
407 | case "known_members": |
---|
408 | if($config->getConfig('known_members_own')) |
---|
409 | { |
---|
410 | $alliance->getID(); |
---|
411 | if (ALLIANCE_ID && $alliance->getID() == ALLIANCE_ID) |
---|
412 | { |
---|
413 | $can_view = 1; |
---|
414 | } |
---|
415 | elseif (CORP_ID && $corp->getID() == CORP_ID) |
---|
416 | { |
---|
417 | $can_view = 1; |
---|
418 | } |
---|
419 | |
---|
420 | } |
---|
421 | |
---|
422 | |
---|
423 | |
---|
424 | if($can_view == 1) |
---|
425 | { |
---|
426 | $html .= "Cannot View this corps Member List"; |
---|
427 | } |
---|
428 | else |
---|
429 | { |
---|
430 | $query = "SELECT * FROM `kb3_pilots` WHERE plt_crp_id =".intval($_GET['crp_id'])." ORDER BY `plt_name` ASC"; |
---|
431 | $qry = new DBQuery(); |
---|
432 | $qry->execute($query); |
---|
433 | $cnt = $qry->recordCount(); |
---|
434 | $clmn = $config->getConfig('known_members_clmn'); |
---|
435 | |
---|
436 | $html .= "<div class=block-header2>Known Pilots (".$cnt.")</div>"; |
---|
437 | $html .= "<table class=kb-table align=center>"; |
---|
438 | $html .= '<tr class=kb-table-header>'; |
---|
439 | if (strpos($clmn,"img")) |
---|
440 | { |
---|
441 | $html .= '<td class=kb-table-header align="center"></td>'; |
---|
442 | } |
---|
443 | $html .= '<td class=kb-table-header align="center">Pilot</td>'; |
---|
444 | if (strpos($clmn,"kll_pnts")) |
---|
445 | { |
---|
446 | $html .= '<td class=kb-table-header align="center">Kill Points</td>'; |
---|
447 | } |
---|
448 | if (strpos($clmn,"dmg_dn")) |
---|
449 | { |
---|
450 | $html .= '<td class=kb-table-header align="center">Dmg Done (isk)</td>'; |
---|
451 | } |
---|
452 | if (strpos($clmn,"dmg_rcd")) |
---|
453 | { |
---|
454 | $html .= '<td class=kb-table-header align="center">Dmg Recived (isk)</td>'; |
---|
455 | } |
---|
456 | if (strpos($clmn,"eff")) |
---|
457 | { |
---|
458 | $html .= '<td class=kb-table-header align="center">Efficiency</td>'; |
---|
459 | } |
---|
460 | if ($page->isAdmin()) |
---|
461 | { |
---|
462 | $html .= '<td class=kb-table-header align="center">Admin - Move</td>'; |
---|
463 | } |
---|
464 | $html .= '</tr>'; |
---|
465 | while ($data = $qry->getRow()) |
---|
466 | { |
---|
467 | $pilot = new Pilot( $data['plt_id'] ); |
---|
468 | $plist = new KillList(); |
---|
469 | $plist->addInvolvedPilot($pilot); |
---|
470 | $plist->getAllKills(); |
---|
471 | $points = $plist->getPoints(); |
---|
472 | |
---|
473 | $pllist = new KillList(); |
---|
474 | $pllist->addVictimPilot($pilot); |
---|
475 | $pllist->getAllKills(); |
---|
476 | |
---|
477 | $plistisk = $plist->getISK(); |
---|
478 | $pllistisk = $pllist->getISK(); |
---|
479 | if ($plistisk == 0) { $plistisk = 1; } //Remove divide by 0 |
---|
480 | if ($pllistisk == 0) { $pllistisk = 1; } //Remove divide by 0 |
---|
481 | $efficiency = round($plistisk / ($plistisk + $pllistisk) * 100, 2); |
---|
482 | |
---|
483 | if (!$odd) |
---|
484 | { |
---|
485 | $odd = true; |
---|
486 | $class = 'kb-table-row-odd'; |
---|
487 | } |
---|
488 | else |
---|
489 | { |
---|
490 | $odd = false; |
---|
491 | $class = 'kb-table-row-even'; |
---|
492 | } |
---|
493 | |
---|
494 | $html .= "<tr class=".$class." style=\"height: 32px;\">"; |
---|
495 | if (strpos($clmn,"img")) |
---|
496 | { |
---|
497 | $html .= '<td width="64" align="center"><img src='.$pilot->getPortraitURL( 32 ).'></td>'; |
---|
498 | } |
---|
499 | $html .= '<td align="center"><a href=?a=pilot_detail&plt_id='.$pilot->getID().'>'.$pilot->getName().'</a></td>'; |
---|
500 | if (strpos($clmn,"kll_pnts")) |
---|
501 | { |
---|
502 | $html .= '<td align="center">'.$points.'</td>'; |
---|
503 | } |
---|
504 | if (strpos($clmn,"dmg_dn")) |
---|
505 | { |
---|
506 | $html .= '<td align="center">'.round($plist->getISK(),2).'M</td>'; |
---|
507 | } |
---|
508 | if (strpos($clmn,"dmg_rcd")) |
---|
509 | { |
---|
510 | $html .= '<td align="center">'.round($pllist->getISK(),2).'M</td>'; |
---|
511 | } |
---|
512 | if (strpos($clmn,"eff")) |
---|
513 | { |
---|
514 | $html .= '<td align="center">'.$efficiency.'%</td>'; |
---|
515 | } |
---|
516 | if ($page->isAdmin()) |
---|
517 | { |
---|
518 | $html .= "<td align=center><a href=\"javascript:openWindow('?a=move_pilot&plt_id=".$data['plt_id']."', null, 500, 500, '' )\">Move</a></td>"; |
---|
519 | } |
---|
520 | $html .= '</tr>'; |
---|
521 | } |
---|
522 | |
---|
523 | $html .='</table>'; |
---|
524 | } |
---|
525 | break; |
---|
526 | } |
---|
527 | |
---|
528 | $menubox = new Box("Menu"); |
---|
529 | $menubox->setIcon("menu-item.gif"); |
---|
530 | $menubox->addOption("caption","Kills & losses"); |
---|
531 | $menubox->addOption("link","Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); |
---|
532 | $menubox->addOption("link","Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); |
---|
533 | $menubox->addOption("link","Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); |
---|
534 | $menubox->addOption("caption","Pilot statistics"); |
---|
535 | $menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); |
---|
536 | |
---|
537 | $killboard = $page->killboard_; |
---|
538 | $config = $killboard->getConfig(); |
---|
539 | if ($config->getKillPoints()) |
---|
540 | $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); |
---|
541 | $menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); |
---|
542 | $menubox->addOption("link","Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); |
---|
543 | $menubox->addOption("link","Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); |
---|
544 | $menubox->addOption("link","Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); |
---|
545 | $menubox->addOption("caption","Global statistics"); |
---|
546 | $menubox->addOption("link","Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); |
---|
547 | $menubox->addOption("link","Most violent systems", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=violent_systems"); |
---|
548 | $menubox->addOption("link","Known Members", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=known_members"); |
---|
549 | $page->addContext($menubox->generate()); |
---|
550 | $page->setContent($html); |
---|
551 | $page->generate(); |
---|
552 | ?> |
---|