本文整理汇总了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;
}
示例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();
}
示例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();