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


PHP Admin_DA::getDeliveryLimitations方法代码示例

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


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

示例1: _duplicateAd

 function _duplicateAd($aAd, $checkUniqueNames = false)
 {
     require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
     // Copy the linked creative
     $newFile = phpAds_ImageDuplicate($aAd['type'], $aAd['filename']);
     if ($newFile !== false) {
         $aAd['filename'] = $newFile;
     }
     // Remove the existing advert id
     $adId = $aAd['ad_id'];
     unset($aAd['ad_id']);
     // Check for unique names
     if ($checkUniqueNames) {
         $aAds = Admin_DA::getAds(array('placement_id' => $aAd['placement_id']));
         Admin_DA::_getUniqueName($aAd, $aAds, $GLOBALS['strCopy']);
     }
     // Add the new ad
     $newAdId = Admin_DA::addAd($aAd);
     // Copy the limitations
     $aLimitations = Admin_DA::getDeliveryLimitations(array('ad_id' => $adId));
     foreach ($aLimitations as $aLimitation) {
         $aLimitation['ad_id'] = $newAdId;
         Admin_DA::addLimitation($aLimitation);
     }
     // Copy the zone ad associations
     $aAdZones = Admin_DA::getAdZones(array('ad_id' => $adId));
     foreach ($aAdZones as $aAdZone) {
         $aAdZone['ad_id'] = $newAdId;
         Admin_DA::duplicateAdZone($aAdZone);
     }
     return $newAdId;
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:32,代码来源:Admin_DA.php

示例2: testGetDeliveryLimitations

 function testGetDeliveryLimitations()
 {
     //  FIXME: needs real data
     TestEnv::startTransaction();
     $ret = Admin_DA::getDeliveryLimitations(array('zone_id' => 1, 'placement_id' => 2));
     $this->assertTrue(is_array($ret));
     TestEnv::rollbackTransaction();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:8,代码来源:AdminDA.dal.test.php

示例3: array

    $entityType = 'advertiser_id';
} else {
    $entityType = 'agency_id';
}
// Display navigation
$aOtherCampaigns = Admin_DA::getPlacements(array($entityType => $entityId));
$aOtherBanners = Admin_DA::getAds(array('placement_id' => $campaignid), false);
// Setup a fake record for the "Apply to all" entry
$aOtherBanners[-1] = array('name' => '--' . $GLOBALS['strAllBannersInCampaign'] . '--', 'ad_id' => -1, 'placement_id' => $campaignid);
MAX_displayNavigationBanner($pageName, $aOtherCampaigns, $aOtherBanners, $aEntities);
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
$aBanner = MAX_cacheGetAd($bannerid, false);
if (!isset($acl)) {
    $acl = Admin_DA::getDeliveryLimitations(array('ad_id' => $bannerid));
    // This array needs to be sorted by executionorder, this should ideally be done in SQL
    // When we move to DataObject this should be addressed
    ksort($acl);
}
$aParams = array('clientid' => $clientid, 'campaignid' => $campaignid, 'bannerid' => $bannerid);
MAX_displayAcls($acl, $aParams);
echo "\n<table border='0' width='100%' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>";
$aParams = array('title' => $GLOBALS['strCampaign'], 'titleLink' => "campaign-edit.php?clientid={$clientid}&campaignid={$campaignid}", 'aText' => $GLOBALS['strCappingCampaign'], 'aCappedObject' => $aBanner, 'type' => 'Campaign');
$tabindex = _echoDeliveryCappingHtml($tabindex, $GLOBALS['strCappingBanner'], $aBanner, 'Ad', $aParams);
echo "\n<tr><td height='1' colspan='6' bgcolor='#888888'>\n<img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>\n\n</table>\n<br /><br /><br />\n<input type='submit' name='submit' value='{$GLOBALS['strSaveChanges']}' tabindex='" . $tabindex++ . "'>\n\n</form>";
/*-------------------------------------------------------*/
/* Form requirements                                     */
/*-------------------------------------------------------*/
_echoDeliveryCappingJs();
phpAds_PageFooter();
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:banner-acl.php


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