예제 #1
0
}
if ($mixedKills) {
    $kills = Kills::mergeKillArrays($mixed, array(), $limit, $columnName, $id);
}
$prevID = null;
$nextID = null;
$warID = (int) $id;
$extra = array();
$extra['hasWars'] = false;
//Db::queryField("select count(distinct warID) count from zz_wars where aggressor = $warID or defender = $warID", "count");
$extra['wars'] = array();
if (false && $pageType == 'wars' && $extra['hasWars']) {
    $extra['wars'][] = War::getNamedWars('Active Wars - Aggressor', "select * from zz_wars where aggressor = {$warID} and timeFinished is null order by timeStarted desc");
    $extra['wars'][] = War::getNamedWars('Active Wars - Defending', "select * from zz_wars where defender = {$warID} and timeFinished is null order by timeStarted desc");
    $extra['wars'][] = War::getNamedWars('Closed Wars - Aggressor', "select * from zz_wars where aggressor = {$warID} and timeFinished is not null order by timeFinished desc");
    $extra['wars'][] = War::getNamedWars('Closed Wars - Defending', "select * from zz_wars where defender = {$warID} and timeFinished is not null order by timeFinished desc");
}
$filter = '';
switch ($key) {
    case 'corporation':
    case 'alliance':
    case 'faction':
        $filter = "{$key}ID = :id";
}
if ($filter != '') {
    $query = ["{$key}ID" => (int) $id, 'isVictim' => false, 'groupID' => [659, 30], 'pastSeconds' => 90 * 86400];
    $query = MongoFilter::buildQuery($query);
    $hasSupers = $mdb->exists('killmails', $query);
    $extra['hasSupers'] = $hasSupers;
    $extra['supers'] = array();
    if ($pageType == 'supers' && $hasSupers) {
예제 #2
0
파일: detail.php 프로젝트: a-tal/zKillboard
 $extra['involvedships'] = involvedships($killdata['involved']);
 $extra['involvedshipscount'] = count($extra['involvedships']);
 $extra['totalprice'] = usdeurgbp($killdata['info']['zkb']['totalValue']);
 $extra['destroyedprice'] = usdeurgbp($extra['lostisk']);
 $extra['droppedprice'] = usdeurgbp($extra['droppedisk']);
 $extra['fittedprice'] = usdeurgbp($extra['fittedisk']);
 $extra['efttext'] = Fitting::EFT($extra['fittingwheel']);
 $extra['dnatext'] = Fitting::DNA($killdata['items'], $killdata['victim']['shipTypeID']);
 $extra['edkrawmail'] = 'deprecated - use CREST';
 $extra['zkbrawmail'] = 'deprecated - use CREST';
 $extra['slotCounts'] = Info::getSlotCounts($killdata['victim']['shipTypeID']);
 $extra['commentID'] = $id;
 $extra['crest'] = $mdb->findDoc('crestmails', ['killID' => $id, 'processed' => true]);
 $extra['prevKillID'] = $mdb->findField('killmails', 'killID', ['cacheTime' => 300, 'killID' => ['$lt' => $id]], ['killID' => -1]);
 $extra['nextKillID'] = $mdb->findField('killmails', 'killID', ['cacheTime' => 300, 'killID' => ['$gt' => $id]], ['killID' => 1]);
 $extra['warInfo'] = War::getKillIDWarInfo($id);
 //$extra["insertTime"] = Db::queryField("select insertTime from zz_killmails where killID = :killID", "insertTime", array(":killID" => $id), 300);
 $systemID = $killdata['info']['system']['solarSystemID'];
 $data = Info::getWormholeSystemInfo($systemID);
 $extra['wormhole'] = $data;
 $url = 'https://' . $_SERVER['SERVER_NAME'] . "/detail/{$id}/";
 if ($killdata['victim']['groupID'] == 29) {
     $query = ['$and' => [['involved.characterID' => (int) $killdata['victim']['characterID']], ['killID' => ['$gte' => $id - 200]], ['killID' => ['$lt' => $id]], ['vGroupID' => ['$ne' => 29]]]];
     $relatedKill = $mdb->findDoc('killmails', $query);
     if ($relatedKill) {
         $relatedShip = ['killID' => $relatedKill['killID'], 'shipTypeID' => $relatedKill['involved'][0]['shipTypeID']];
     }
 } else {
     $query = ['$and' => [['involved.characterID' => (int) @$killdata['victim']['characterID']], ['killID' => ['$lte' => $id + 200]], ['killID' => ['$gt' => $id]], ['vGroupID' => 29]]];
     $relatedKill = $mdb->findDoc('killmails', $query);
     if ($relatedKill) {
예제 #3
0
<?php

$warID = (int) $warID;
$warData = War::getWarInfo($warID);
$warFinished = @$warData['finished'] === true;
$p = array('warID' => $warID);
$kills = Kills::getKills($p);
$topPods = array();
$topIsk = array();
$topPoints = array();
$topKillers = array();
$page = 1;
$pageTitle = "War {$warID}";
$p['kills'] = true;
if (!$warFinished) {
    $p['pastSeconds'] = 7 * 86400;
}
$top = array();
$top[] = Info::doMakeCommon('Top Characters', 'characterID', Stats::getTop('characterID', $p));
$top[] = Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTop('corporationID', $p));
$top[] = Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTop('allianceID', $p));
$top[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTop('shipTypeID', $p));
$top[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTop('solarSystemID', $p));
$p['limit'] = 5;
$topIsk = array();
//Stats::getTopIsk($p);
unset($p['pastSeconds']);
unset($p['kills']);
// get latest kills
$killsLimit = 50;
$p['limit'] = $killsLimit;