isAdmin()) { if (isset($_POST['submit'])) { // Send new value for item to the database $IID = $_POST['IID']; $Val = $_POST[$IID]; $qry = new DBQuery(); $qry->execute("UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'") or die($qry->getErrorMsg()); } } if (!$kll_id = intval($_GET['kll_id'])) { $html = "No kill id spezified."; $page->setContent($html); $page->generate($html); exit; } $kill = new Kill($kll_id); if (!$kill->exists()) { $html = "That kill doesn't exist."; $page->setContent($html); $page->generate($html); exit; } $html .= ""; // ship, ship details $html .= "
"; // victim $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= "
getVictimPortrait(64) . "\" border=\"0\">Victim:getVictimID() . "\">" . $kill->getVictimName() . "
Corp:getVictimCorpID() . "\">" . $kill->getVictimCorpName() . "
Alliance:getVictimAllianceID()."\">".$kill->getVictimAllianceName()."
"; // involved $html .= "
Involved parties
"; $html .= ""; $odd = true; foreach ($kill->involvedparties_ as $inv) { $pilot = new Pilot($inv->getPilotID()); $corp = new Corporation($inv->getCorpID()); $alliance = new Alliance($inv->getAllianceID()); $ship = $inv->getShip(); $weapon = $inv->getWeapon(); if ($odd) { $odd = false; $rowclass = "kb-table-row-even"; } else { $odd = true; $rowclass = "kb-table-row-odd"; } if ($pilot->getID() == $kill->getFBPilotID()) { $imgclass = "class=finalblow "; } else { $imgclass = ""; } $html .= ""; if ($corp->isNPCCorp()) { $html .= ""; } else { $html .= ""; } $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; if ($weapon->getName() != "Unknown" && $weapon->getName() != $ship->getName()) $html .= ""; else $html .= ""; } $html .= "
getPortraitURL(64) . "\" border=\"0\">getPortraitURL(64) . "\" border=\"0\">getImage(64) . "\" border=\"0\">getID() . "\">" . $pilot->getName() . "
getID() . "\">" . $corp->getName() . "
getID() . "\">" . $alliance->getName() . "
" . $ship->getName() . "
" . $weapon->getName() . "
Unknown
"; if ($config->getConfig('comments')) { include('common/comments.php'); } $html .= "
 "; $html .= ""; $ship = $kill->getVictimShip(); $shipclass = $ship->getClass(); $html .= ""; $html .= ""; $html .= ""; $system = $kill->getSystem(); $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= "
getImage(64) . "\">Ship:" . $ship->getName() . " (" . $shipclass->getName() . ")
Location:getID() . "', '', 620, 260, '' );\">" . $system->getName() . " (" . $system->getSecurity(true) . ")
Date:" . $kill->getTimeStamp() . "
"; // ship fitting if (count($kill->destroyeditems_) > 0) { $html .= "
Ship details
"; $html .= ""; $imgid = 0; if($page->isAdmin()) { } foreach($kill->destroyeditems_ as $destroyed) { $item = $destroyed->getItem(); switch ($destroyed->getLocationID()) { case 4: $location = "Cargo"; break; case 6: // drone $location = "Drone Bay"; break; default: switch ($item->getSlot()) { case 1: // high $location = "Fitted - High slot"; break; case 2: // high $location = "Fitted - Medium slot"; break; case 3: // high $location = "Fitted - Low slot"; break; case 6: // drone $location = "Drone Bay"; break; } break; } if ($location != $lastlocation) { $lastlocation = $location; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; } // item detail //Coni $html .= ""; $html .= $item->getIcon(32); $html .= ""; $html .= ""; $value = $destroyed->getValue(); $value_single = $value; if ($value > 0) { $value = $destroyed->getValue() * $destroyed->getQuantity(); $TotalValue = $TotalValue + $value; // Value Manipulation for prettyness. if (strlen($value) >1) { // 1000's ? $Formatted = number_format($value,2); $Formatted = $Formatted . " isk"; } if (strlen($value) >3) { // 1000's ? $Formatted = round($value / 1000,2); $Formatted = number_format($Formatted,2); $Formatted = $Formatted . " K"; } if (strlen($value) >6) { // Is this value in the millions? $Formatted = round($value / 1000000,2); $Formatted = number_format($Formatted,2); $Formatted = $Formatted . " M"; } } if ($page->isAdmin()) { $html .=""; $html .= ""; // Hidden Item Id Indicator $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .=""; } else { $html .= ""; $imgid++; } $html .= ""; //$html .= ""; $html .= ""; if ($TotalValue > 0) { $Formatted = number_format($TotalValue,2); } //Get Ship Value $ShipValue = $ship->getPrice(); $TotalLoss = number_format($TotalValue + $ShipValue,2); $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= "
\""" . $location . "" . "Value" . "
" . $item->getName() . "" . $destroyed->getQuantity() . "
$value"; $html .= "
Single Unit Value:"; $html .= "$Formatted"; } $html .= "
" . "Total Module Loss:" . "" . $Formatted . ""; $html .="
" . "Ship Loss:" . "" . number_format($ShipValue,2) . "
" . "Total Loss:" . "" . $TotalLoss . "
"; } else $html .= "
No ship details
"; $html .= "
"; $menubox = new box("Menu"); $menubox->setIcon("menu-item.gif"); $menubox->addOption("Caption","View"); $menubox->addOption("link","Killmail", "javascript:openWindow( '?a=kill_mail&kll_id=".$kill->getID()."', null, 355, 430, '' );"); if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) { $menubox->addOption("link","Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); } if ($page->isAdmin()) { $menubox->addOption("caption","Admin"); $menubox->addOption("link","Delete", "javascript:openWindow('?a=kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); } $page->addContext($menubox->generate()); if ($config->getKillPoints()) { $scorebox = new Box("Points awarded"); $scorebox->addOption("points",$kill->getKillPoints()); $page->addContext($scorebox->generate()); } $mapbox = new Box("Map"); $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=map&size=145"); $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=region&size=145"); $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145"); $page->addContext($mapbox->generate()); $page->setContent($html); $page->generate(); ?>