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


PHP Admin_DA::getPublisher方法代码示例

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


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

示例1: MAX_displayNavigationChannel

function MAX_displayNavigationChannel($pageName, $aOtherChannels, $aEntities)
{
    global $phpAds_TextDirection;
    $agencyId = isset($aEntities['agencyid']) ? $aEntities['agencyid'] : null;
    $websiteId = isset($aEntities['affiliateid']) ? $aEntities['affiliateid'] : null;
    $channelId = $aEntities['channelid'];
    $channelName = $aOtherChannels[$channelId]['name'];
    $entityString = _getEntityString($aEntities);
    $aOtherEntities = $aEntities;
    unset($aOtherEntities['channelid']);
    $otherEntityString = _getEntityString($aOtherEntities);
    if (!empty($websiteId)) {
        $channelType = 'publisher';
    } else {
        $channelType = 'agency';
    }
    // Determine which set of tabs to show...
    if ($channelType == 'publisher') {
        // Determine which tab is highlighted
        switch ($pageName) {
            case 'channel-edit.php':
                $tabValue = !empty($channelId) ? 'channel-edit-affiliate' : 'channel-edit-affiliate_new';
                break;
            case 'channel-acl.php':
                $tabValue = 'channel-affiliate-acl';
                break;
        }
    } else {
        // Determine which tab is highlighted
        switch ($pageName) {
            case 'channel-edit.php':
                $tabValue = !empty($channelId) ? 'channel-edit' : 'channel-edit_new';
                break;
            case 'channel-acl.php':
                $tabValue = 'channel-acl';
                break;
        }
    }
    // Sort the channels by name...
    require_once MAX_PATH . '/lib/max/other/stats.php';
    $publisherEditUrl = "affiliate-edit.php?affiliateid={$websiteId}";
    if (!empty($channelId)) {
        addChannelPageTools($agencyId, $websiteId, $channelId, $channelType);
        // Determine which tab is highlighted
        $publisher = Admin_DA::getPublisher($websiteId);
        $publisherName = $publisher['name'];
        if (!empty($channelId)) {
            $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
            $oHeaderModel = $builder->buildEntityHeader(array(array("name" => $publisherName, url => $publisherEditUrl), array("name" => $channelName)), "channel", "edit");
            phpAds_PageHeader($tabValue, $oHeaderModel);
        } else {
            $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
            $oHeaderModel = $builder->buildEntityHeader(array(array("name" => $publisherName, url => $publisherEditUrl), array("name" => $channelName)), "channel", "edit-new");
            phpAds_PageHeader($tabValue, $oHeaderModel);
        }
    } else {
        if (!empty($channelId)) {
            $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
            $oHeaderModel = $builder->buildEntityHeader(array(array("name" => $channelName)), "global-channel", "edit");
            phpAds_PageHeader($tabValue, $oHeaderModel);
        } else {
            $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
            $oHeaderModel = $builder->buildEntityHeader(array(array("name" => "")), "global-channel", "edit-new");
            phpAds_PageHeader($tabValue, $oHeaderModel);
        }
    }
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:67,代码来源:html.php

示例2: getChannels

 function getChannels()
 {
     global $list_filters;
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
             // get channels owned by this publisher's agency
             $aPublisher = Admin_DA::getPublisher($list_filters['publisher']);
             $agencyId = $aPublisher['agency_id'];
             if ($agencyId != 0) {
                 // check that this publisher actually has an agency
                 $aParams2 = array('agency_id' => $agencyId, 'publisher_id' => 0);
                 $aAgencyChannels = Admin_DA::getChannels($aParams2);
             }
         }
         $aChannels = Admin_DA::getChannels($aParams);
         // add any agency-owned channels
         if (isset($aAgencyChannels)) {
             foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
                 $aChannels[$channelId] = $aAgencyChannel;
             }
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams = array('agency_id' => OA_Permission::getEntityId());
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('agency_id' => OA_Permission::getEntityId(), 'publisher_id' => $list_filters['publisher']);
         }
         $aChannels = Admin_DA::getChannels($aParams);
         // add agency-owned channels
         $aParams = array('agency_id' => OA_Permission::getEntityId(), 'publisher_id' => 0);
         $aAgencyChannels = Admin_DA::getChannels($aParams);
         foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
             $aChannels[$channelId] = $aAgencyChannel;
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aParams = array('publisher_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         $aChannels = Admin_DA::getChannels($aParams);
         // get channels owned by this publisher's agency
         $aPublisher = Admin_DA::getPublisher(OA_Permission::getEntityId());
         $agencyId = $aPublisher['agency_id'];
         if ($agencyId != 0) {
             // check that this publisher actually has an agency
             $aParams2 = array('agency_id' => $agencyId, 'publisher_id' => 0);
             $aAgencyChannels = Admin_DA::getChannels($aParams2);
         }
         // add agency-owned channels
         if (isset($aAgencyChannels)) {
             foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
                 $aChannels[$channelId] = $aAgencyChannel;
             }
         }
     } else {
         $aPublishers = array();
         $aChannels = array();
     }
     // add admin-owned channels
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         // add admin-owned channels
         $aParams = array('agency_id' => 0, 'publisher_id' => 0);
         $aAdminChannels = Admin_DA::getChannels($aParams);
         foreach ($aAdminChannels as $channelId => $aAdminChannel) {
             $aChannels[$channelId] = $aAdminChannel;
         }
     }
     $aChannelArray = array();
     foreach ($aChannels as $channelId => $aChannel) {
         $aChannelArray[$channelId] = phpAds_buildName($channelId, $aChannel['name']);
     }
     return $aChannelArray;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:74,代码来源:ChannelIdField.php


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