当前位置: 首页>>代码示例>>PHP>>正文


PHP Stats::getTopIsk方法代码示例

本文整理汇总了PHP中Stats::getTopIsk方法的典型用法代码示例。如果您正苦于以下问题:PHP Stats::getTopIsk方法的具体用法?PHP Stats::getTopIsk怎么用?PHP Stats::getTopIsk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stats的用法示例。


在下文中一共展示了Stats::getTopIsk方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute($parameters, $db)
 {
     $p = array();
     $p["limit"] = 5;
     $p["pastSeconds"] = 3 * 86400;
     $p["kills"] = true;
     Storage::store("Top3dayChars", json_encode(Info::doMakeCommon("Top Characters - Last 3 Days", "characterID", Stats::getTopPilots($p))));
     Storage::store("Top3dayCorps", json_encode(Info::doMakeCommon("Top Corporations - Last 3 Days", "corporationID", Stats::getTopCorps($p))));
     Storage::store("Top3dayAlli", json_encode(Info::doMakeCommon("Top Alliances - Last 3 Days", "allianceID", Stats::getTopAllis($p))));
     Storage::store("TopIsk", json_encode(Stats::getTopIsk(array("pastSeconds" => 3 * 86400, "limit" => 5))));
     Storage::store("TopPods", json_encode(Stats::getTopIsk(array("groupID" => 29, "pastSeconds" => 3 * 86400, "limit" => 5))));
     Storage::store("TopPoints", json_encode(Stats::getTopPoints("killID", array("losses" => true, "pastSeconds" => 3 * 86400, "limit" => 5))));
     Storage::store("KillCount", $db->queryField("select count(*) count from zz_killmails", "count"));
     Storage::store("ActualKillCount", $db->queryField("select count(*) count from zz_killmails where processed = 1", "count"));
 }
开发者ID:Covert-Inferno,项目名称:zKillboard,代码行数:15,代码来源:cli_every15.php

