예제 #1
0
    }
}
if ($id <= 0) {
    $app->notFound();
}
$parameters = Util::convertUriToParameters();
@($page = max(1, $parameters['page']));
global $loadGroupShips;
// Can't think of another way to do this just yet
$loadGroupShips = $key == 'group';
$limit = 50;
$parameters['limit'] = $limit;
$parameters['page'] = $page;
try {
    $type = $map[$key]['column'];
    $detail = Info::getInfoDetails("{$type}ID", $id);
    if (isset($detail['valid']) && $detail['valid'] == false) {
        $app->notFound();
    }
} catch (Exception $ex) {
    $app->render('error.html', array('message' => "There was an error fetching information for the {$key} you specified."));
    return;
}
$pageName = isset($detail[$map[$key]['column'] . 'Name']) ? $detail[$map[$key]['column'] . 'Name'] : '???';
if ($pageName == '???' && !$mdb->exists('information', ['id' => $id])) {
    return $app->render('404.html', array('message' => 'This entity is not in our database.'), 404);
    die;
}
$columnName = $map[$key]['column'] . 'ID';
$mixedKills = $pageType == 'overview' && $map[$key]['mixed'] && UserConfig::get('mixKillsWithLosses', true);
$mixed = $pageType == 'overview' ? Kills::getKills($parameters) : array();
예제 #2
0
$data['apiChars'] = Api::getCharacters($userID);
$charKeys = Api::getCharacterKeys($userID);
$charKeys = Info::addInfo($charKeys);
$data['apiCharKeys'] = $charKeys;
$data['userInfo'] = User::getUserInfo();
$data['timeago'] = UserConfig::get('timeago');
$data['ddcombine'] = UserConfig::get('ddcombine');
$data['ddmonthyear'] = UserConfig::get('ddmonthyear');
$data['useSummaryAccordion'] = UserConfig::get('useSummaryAccordion', true);
$data['sessions'] = User::getSessions($userID);
$data['history'] = User::getPaymentHistory($userID);
$apiChars = Api::getCharacters($userID);
$domainChars = array();
if ($apiChars != null) {
    foreach ($apiChars as $apiChar) {
        $char = Info::getInfoDetails('characterID', $apiChar['characterID']);
        $char['corpTicker'] = modifyTicker($mdb->findField('information', 'ticker', ['type' => 'corporationID', 'id' => (int) @$char['corporationID']]));
        $char['alliTicker'] = modifyTicker($mdb->findField('information', 'ticker', ['type' => 'corporationID', 'id' => (int) @$char['allianceID']]));
        $domainChars[] = $char;
    }
}
$corps = array();
$allis = array();
foreach ($domainChars as $domainChar) {
    if (@$domainChar['isCEO']) {
        $subdomain = modifyTicker($domainChar['corpTicker']) . ".{$baseAddr}";
        if (isset($bannerUpdates[$subdomain])) {
            $banner = $bannerUpdates[$subdomain];
            Db::execute('insert into zz_subdomains (subdomain, banner) values (:subdomain, :banner) on duplicate key update banner = :banner', array(':subdomain' => $subdomain, ':banner' => $banner));
            $error = "{$subdomain} has been updated, please wait up to 2 minutes for the changes to take effect.";
        }