getAlliance(); $klist = new KillList(); $tklist = new KillList(); $llist = new KillList(); $klist->addInvolvedCorp($corp); $tklist->addInvolvedCorp($corp); $tklist->setPodsNoobShips(false); $llist->addVictimCorp($corp); $klist->getAllKills(); $llist->getAllKills(); $page = new Page("Corporation details - " . $corp->getName()); $html .= ""; } else { $html .= ""; } // $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; if ($klist->getISK()) $efficiency = round($klist->getISK() / ($klist->getISK() + $llist->getISK()) * 100, 2); else $efficiency = 0; $html .= ""; $html .= "
"; if (file_exists("img/corps/".$corp->getID().".jpg")) { $html .= "getPortraitURL(128)."\" border=\"0\">
Alliance:"; if ($alliance->getName() == "Unknown" || $alliance->getName() == "None") $html .= "" . $alliance->getName() . ""; else $html .= "getID() . "\">" . $alliance->getName() . ""; $html .= "
Kills:" . $klist->getCount() . "
Real kills:" . $tklist->getCount() . "
Losses:" . $llist->getCount() . "
Damage done (ISK):" . $klist->getISK() . "M
Damage received (ISK):" . $llist->getISK() . "M
Efficiency:" . $efficiency . "%
"; $html .= "
"; if ($_GET['view'] == "" || $_GET['view'] == "kills" || $_GET['view'] == "losses") { $summarytable = new KillSummaryTable($klist, $llist); $summarytable->setBreak(6); $html .= $summarytable->generate(); } switch ($_GET['view']) { case "": $html .= "
10 Most recent kills
"; $list = new KillList(); $list->setOrdered(true); $list->setLimit(10); $list->setPodsNoobships(true); $list->addInvolvedCorp($corp); if ($_GET['scl_id']) $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); $ktab = new KillListTable($list); $ktab->setLimit(10); $ktab->setDayBreak(false); $html .= $ktab->generate(); $html .= "
10 Most recent losses
"; $list = new KillList(); $list->setOrdered(true); $list->setLimit(10); $list->setPodsNoobships(true); $list->addVictimCorp($corp); if ($_GET['scl_id']) $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); $ltab = new KillListTable($list); $ltab->setLimit(10); $ltab->setDayBreak(false); $html .= $ltab->generate(); break; case "kills": $html .= "
All kills
"; $list = new KillList(); $list->setOrdered(true); $list->addInvolvedCorp($corp); if ($_GET['scl_id']) $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); $pagesplitter = new PageSplitter($list->getCount(), 30); $list->setPageSplitter($pagesplitter); $table = new KillListTable($list); $table->setDayBreak(false); $html .= $table->generate(); $html .= $pagesplitter->generate(); break; case "losses": $html .= "
All losses
"; $list = new KillList(); $list->setOrdered(true); $list->setPodsNoobships(true); $list->addVictimCorp($corp); if ($_GET['scl_id']) $list->addVictimShipClass(new ShipClass($_GET['scl_id'])); $pagesplitter = new PageSplitter($list->getCount(), 30); $list->setPageSplitter($pagesplitter); $table = new KillListTable($list); $table->setDayBreak(false); $html .= $table->generate(); $html .= $pagesplitter->generate(); break; case "pilot_kills": $html .= "
Top killers
"; $html .= "
"; $html .= "
This month
"; $list = new TopKillsList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopKillsList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; break; case "pilot_scores": $html .= "
Top scorers
"; $html .= "
"; $html .= "
This month
"; $list = new TopScoreList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Points"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopScoreList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $table = new TopPilotTable($list, "Points"); $html .= $table->generate(); $html .= "
"; break; case "pilot_solo": $html .= "
Top solokillers
"; $html .= "
"; $html .= "
This month
"; $list = new TopSoloKillerList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Solokills"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopSoloKillerList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $table = new TopPilotTable($list, "Solokills"); $html .= $table->generate(); $html .= "
"; break; case "pilot_damage": $html .= "
Top damagedealers
"; $html .= "
"; $html .= "
This month
"; $list = new TopDamageDealerList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopDamageDealerList(); $list->addInvolvedCorp($corp); $list->setPodsNoobShips(false); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; break; case "pilot_griefer": $html .= "
Top griefers
"; $html .= "
"; $html .= "
This month
"; $list = new TopGrieferList(); $list->addInvolvedCorp($corp); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopGrieferList(); $list->addInvolvedCorp($corp); $table = new TopPilotTable($list, "Kills"); $html .= $table->generate(); $html .= "
"; break; case "pilot_losses": $html .= "
Top losers
"; $html .= "
"; $html .= "
This month
"; $list = new TopLossesList(); $list->addVictimCorp($corp); $list->setPodsNoobShips(false); $list->setMonth(date("m")); $list->setYear(date("Y")); $table = new TopPilotTable($list, "Losses"); $html .= $table->generate(); $html .= "
"; $html .= "
All time
"; $list = new TopLossesList(); $list->addVictimCorp($corp); $list->setPodsNoobShips(false); $table = new TopPilotTable($list, "Losses"); $html .= $table->generate(); $html .= "
"; break; case "ships_weapons": $html .= "
Ships & weapons used
"; $html .= "
"; $shiplist = new TopShipList(); $shiplist->addInvolvedCorp($corp); $shiplisttable = new TopShipListTable($shiplist); $html .= $shiplisttable->generate(); $html .= ""; $weaponlist = new TopWeaponList(); $weaponlist->addInvolvedCorp($corp); $weaponlisttable = new TopWeaponListTable($weaponlist); $html .= $weaponlisttable->generate(); $html .= "
"; break; case "known_members": if($config->getConfig('known_members_own')) { $alliance->getID(); if (ALLIANCE_ID && $alliance->getID() == ALLIANCE_ID) { $can_view = 1; } elseif (CORP_ID && $corp->getID() == CORP_ID) { $can_view = 1; } } if($can_view == 1) { $html .= "Cannot View this corps Member List"; } else { $query = "SELECT * FROM `kb3_pilots` WHERE plt_crp_id =".intval($_GET['crp_id'])." ORDER BY `plt_name` ASC"; $qry = new DBQuery(); $qry->execute($query); $cnt = $qry->recordCount(); $clmn = $config->getConfig('known_members_clmn'); $html .= "
Known Pilots (".$cnt.")
"; $html .= ""; $html .= ''; if (strpos($clmn,"img")) { $html .= ''; } $html .= ''; if (strpos($clmn,"kll_pnts")) { $html .= ''; } if (strpos($clmn,"dmg_dn")) { $html .= ''; } if (strpos($clmn,"dmg_rcd")) { $html .= ''; } if (strpos($clmn,"eff")) { $html .= ''; } if ($page->isAdmin()) { $html .= ''; } $html .= ''; while ($data = $qry->getRow()) { $pilot = new Pilot( $data['plt_id'] ); $plist = new KillList(); $plist->addInvolvedPilot($pilot); $plist->getAllKills(); $points = $plist->getPoints(); $pllist = new KillList(); $pllist->addVictimPilot($pilot); $pllist->getAllKills(); $plistisk = $plist->getISK(); $pllistisk = $pllist->getISK(); if ($plistisk == 0) { $plistisk = 1; } //Remove divide by 0 if ($pllistisk == 0) { $pllistisk = 1; } //Remove divide by 0 $efficiency = round($plistisk / ($plistisk + $pllistisk) * 100, 2); if (!$odd) { $odd = true; $class = 'kb-table-row-odd'; } else { $odd = false; $class = 'kb-table-row-even'; } $html .= ""; if (strpos($clmn,"img")) { $html .= ''; } $html .= ''; if (strpos($clmn,"kll_pnts")) { $html .= ''; } if (strpos($clmn,"dmg_dn")) { $html .= ''; } if (strpos($clmn,"dmg_rcd")) { $html .= ''; } if (strpos($clmn,"eff")) { $html .= ''; } if ($page->isAdmin()) { $html .= ""; } $html .= ''; } $html .='
PilotKill PointsDmg Done (isk)Dmg Recived (isk)EfficiencyAdmin - Move
getID().'>'.$pilot->getName().''.$points.''.round($plist->getISK(),2).'M'.round($pllist->getISK(),2).'M'.$efficiency.'%Move
'; } break; } $menubox = new Box("Menu"); $menubox->setIcon("menu-item.gif"); $menubox->addOption("caption","Kills & losses"); $menubox->addOption("link","Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); $menubox->addOption("link","Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); $menubox->addOption("link","Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); $menubox->addOption("caption","Pilot statistics"); $menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); $killboard = $page->killboard_; $config = $killboard->getConfig(); if ($config->getKillPoints()) $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); $menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); $menubox->addOption("link","Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); $menubox->addOption("link","Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); $menubox->addOption("link","Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); $menubox->addOption("caption","Global statistics"); $menubox->addOption("link","Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); $menubox->addOption("link","Known Members", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=known_members"); $page->addContext($menubox->generate()); $page->setContent($html); $page->generate(); ?>