Example #1
0
    $top = array();
    $top[] = Info::doMakeCommon('Top Characters', 'characterID', Stats::getTopPilots($p));
    $top[] = $columnName != 'corporationID' ? Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTopCorps($p)) : array();
    $top[] = $columnName != 'corporationID' && $columnName != 'allianceID' ? Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTopAllis($p)) : array();
    $top[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTopShips($p));
    $top[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTopSystems($p));
    $requestUriPager = str_replace('ID', '', $columnName) . "/{$id}/";
    $p['limit'] = 5;
    $topIsk = Stats::getTopIsk($p);
    unset($p['pastSeconds']);
    unset($p['kills']);
    // get latest kills
    $killsLimit = 50;
    $p['limit'] = $killsLimit;
    $kills = Kills::getKills($p);
    $kills = Kills::mergeKillArrays($kills, array(), $killsLimit, $columnName, $id);
    Info::addInfo($p);
    $pageTitle = array();
    foreach ($p as $key => $value) {
        if (strpos($key, 'Name') !== false) {
            $pageTitle[] = $value;
        }
    }
    $pageTitle = implode(',', $pageTitle);
    $pageType = 'subdomain';
} else {
    $topPoints = array();
    $topIsk = Stats::getTopIsk(array('cacheTime' => 15 * 60, 'pastSeconds' => 7 * 86400, 'limit' => 5));
    $topPods = array();
    $top = array();
    $top[] = json_decode(Storage::retrieve('TopChars', [], 900), true);
Example #2
0
$cnt = 0;
$cnid = 0;
$stats = array();
$totalcount = ceil(count($detail['stats']) / 4);
if ($detail['stats'] != null) {
    foreach ($detail['stats'] as $q) {
        if ($cnt == $totalcount) {
            ++$cnid;
            $cnt = 0;
        }
        $stats[$cnid][] = $q;
        ++$cnt;
    }
}
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 = '';