function details() { global $smarty; $item = new dogma($this->typeID); if (!$item->isValid()) { $this->page->setTitle('Error'); return 'This ID is not a valid dogma ID.'; } $this->page->setTitle('Item details - ' . $item->get('typeName')); $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />'); $smarty->assignByRef('item', $item); if ($item->get('itt_cat') == 6) { //we have a ship, so get it from the db $ship = Ship::getByID($item->get('typeID')); $smarty->assign('shipImage', $ship->getImage(64)); $smarty->assign('armour', array('armorHP', 'armorEmDamageResonance', 'armorExplosiveDamageResonance', 'armorKineticDamageResonance', 'armorThermalDamageResonance')); $smarty->assign('shield', array('shieldCapacity', 'shieldRechargeRate', 'shieldEmDamageResonance', 'shieldExplosiveDamageResonance', 'shieldKineticDamageResonance', 'shieldThermalDamageResonance')); $smarty->assign('propulsion', array('maxVelocity', 'agility', 'droneCapacity', 'capacitorCapacity', 'rechargeRate')); $smarty->assign('fitting', array('hiSlots', 'medSlots', 'lowSlots', 'rigSlots', 'upgradeCapacity', 'droneBandwidth', 'launcherSlotsLeft', 'turretSlotsLeft', 'powerOutput', 'cpuOutput')); $smarty->assign('targetting', array('maxTargetRange', 'scanResolution', 'maxLockedTargets', 'scanRadarStrength', 'scanLadarStrength', 'scanMagnetometricStrength', 'scanGravimetricStrength', 'signatureRadius')); $smarty->assign('miscellaneous', array('techLevel', 'propulsionFusionStrength', 'propulsionIonStrength', 'propulsionMagpulseStrength', 'propulsionPlasmaStrength')); $html = $smarty->fetch(get_tpl('invtype_ship')); } else { $i = new Item($this->typeID); $smarty->assign('itemImage', $i->getIcon(64, false)); $smarty->assign('akey', session::isAdmin() ? session::makeKey() : false); $html = $smarty->fetch(get_tpl('invtype_item')); } return $html; }
/** * Return HTML to describe the victim * * @global Smarty $smarty * @return string HTML to describe the victim */ function victim() { global $smarty; $smarty->assign('killID', $this->kill->getID()); $plt = new Pilot($this->kill->getVictimID()); $item = new dogma($this->kill->getVictimShip()->getID()); // itt_cat = 6 for ships. Assume != 6 is a structure. if ($item->get('itt_cat') != 6) { $corp = new Corporation($this->kill->getVictimCorpID()); $smarty->assign('victimPortrait', $corp->getPortraitURL(64)); $smarty->assign('victimExtID', 0); $smarty->assign('victimURL', edkURI::page('invtype', $item->getID())); } else { $smarty->assign('victimPortrait', $plt->getPortraitURL(64)); $smarty->assign('victimExtID', $plt->getExternalID()); $smarty->assign('victimURL', edkURI::page('pilot_detail', $this->kill->getVictimID(), 'plt_id')); } $smarty->assign('victimName', $this->kill->getVictimName()); $smarty->assign('victimCorpURL', edkURI::page('corp_detail', $this->kill->getVictimCorpID(), 'crp_id')); $smarty->assign('victimCorpName', $this->kill->getVictimCorpName()); $smarty->assign('victimAllianceURL', edkURI::page('alliance_detail', $this->kill->getVictimAllianceID(), 'all_id')); $smarty->assign('victimAllianceName', $this->kill->getVictimAllianceName()); $smarty->assign('victimDamageTaken', $this->kill->getDamageTaken()); return $smarty->fetch(get_tpl('kill_detail_victim')); }