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


PHP _adSelectCheckCriteria函数代码示例

本文整理汇总了PHP中_adSelectCheckCriteria函数的典型用法代码示例。如果您正苦于以下问题:PHP _adSelectCheckCriteria函数的具体用法?PHP _adSelectCheckCriteria怎么用?PHP _adSelectCheckCriteria使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _adSelectDiscardNonMatchingAds

function _adSelectDiscardNonMatchingAds(&$aAds, $aContext, $source, $richMedia)
{
    if (empty($GLOBALS['_MAX']['CONF']['delivery']['aclsDirectSelection']) && !empty($GLOBALS['_MAX']['DIRECT_SELECTION'])) {
        return;
    }
    foreach ($aAds as $adId => $aAd) {
        OX_Delivery_logMessage('_adSelectDiscardNonMatchingAds: checking bannerid ' . $aAd['ad_id'], 7);
        if (!_adSelectCheckCriteria($aAd, $aContext, $source, $richMedia)) {
            OX_Delivery_logMessage('failed _adSelectCheckCriteria: bannerid ' . $aAd['ad_id'], 7);
            unset($aAds[$adId]);
        } else {
            OX_Delivery_logMessage('passed _adSelectCheckCriteria: bannerid ' . $aAd['ad_id'], 7);
        }
    }
    return;
}
开发者ID:hawodi,项目名称:revive-adserver,代码行数:16,代码来源:al.php

示例2: test_CheckCriteria

 function test_CheckCriteria()
 {
     $context = array();
     $source = array();
     $richMedia = true;
     $test_ad = array('ad_id' => 5, 'name' => 'my ad', 'expire_time' => '2010-02-02 07:59:59');
     // positive case
     $GLOBALS['_MAX']['NOW'] = strtotime('2010-02-02 00:00:00');
     $this->assertTrue(_adSelectCheckCriteria($test_ad, $criteria, $source, $richMedia));
     // campaign expired
     $GLOBALS['_MAX']['NOW'] = strtotime('2010-02-02 08:00:00');
     $this->assertFalse(_adSelectCheckCriteria($test_ad, $criteria, $source, $richMedia));
     // invalid or unset expire_times should always pass
     $test_ad['expire_time'] = '0000-00-00 00:00:00';
     $this->assertTrue(_adSelectCheckCriteria($test_ad, $criteria, $source, $richMedia));
     $test_ad['expire_time'] = null;
     $this->assertTrue(_adSelectCheckCriteria($test_ad, $criteria, $source, $richMedia));
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:18,代码来源:adSelect.del.test.php

示例3: _adSelectDiscardNonMatchingAds

function _adSelectDiscardNonMatchingAds($aAds, $aContext, $source, $richMedia)
{
    foreach ($aAds as $adId => $aAd) {
        if (!_adSelectCheckCriteria($aAd, $aContext, $source, $richMedia)) {
            unset($aAds[$adId]);
        } else {
        }
    }
    return $aAds;
}
开发者ID:villos,项目名称:tree_admin,代码行数:10,代码来源:alocal.php

示例4: _adSelectDiscardNonMatchingAds

/**
 * This function removes any ads which cannot be shown for the current impression
 *
 * @param array $aAds - The array of ads to be evaluated
 * @param  $aContext
 * @param unknown_type $source
 * @param unknown_type $richMedia
 * @return unknown
 */
function _adSelectDiscardNonMatchingAds($aAds, $aContext, $source, $richMedia)
{
    foreach ($aAds as $adId => $aAd) {
        ###START_STRIP_DELIVERY
        OA::debug('_adSelectDiscardNonMatchingAds: checking bannerid ' . $aAd['ad_id'] . ' ' . $aAd['name']);
        ###END_STRIP_DELIVERY
        if (!_adSelectCheckCriteria($aAd, $aContext, $source, $richMedia)) {
            ###START_STRIP_DELIVERY
            OA::debug('failed _adSelectCheckCriteria: bannerid ' . $aAd['ad_id'] . ' ' . $aAd['name']);
            ###END_STRIP_DELIVERY
            unset($aAds[$adId]);
        } else {
            ###START_STRIP_DELIVERY
            OA::debug('passed _adSelectCheckCriteria: bannerid ' . $aAd['ad_id'] . ' ' . $aAd['name']);
            ###END_STRIP_DELIVERY
        }
    }
    return $aAds;
}
开发者ID:villos,项目名称:tree_admin,代码行数:28,代码来源:adSelect.php


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