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


PHP Info::doMakeCommon方法代码示例

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


在下文中一共展示了Info::doMakeCommon方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: key

 $p['page'] = $page;
 $columnName = key($p);
 $id = (int) reset($p);
 if (sizeof($p) <= 1) {
     $app->redirect($fullAddr, 302);
 }
 $topPoints = array();
 $topPods = array();
 $p['kills'] = true;
 $p['pastSeconds'] = $numDays * 86400;
 $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;
开发者ID:Nord001,项目名称:zKillboard,代码行数:31,代码来源:index.php

示例3: key

 $columnName = key($p);
 $id = (int) reset($p);
 if (sizeof($p) <= 1) {
     $app->redirect($fullAddr, 302);
 }
 $topPoints = array();
 $topPods = array();
 $p['kills'] = true;
 $p['pastSeconds'] = $numDays * 86400;
 $top = array();
 $top[] = Info::doMakeCommon('Top Characters', 'characterID', Stats::getTop('characterID', $p));
 $top[] = $columnName != 'corporationID' ? Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTop('corporationID', $p)) : array();
 $top[] = $columnName != 'corporationID' && $columnName != 'allianceID' ? Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTop('allianceID', $p)) : array();
 $top[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTop('shipTypeID', $p));
 $top[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTop('solarSystemID', $p));
 $top[] = Info::doMakeCommon('Top Locations', 'locationID', Stats::getTop('locationID', $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;
开发者ID:a-tal,项目名称:zKillboard,代码行数:31,代码来源:index.php

示例4: array

    $p['pastSeconds'] = $numDays * 86400;
    $p['kills'] = $pageType != 'losses';
    if ($key != 'character') {
        $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]);
开发者ID:WreckerWorld,项目名称:zKillboard,代码行数:31,代码来源:overview.php

示例5: date

$i = date('i');
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

示例6: array

$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::getTopPilots($p, $warFinished));
$top[] = Info::doMakeCommon('Top Corporations', 'corporationID', Stats::getTopCorps($p, $warFinished));
$top[] = Info::doMakeCommon('Top Alliances', 'allianceID', Stats::getTopAllis($p, $warFinished));
$top[] = Info::doMakeCommon('Top Ships', 'shipTypeID', Stats::getTopShips($p, $warFinished));
$top[] = Info::doMakeCommon('Top Systems', 'solarSystemID', Stats::getTopSystems($p, $warFinished));
$p['limit'] = 5;
$topIsk = array();
//Stats::getTopIsk($p);
unset($p['pastSeconds']);
unset($p['kills']);
// get latest kills
$killsLimit = 50;
$p['limit'] = $killsLimit;
$preKills = Kills::getKills($p);
$kills = array();
$agrID = $warData['aggressor']['id'];
$dfdID = $warData['defender']['id'];
foreach ($preKills as $kill) {
    $victim = $kill['victim'];
    if (@$victim['corporationID'] == $dfdID || @$victim['allianceID'] == $dfdID) {
开发者ID:Nord001,项目名称:zKillboard,代码行数:31,代码来源:war.php

示例7: array

require_once '../init.php';
global $redis;
if (date('i') % 15 != 0) {
    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:TopChars', 3600, json_encode(Info::doMakeCommon('Top Characters', 'characterID', getStats('characterID'))));
$redis->setex('RC:TopCorps', 3600, json_encode(Info::doMakeCommon('Top Corporations', 'corporationID', getStats('corporationID'))));
$redis->setex('RC:TopAllis', 3600, json_encode(Info::doMakeCommon('Top Alliances', 'allianceID', getStats('allianceID'))));
$redis->setex('RC:TopShips', 3600, json_encode(Info::doMakeCommon('Top Ships', 'shipTypeID', getStats('shipTypeID'))));
$redis->setex('RC:TopSystems', 3600, json_encode(Info::doMakeCommon('Top Systems', 'solarSystemID', getStats('solarSystemID'))));
$redis->setex('RC:TopLocations', 3600, json_encode(Info::doMakeCommon('Top Locations', 'locationID', getStats('locationID'))));
$redis->setex('RC:TopIsk', 3600, json_encode(Stats::getTopIsk(array('pastSeconds' => $numDays * 86400, 'limit' => 5))));
// 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 = '')");
function getStats($column)
{
    $result = Stats::getTop($column, ['isVictim' => false, 'pastSeconds' => 604800]);
    return $result;
}
$redis->keys('*');
// Helps purge expired ttl's
开发者ID:nasimnabavi,项目名称:zKillboard,代码行数:30,代码来源:everyFifteen.php


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