示例2: array

    $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);
    $top[] = json_decode(Storage::retrieve('TopCorps', [], 900), true);
    $top[] = json_decode(Storage::retrieve('TopAllis', [], 900), true);
    $top[] = json_decode(Storage::retrieve('TopShips', [], 900), true);
    $top[] = json_decode(Storage::retrieve('TopSystems', [], 900), true);
    // get latest kills
    $kills = Kills::getKills(array('cacheTime' => 60, 'limit' => 50));
    // Collect active PVP stats
    $types = ['characterID', 'corporationID', 'allianceID', 'shipTypeID', 'solarSystemID', 'regionID'];
    $activePvP = [];
    foreach ($types as $type) {
        $result = Stats::getDistinctCount($type, []);
        if ($result <= 1) {
开发者ID:Nord001,项目名称:zKillboard,代码行数:31,代码来源:index.php

示例3: array

        $topLists[] = Info::doMakeCommon('Top Characters', 'characterID', Stats::getTop('characterID', $p));
        if ($key != 'corporation') {
            $topLists[] = Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTop('corporationID', $p));
            if ($key != 'alliance') {
                $topLists[] = Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTop('allianceID', $p));
            }
        }
    }
    if ($key != 'ship') {
        $topLists[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTop('shipTypeID', $p));
    }
    if ($key != 'system') {
        $topLists[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTop('solarSystemID', $p));
    }
    $p['limit'] = 5;
    $topKills = Stats::getTopIsk($p);
}
$corpList = array();
if ($pageType == 'api') {
    $corpList = Info::getCorps($id);
}
$corpStats = array();
if ($pageType == 'corpstats') {
    $corpStats = Info::getCorpStats($id, $parameters);
}
$onlyHistory = array('character', 'corporation', 'alliance');
if ($pageType == 'stats' && in_array($key, $onlyHistory)) {
    $months = $mdb->findField('statistics', 'months', ['type' => $key . 'ID', 'id' => (int) $id]);
    if ($months != null) {
        krsort($months);
    }
开发者ID:WreckerWorld,项目名称:zKillboard,代码行数:31,代码来源:overview.php

示例4: array

if ($i % 15 != 0) {
    exit;
}
$p = array();
$numDays = 7;
$p['limit'] = 10;
$p['pastSeconds'] = $numDays * 86400;
$p['kills'] = true;
Storage::store('Kills5b+', json_encode(Kills::getKills(array('iskValue' => 5000000000), true, false)));
Storage::store('Kills10b+', json_encode(Kills::getKills(array('iskValue' => 10000000000), true, false)));
Storage::store('TopChars', json_encode(Info::doMakeCommon('Top Characters', 'characterID', getStats('characterID'))));
Storage::store('TopCorps', json_encode(Info::doMakeCommon('Top Corporations', 'corporationID', getStats('corporationID'))));
Storage::store('TopAllis', json_encode(Info::doMakeCommon('Top Alliances', 'allianceID', getStats('allianceID'))));
Storage::store('TopShips', json_encode(Info::doMakeCommon('Top Ships', 'shipTypeID', getStats('shipTypeID'))));
Storage::store('TopSystems', json_encode(Info::doMakeCommon('Top Systems', 'solarSystemID', getStats('solarSystemID'))));
Storage::store('TopIsk', json_encode(Stats::getTopIsk(array('pastSeconds' => $numDays * 86400, 'limit' => 5))));
// Cleanup old sessions
Db::execute('delete from zz_users_sessions where validTill < now()');
// Keep the account balance table clean
Db::execute('delete from zz_account_balance where balance = 0');
// Cleanup subdomain stuff
Db::execute('update zz_subdomains set adfreeUntil = null where adfreeUntil < now()');
Db::execute("update zz_subdomains set banner = null where banner = ''");
Db::execute("delete from zz_subdomains where adfreeUntil is null and banner is null and (alias is null or alias = '')");
// Expire change expirations
Db::execute('update zz_users set change_expiration = null, change_hash = null where change_expiration < date_sub(now(), interval 3 day)');
function getStats($column)
{
    $result = Stats::getTop($column, ['isVictim' => false, 'pastSeconds' => 604800]);
    return $result;
}
开发者ID:WreckerWorld,项目名称:zKillboard,代码行数:31,代码来源:everyFifteen.php

示例5: array

$campaign = Db::queryRow('select * from zz_campaigns where uri = :uri', array(':uri' => $uri), 1);
if ($campaign == null) {
    $app->redirect('/', 302);
}
$title = 'Campaign: ' . $campaign['title'];
$subTitle = $campaign['subTitle'];
$p = json_decode($campaign['definition'], true);
$summary = Summary::getSummary('system', 'solarSystemID', $p, 30000142, $p, true);
$topPoints = array();
$topPods = array();
$top = array();
$top[] = Info::doMakeCommon('Top Characters', 'characterID', Stats::getTopPilots($p, true));
$top[] = Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTopCorps($p, true));
$top[] = Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTopAllis($p, true));
$top[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTopShips($p, true));
$top[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTopSystems($p, true));
$p['pastSeconds'] = $numDays * 86400;
$p['limit'] = 5;
$topIsk = Stats::getTopIsk($p, true);
$topIsk['title'] = 'Most Valuable Kills';
unset($p['pastSeconds']);
// get latest kills
$killsLimit = 50;
$p['limit'] = $killsLimit;
if (isset($page) && $page > 0 && $page < 100) {
    $p['page'] = $page;
} else {
    $page = 1;
}
$kills = Kills::getKills($p);
$app->render('campaign.html', array('topPods' => $topPods, 'topIsk' => $topIsk, 'topPoints' => $topPoints, 'topKillers' => $top, 'kills' => $kills, 'page' => 1, 'pageType' => 'kills', 'pager' => true, 'requesturi' => '/campaign/burnjita3/', 'page' => $page, 'detail' => $summary, 'pageTitle' => $title, 'subTitle' => $subTitle));
开发者ID:Nord001,项目名称:zKillboard,代码行数:31,代码来源:campaign.php

示例6: array

<?php

require_once '../init.php';
global $redis;
$key = "zkb:everyFiften";
if ($redis->get($key) === true) {
    exit;
}
$p = array();
$numDays = 7;
$p['limit'] = 10;
$p['pastSeconds'] = $numDays * 86400;
$p['kills'] = true;
$redis->setex('RC:Kills5b+', 3600, json_encode(Kills::getKills(array('iskValue' => 5000000000), true, false)));
$redis->setex('RC:Kills10b+', 3600, json_encode(Kills::getKills(array('iskValue' => 10000000000), true, false)));
$redis->setex('RC:TopIsk', 3600, json_encode(Stats::getTopIsk(array('pastSeconds' => $numDays * 86400, 'limit' => 5))));
function getStats($column)
{
    $result = Stats::getTop($column, ['isVictim' => false, 'pastSeconds' => 604800]);
    return $result;
}
$redis->keys('*');
// Helps purge expired ttl's
$redis->setex($key, 54000, true);
开发者ID:a-tal,项目名称:zKillboard,代码行数:24,代码来源:everyFifteen.php


注:本文中的Stats::getTopIsk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。