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


PHP Admin_DA::addPlacementZone方法代码示例

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


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

示例1: linkCampaign

 /**
  * A method to link a campaign to a zone
  *
  * @param int $zoneId
  * @param int $campaignId
  * @return bool
  */
 function linkCampaign($zoneId, $campaignId)
 {
     if ($this->checkIdExistence('zones', $zoneId)) {
         $doZones = OA_Dal::staticGetDO('zones', $zoneId);
         if (!$this->checkPermissions(null, 'affiliates', $doZones->affiliateid, OA_PERM_ZONE_LINK)) {
             return false;
         }
         if ($this->checkIdExistence('campaigns', $campaignId)) {
             $aLinkedPlacements = Admin_DA::getPlacementZones(array('zone_id' => $zoneId), false, 'placement_id');
             if (!isset($aLinkedPlacements[$campaignId])) {
                 $result = Admin_DA::addPlacementZone(array('zone_id' => $zoneId, 'placement_id' => $campaignId));
                 if (PEAR::isError($result)) {
                     $this->raiseError($result->getMessage());
                     return false;
                 }
                 MAX_addLinkedAdsToZone($zoneId, $campaignId);
                 return true;
             } else {
                 // Already linked
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:32,代码来源:Zone.php

示例2: MAX_duplicatePlacementZones

function MAX_duplicatePlacementZones($fromPlacementId, $toPlacementId)
{
    $pAdZones = Admin_DA::getPlacementZones(array('placement_id' => $fromPlacementId), true, 'zone_id');
    if (!empty($pAdZones)) {
        foreach ($pAdZones as $zoneId => $placementId) {
            Admin_DA::addPlacementZone(array('placement_id' => $toPlacementId, 'zone_id' => $zoneId), false);
        }
    }
}
开发者ID:villos,项目名称:tree_admin,代码行数:9,代码来源:common.php

示例3: testPlacementZones

 function testPlacementZones()
 {
     TestEnv::startTransaction();
     $ret = Admin_DA::addPlacementZone(array('zone_id' => rand(1, 999), 'placement_id' => rand(1, 999)));
     $this->assertTrue(is_int($ret));
     $this->assertTrue($ret > 0);
     $retVar = Admin_DA::getPlacementZones(array('placement_zone_assoc_id' => $ret));
     $this->assertTrue(is_array($retVar[$ret]));
     TestEnv::rollbackTransaction();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:10,代码来源:AdminDA.dal.test.php

示例4: unset

                    Admin_DA::deletePlacementZones($aParameters);
                } else {
                    Admin_DA::deleteAdZones($aParameters);
                }
            } else {
                // Remove this key, because it is already there and does not need to be added again.
                unset($aCurrent[$id]);
            }
        }
    }
    $addResult = true;
    if (!empty($aCurrent)) {
        foreach ($aCurrent as $id => $value) {
            $aVariables = array('zone_id' => $zoneId, $key => $id);
            if ($view == 'placement') {
                $addResult = Admin_DA::addPlacementZone($aVariables);
            } else {
                $addResult = Admin_DA::addAdZone($aVariables);
            }
        }
    }
    if (!$addResult) {
        Header("Location: zone-include.php?affiliateid={$publisherId}&zoneid={$zoneId}");
        exit;
    }
    // Move on to the next page
    Header("Location: zone-probability.php?affiliateid={$publisherId}&zoneid={$zoneId}");
    exit;
}
// Display initial parameters...
$tabIndex = 1;
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:zone-include.php


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