本文整理汇总了PHP中OA_Dal_Delivery_getZoneLinkedAds函数的典型用法代码示例。如果您正苦于以下问题:PHP OA_Dal_Delivery_getZoneLinkedAds函数的具体用法?PHP OA_Dal_Delivery_getZoneLinkedAds怎么用?PHP OA_Dal_Delivery_getZoneLinkedAds使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OA_Dal_Delivery_getZoneLinkedAds函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getZoneLinkedAds
function _getZoneLinkedAds($params)
{
$paramZoneId = $params->getParam(0);
$zoneId = $paramZoneId->scalarval();
$response = new XML_RPC_Value(serialize(OA_Dal_Delivery_getZoneLinkedAds($zoneId)), 'base64');
return new XML_RPC_Response($response);
}
示例2: phpAds_showZoneBanners
function phpAds_showZoneBanners($zoneId)
{
$pref = $GLOBALS['_MAX']['PREF'];
global $phpAds_TextDirection;
global $strUntitled, $strName, $strID, $strWeight, $strShowBanner;
global $strCampaignWeight, $strBannerWeight, $strProbability, $phpAds_TextAlignRight, $phpAds_TextAlignLeft;
global $strRawQueryString, $strZoneProbListChain, $strZoneProbNullPri, $strZoneProbListChainLoop;
global $strExclusiveAds, $strHighAds, $strLowAds, $strECPMAds, $strLimitations, $strCapping, $strNoLimitations, $strPriority;
MAX_Dal_Delivery_Include();
$aZoneLinkedAds = OA_Dal_Delivery_getZoneLinkedAds($zoneId);
if (empty($aZoneLinkedAds['xAds']) && empty($aZoneLinkedAds['ads']) && empty($aZoneLinkedAds['lAds']) && empty($aZoneLinkedAds['eAds'])) {
echo "<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>";
echo "<tr height='25'><th align='{$phpAds_TextAlignLeft}' colspan='5'><strong>{$strZoneProbNullPri}</strong></th></tr>";
echo "</table>";
} else {
$usedHighProbability = 0;
echo "<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>";
// Exclusive Advertisements
if (!empty($aZoneLinkedAds['xAds'])) {
echo "<tr height='25'><th align='{$phpAds_TextAlignLeft}' colspan='6'><strong>{$strExclusiveAds}:</strong></th></tr>";
echo "<tr height='25'>";
echo "<td height='25' width='40%'> <b>" . $strName . "</b></td>";
echo "<td height='25'><b>" . $strID . "</b> </td>";
echo "<td height='25'> </td>";
echo "<td height='25'> </td>";
echo "<td height='25'><b>{$strLimitations}</b></td>";
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'> </td>";
echo "</tr>";
echo "<tr height='1'><td colspan='6' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
$i = -1;
foreach ($aZoneLinkedAds['xAds'] as $adId => $aLinkedAd) {
$i++;
$name = phpAds_getBannerName($adId, 60, false);
echo "<tr height='1'><td colspan='6' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-l.gif' height='1' width='100%'></td></tr>";
echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
echo "<td height='25'>";
echo " ";
// Banner icon
if ($aLinkedAd['type'] == 'html') {
echo "<img src='" . OX::assetPath() . "/images/icon-banner-html.gif' align='absmiddle'> ";
} elseif ($aLinkedAd['type'] == 'txt') {
echo "<img src='" . OX::assetPath() . "/images/icon-banner-text.gif' align='absmiddle'> ";
} elseif ($aLinkedAd['type'] == 'url') {
echo "<img src='" . OX::assetPath() . "/images/icon-banner-url.gif' align='absmiddle'> ";
} else {
echo "<img src='" . OX::assetPath() . "/images/icon-banner-stored.gif' align='absmiddle'> ";
}
// Name
if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
echo "<a href='banner-edit.php?clientid=" . phpAds_getCampaignParentClientID($aLinkedAd['placement_id']) . "&campaignid=" . $aLinkedAd['placement_id'] . "&bannerid=" . $adId . "'>" . htmlspecialchars($name) . "</a>";
} else {
echo htmlspecialchars($name);
}
echo "</td>";
echo "<td height='25'>" . $adId . "</td>";
echo "<td height='25'> </td>";
echo "<td height='25'> </td>";
$capping = _isAdCapped($aLinkedAd);
$limitations = _isAdLimited($aLinkedAd);
echo "<td height='25'>";
if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
$linkStart = "<a href='banner-acl.php?clientid=" . phpAds_getCampaignParentClientID($aLinkedAd['placement_id']) . "&campaignid={$aLinkedAd['placement_id']}&bannerid={$aLinkedAd['ad_id']}'>";
$linkEnd = "</a>";
} else {
$linkStart = '';
$linkEnd = '';
}
if (!$capping && !$limitations) {
echo "<img src='" . OX::assetPath() . "/images/icon-no-acl.gif' alt='Limitations' align='middle' border='0'> {$linkStart}<strong>{$strNoLimitations}</strong>{$linkEnd}";
} elseif ($limitations && $capping) {
echo "<img src='" . OX::assetPath() . "/images/icon-acl.gif' alt='Limitations' align='middle' border='0'> {$linkStart}{$strLimitations} & {$strCapping}{$linkEnd}";
} elseif ($limitations) {
echo "<img src='" . OX::assetPath() . "/images/icon-acl.gif' alt='Limitations' align='middle' border='0'> {$linkStart}{$strLimitations}{$linkEnd}";
} elseif ($capping) {
echo "<img src='" . OX::assetPath() . "/images/icon-acl.gif' alt='Capping' align='middle' border='0'> {$linkStart}{$strCapping}{$linkEnd}";
}
echo "</td>";
// Show banner
if ($aLinkedAd['type'] == 'txt') {
$width = 300;
$height = 200;
} else {
$width = $aLinkedAd['width'] + 64;
$height = $aLinkedAd['bannertext'] ? $aLinkedAd['height'] + 90 : $aLinkedAd['height'] + 64;
}
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>";
echo "<img src='" . OX::assetPath() . "/images/icon-zoom.gif' align='absmiddle' border='0'> ";
echo "<a href='banner-htmlpreview.php?bannerid=" . $adId . "' target='_new' ";
echo "onClick=\"return openWindow('banner-htmlpreview.php?bannerid=" . $adId . "', '', 'status=no,scrollbars=no,resizable=no,width=" . $width . ",height=" . $height . "');\">";
echo $strShowBanner . "</a> ";
echo "</td>";
echo "</tr>";
}
echo "<tr height='1'><td colspan='6' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
echo "<tr><td colspan='6'><br /><br /></td></tr>";
}
// High-Priority Advertisements
if (!empty($aZoneLinkedAds['ads'])) {
echo "<tr height='25'><th align='{$phpAds_TextAlignLeft}' colspan='6'><strong>{$strHighAds}:</strong></th></tr>";
echo "<tr height='25'>";
//.........这里部分代码省略.........
示例3: MAX_cacheGetZoneLinkedAds
function MAX_cacheGetZoneLinkedAds($zoneId, $cached = true)
{
$sName = OA_Delivery_Cache_getName(__FUNCTION__, $zoneId);
if (!$cached || ($aRows = OA_Delivery_Cache_fetch($sName)) === false) {
MAX_Dal_Delivery_Include();
$aRows = OA_Dal_Delivery_getZoneLinkedAds($zoneId);
$aRows = OA_Delivery_Cache_store_return($sName, $aRows);
}
return $aRows;
}
示例4: OA_Admin_Template
/*-------------------------------------------------------*/
/* Main code */
/*-------------------------------------------------------*/
require_once MAX_PATH . '/lib/OA/Admin/Template.php';
$oTpl = new OA_Admin_Template('zone-index.html');
// Get websites and build the tree
$doZones = OA_Dal::factoryDO('zones');
$doZones->affiliateid = $affiliateid;
$doZones->addListorderBy($listorder, $orderdirection);
$doZones->find();
$aZones = array();
while ($doZones->fetch() && ($row_zones = $doZones->toArray())) {
$aZones[$row_zones['zoneid']] = $row_zones;
$aZones[$row_zones['zoneid']]['lowPriorityWarning'] = false;
MAX_Dal_Delivery_Include();
$aZoneAds = OA_Dal_Delivery_getZoneLinkedAds($row_zones['zoneid']);
if ($aZoneAds['count_active'] > 0 && $row_zones['delivery'] == phpAds_ZoneBanner && count($aZoneAds['lAds']) == 0) {
$aZones[$row_zones['zoneid']]['lowPriorityWarning'] = true;
}
$aZones[$row_zones['zoneid']]['active'] = $aZoneAds['count_active'] > 0;
}
$oTpl->assign('affiliateId', $affiliateid);
$oTpl->assign('aAdvertisers', $clients);
$oTpl->assign('aZones', $aZones);
$oTpl->assign('listorder', $listorder);
$oTpl->assign('orderdirection', $orderdirection);
$oTpl->assign('canAdd', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::hasPermission(OA_PERM_ZONE_ADD));
$oTpl->assign('canEdit', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::hasPermission(OA_PERM_ZONE_EDIT));
$oTpl->assign('canLink', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::hasPermission(OA_PERM_ZONE_LINK));
$oTpl->assign('canInvocation', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::hasPermission(OA_PERM_ZONE_INVOCATION));
$oTpl->assign('canDelete', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::hasPermission(OA_PERM_ZONE_DELETE));