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


PHP Admin_DA::getAdvertisers方法代码示例

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


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

示例1: MAX_checkAdvertiser

function MAX_checkAdvertiser($advertiserId)
{
    $allowed = false;
    if (MAX_checkGenericId($advertiserId)) {
        if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
            $allowed = count(Admin_DA::getAdvertisers(array('advertiser_id' => $advertiserId)));
        } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
            $allowed = count(Admin_DA::getAdvertisers(array('agency_id' => OA_Permission::getAgencyId(), 'advertiser_id' => $advertiserId)));
        } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
            $allowed = $advertiserId == OA_Permission::getEntityId() && count(Admin_DA::getAdvertisers(array('advertiser_id' => $advertiserId)));
        }
    }
    return $allowed;
}
开发者ID:villos,项目名称:tree_admin,代码行数:14,代码来源:common.php

示例2: basename

// Initialize parameters
$pageName = basename($_SERVER['SCRIPT_NAME']);
// Load template
$oTpl = new OA_Admin_Template('userlog-index.html');
// Get advertisers & publishers for filters
$showAdvertisers = OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADMIN);
$showPublishers = OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADMIN);
$agencyId = OA_Permission::getAgencyId();
// Get advertisers if we show them
$aAdvertiser = $aPublisher = array();
if ($showAdvertisers) {
    if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
        $tempAdvertiserId = OA_Permission::getEntityId();
        $aAdvertiserList = Admin_DA::getAdvertisers(array('advertiser_id' => $tempAdvertiserId));
    } else {
        $aAdvertiserList = Admin_DA::getAdvertisers(array('agency_id' => $agencyId));
    }
    $aAdvertiser[0] = $GLOBALS['strSelectAdvertiser'];
    foreach ($aAdvertiserList as $key => $aValue) {
        $aAdvertiser[$aValue['advertiser_id']] = $aValue['name'];
    }
    $aCampaign = array();
    if (!empty($advertiserId)) {
        $campaign = Admin_DA::getCampaigns(array('client_id' => $advertiserId));
        $aCampaign[0] = $GLOBALS['strSelectPlacement'];
        foreach ($campaign as $key => $aValue) {
            $aCampaign[$aValue['campaign_id']] = $aValue['campaignname'];
        }
    }
}
// Get publishers if we show them
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:31,代码来源:userlog-index.php

示例3: basename

            $page = basename($_SERVER['SCRIPT_NAME']);
            OX_Admin_Redirect::redirect("{$page}?clientid={$clientid}");
        }
    }
}
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
// Initialise some parameters
$pageName = basename($_SERVER['SCRIPT_NAME']);
$tabindex = 1;
$agencyId = OA_Permission::getAgencyId();
$aEntities = array('clientid' => $clientid, 'campaignid' => $campaignid);
$oTrans = new OX_Translation();
// Display navigation
$aOtherAdvertisers = Admin_DA::getAdvertisers(array('agency_id' => $agencyId));
$aOtherCampaigns = Admin_DA::getPlacements(array('advertiser_id' => $clientid));
$oHeaderModel = buildHeaderModel($aEntities);
phpAds_PageHeader(null, $oHeaderModel);
/*-------------------------------------------------------*/
/* Get preferences                                       */
/*-------------------------------------------------------*/
if (!isset($hideinactive)) {
    if (isset($session['prefs']['campaign-banners.php'][$campaignid]['hideinactive'])) {
        $hideinactive = $session['prefs']['campaign-banners.php'][$campaignid]['hideinactive'];
    } else {
        $pref =& $GLOBALS['_MAX']['PREF'];
        $hideinactive = $pref['ui_hide_inactive'] == true;
    }
}
if (!isset($listorder)) {
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:campaign-banners.php

示例4: displayPage

function displayPage($campaign, $campaignForm, $statusForm, $campaignErrors = null)
{
    global $conf;
    //header and breadcrumbs
    if ($campaign['campaignid'] != "") {
        //edit campaign
        // Initialise some parameters
        $tabindex = 1;
        $agencyId = OA_Permission::getAgencyId();
        $aEntities = array('clientid' => $campaign['clientid'], 'campaignid' => $campaign['campaignid']);
        // Display navigation
        $aOtherAdvertisers = Admin_DA::getAdvertisers(array('agency_id' => $agencyId));
        $aOtherCampaigns = Admin_DA::getPlacements(array('advertiser_id' => $campaign['clientid']));
        MAX_displayNavigationCampaign($campaign['campaignid'], $aOtherAdvertisers, $aOtherCampaigns, $aEntities);
    } else {
        //new campaign
        $advertiser = phpAds_getClientDetails($campaign['clientid']);
        $advertiserName = $advertiser['clientname'];
        $advertiserEditUrl = "advertiser-edit.php?clientid=" . $campaign['clientid'];
        // New campaign
        $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
        $oHeaderModel = $builder->buildEntityHeader(array(array("name" => $advertiserName, "url" => $advertiserEditUrl), array("name" => "")), "campaign", "edit-new");
        phpAds_PageHeader("campaign-edit_new", $oHeaderModel);
    }
    //get template and display form
    $oTpl = new OA_Admin_Template('campaign-edit.html');
    $oTpl->assign('clientid', $campaign['clientid']);
    $oTpl->assign('campaignid', $campaign['campaignid']);
    $oTpl->assign('calendarBeginOfWeek', $GLOBALS['pref']['begin_of_week'] ? 1 : 0);
    $oTpl->assign('language', $GLOBALS['_MAX']['PREF']['language']);
    $oTpl->assign('conversionsEnabled', $conf['logging']['trackerImpressions']);
    $oTpl->assign('adDirectEnabled', defined('OA_AD_DIRECT_ENABLED') && OA_AD_DIRECT_ENABLED === true);
    $oTpl->assign('impressionsDelivered', isset($campaign['impressions_delivered']) ? $campaign['impressions_delivered'] : 0);
    $oTpl->assign('clicksDelivered', isset($campaign['clicks_delivered']) ? $campaign['clicks_delivered'] : 0);
    $oTpl->assign('conversionsDelivered', isset($campaign['conversions_delivered']) ? $campaign['conversions_delivered'] : 0);
    $oTpl->assign('strCampaignWarningNoTargetMessage', str_replace("\n", '\\n', addslashes($GLOBALS['strCampaignWarningNoTarget'])));
    $oTpl->assign('strCampaignWarningRemnantNoWeight', str_replace("\n", '\\n', addslashes($GLOBALS['strCampaignWarningRemnantNoWeight'])));
    $oTpl->assign('strCampaignWarningEcpmNoRevenue', str_replace("\n", '\\n', addslashes($GLOBALS['strCampaignWarningEcpmNoRevenue'])));
    $oTpl->assign('strCampaignWarningExclusiveNoWeight', str_replace("\n", '\\n', addslashes($GLOBALS['strCampaignWarningExclusiveNoWeight'])));
    $oTpl->assign('campaignErrors', $campaignErrors);
    $oTpl->assign('CAMPAIGN_TYPE_REMNANT', OX_CAMPAIGN_TYPE_REMNANT);
    $oTpl->assign('CAMPAIGN_TYPE_CONTRACT_NORMAL', OX_CAMPAIGN_TYPE_CONTRACT_NORMAL);
    $oTpl->assign('CAMPAIGN_TYPE_CONTRACT_EXCLUSIVE', OX_CAMPAIGN_TYPE_CONTRACT_EXCLUSIVE);
    $oTpl->assign('CAMPAIGN_TYPE_ECPM', OX_CAMPAIGN_TYPE_ECPM);
    $oTpl->assign('CAMPAIGN_TYPE_CONTRACT_ECPM', OX_CAMPAIGN_TYPE_CONTRACT_ECPM);
    $oTpl->assign('PRIORITY_ECPM_FROM', DataObjects_Campaigns::PRIORITY_ECPM_FROM);
    $oTpl->assign('PRIORITY_ECPM_TO', DataObjects_Campaigns::PRIORITY_ECPM_TO);
    $oTpl->assign('MODEL_CPM', MAX_FINANCE_CPM);
    $oTpl->assign('MODEL_CPC', MAX_FINANCE_CPC);
    $oTpl->assign('MODEL_CPA', MAX_FINANCE_CPA);
    if ($conf['logging']['trackerImpressions']) {
        $oTpl->assign('MODEL_MT', MAX_FINANCE_MT);
    }
    $oTpl->assign('campaignFormId', $campaignForm->getId());
    $oTpl->assign('campaignForm', $campaignForm->serialize());
    if (!empty($campaign['campaignid']) && defined('OA_AD_DIRECT_ENABLED') && OA_AD_DIRECT_ENABLED === true) {
        $oTpl->assign('statusForm', $statusForm->serialize());
    }
    $oTpl->display();
    _echoDeliveryCappingJs();
    //footer
    phpAds_PageFooter();
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:63,代码来源:campaign-edit.php

示例5: MAX_getLinkedAdParams

$aParams = MAX_getLinkedAdParams($zoneId);
if ($view == 'placement') {
    $aDirectLinkedAds = Admin_DA::getAdZones(array('zone_id' => $zoneId), true, 'ad_id');
    $aOtherAdvertisers = Admin_DA::getAdvertisers($aParams + array('agency_id' => $agencyId), false);
    $aOtherPlacements = !empty($advertiserId) ? Admin_DA::getPlacements($aParams + array('advertiser_id' => $advertiserId), false) : null;
    $aZonesPlacements = Admin_DA::getPlacementZones(array('zone_id' => $zoneId), true, 'placement_id');
    MAX_displayZoneEntitySelection('placement', $aOtherAdvertisers, $aOtherPlacements, null, $advertiserId, $placementId, $adId, $publisherId, $zoneId, $GLOBALS['strSelectCampaignToLink'], $pageName, $tabIndex);
    if (!empty($aZonesPlacements)) {
        $aParams = array('placement_id' => implode(',', array_keys($aZonesPlacements)));
        $aParams += MAX_getLinkedAdParams($zoneId);
    } else {
        $aParams = null;
    }
    MAX_displayLinkedPlacementsAds($aParams, $publisherId, $zoneId, $hideInactive, $showMatchingAds, $pageName, $tabIndex, $aDirectLinkedAds);
} elseif ($view == 'ad') {
    $aOtherAdvertisers = Admin_DA::getAdvertisers($aParams + array('agency_id' => $agencyId), false);
    $aOtherPlacements = !empty($advertiserId) ? Admin_DA::getPlacements($aParams + array('advertiser_id' => $advertiserId), false) : null;
    $aOtherAds = !empty($placementId) ? Admin_DA::getAds($aParams + array('placement_id' => $placementId), false) : null;
    $aAdsZones = Admin_DA::getAdZones(array('zone_id' => $zoneId), true, 'ad_id');
    MAX_displayZoneEntitySelection('ad', $aOtherAdvertisers, $aOtherPlacements, $aOtherAds, $advertiserId, $placementId, $adId, $publisherId, $zoneId, $GLOBALS['strSelectBannerToLink'], $pageName, $tabIndex);
    $aParams = !empty($aAdsZones) ? array('ad_id' => implode(',', array_keys($aAdsZones))) : null;
    MAX_displayLinkedAdsPlacements($aParams, $publisherId, $zoneId, $hideInactive, $showParentPlacements, $pageName, $tabIndex);
}
?>

    <script language='Javascript'>
    <!--
        function toggleall()
        {
            allchecked = false;
开发者ID:villos,项目名称:tree_admin,代码行数:30,代码来源:zone-include.php

示例6: _getAdvertisers

 function _getAdvertisers()
 {
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array();
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aAdvertisers = Admin_DA::getAdvertisers($aParams);
         } else {
             $aParams = array();
             $aAdvertisers = Admin_DA::getAdvertisers($aParams);
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array('agency_id' => OA_Permission::getEntityId());
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aAdvertisers = Admin_DA::getAdvertisers($aParams);
         } else {
             $aParams = array('agency_id' => OA_Permission::getEntityId());
             $aAdvertisers = Admin_DA::getAdvertisers($aParams);
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aAdvertisers = array();
         $aParams = array('publisher_id' => OA_Permission::getEntityId(), 'placement_anonymous' => 'f');
         $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'placement_id');
         $aAdZones = Admin_DA::getAdZones($aParams, false, 'ad_id');
         if (!empty($aPlacementZones)) {
             if ($this->_filter == FILTER_TRACKER_PRESENT) {
                 $aParams = array('placement_id' => implode(',', array_keys($aPlacementZones)));
                 $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
                 $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
                 $aAdvertisers = Admin_DA::getAdvertisers($aParams);
             } else {
                 $aParams = array('placement_id' => implode(',', array_keys($aPlacementZones)));
                 $aAdvertisers = Admin_DA::getAdvertisers($aParams);
             }
         }
         if (!empty($aAdZones)) {
             if ($this->_filter == FILTER_TRACKER_PRESENT) {
                 $aParams = array('ad_id' => implode(',', array_keys($aAdZones)));
                 $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
                 $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
                 $aAdvertisers += Admin_DA::getAdvertisers($aParams);
             } else {
                 $aParams = array('ad_id' => implode(',', array_keys($aAdZones)));
                 $aAdvertisers += Admin_DA::getAdvertisers($aParams);
             }
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $aAdvertisers = array();
         $aParams = array('advertiser_id' => OA_Permission::getEntityId());
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aAdvertisers += Admin_DA::getAdvertisers($aParams);
         } else {
             $aAdvertisers = Admin_DA::getAdvertisers($aParams);
         }
     }
     // order the array by advertiser name
     foreach ($aAdvertisers as $key => $row) {
         $name[$key] = strtolower($row['name']);
     }
     array_multisort($name, SORT_ASC, $aAdvertisers);
     // rewrite the array to preserve key
     foreach ($aAdvertisers as $row) {
         $aAdvertisersTmp[$row['advertiser_id']] = $row;
     }
     $aAdvertisers = $aAdvertisersTmp;
     return $aAdvertisers;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:72,代码来源:OrganisationSelectionField.php

示例7: _showContext

 /**
  * A private method that can be inherited and used by children classes to
  * output the context in the left navigation bar.
  *
  * {@uses phpAds_PageContext()}
  */
 function _showContext($type, $current_id = 0)
 {
     if ($this->useDailyClass && $type == 'days') {
         // Use the helper class contect method instead
         $aArray = array('period_start' => MAX_getStoredValue('period_start', date('Y-m-d')), 'period_end' => MAX_getStoredValue('period_end', date('Y-m-d')));
         $aDates = array_reverse($this->oHistory->getDatesArray($aArray, 'day', $this->oStartDate));
         $this->oDaily->showContext($aDates, $current_id, $this);
     } else {
         $aParams = array();
         switch ($type) {
             case 'advertisers':
                 if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                     if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                         $aParams['agency_id'] = OA_Permission::getEntityId();
                     }
                     $params = $this->aPageParams;
                     $advertisers = Admin_DA::getAdvertisers($aParams, false);
                     foreach ($advertisers as $advertiser) {
                         $params['clientid'] = $advertiser['advertiser_id'];
                         phpAds_PageContext(MAX_buildName($advertiser['advertiser_id'], $advertiser['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $advertiser['advertiser_id']);
                     }
                 }
                 break;
             case 'campaigns':
                 $aParams['advertiser_id'] = $this->aPageParams['clientid'];
                 $params = $this->aPageParams;
                 $campaigns = Admin_DA::getPlacements($aParams, false);
                 foreach ($campaigns as $campaign) {
                     $params['campaignid'] = $campaign['placement_id'];
                     // mask campaign name if anonymous campaign
                     $campaign['name'] = MAX_getPlacementName($campaign);
                     phpAds_PageContext(MAX_buildName($campaign['placement_id'], $campaign['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $campaign['placement_id']);
                 }
                 break;
             case 'banners':
                 $aParams['placement_id'] = $this->aPageParams['campaignid'];
                 $params = $this->aPageParams;
                 $banners = Admin_DA::getAds($aParams, false);
                 foreach ($banners as $banner) {
                     $params['bannerid'] = $banner['ad_id'];
                     // mask banner name if anonymous campaign
                     $campaign = Admin_DA::getPlacement($banner['placement_id']);
                     $campaignAnonymous = $campaign['anonymous'] == 't' ? true : false;
                     $banner['name'] = MAX_getAdName($banner['name'], null, null, $campaignAnonymous, $banner['ad_id']);
                     phpAds_PageContext(MAX_buildName($banner['ad_id'], $banner['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $banner['ad_id']);
                 }
                 break;
             case 'publishers':
                 if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                     if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                         $aParams['agency_id'] = OA_Permission::getEntityId();
                     }
                     $params = $this->aPageParams;
                     $campaigns = Admin_DA::getPublishers($aParams, false);
                     foreach ($campaigns as $publisher) {
                         $params['affiliateid'] = $publisher['publisher_id'];
                         phpAds_PageContext(MAX_buildName($publisher['publisher_id'], $publisher['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $publisher['publisher_id']);
                     }
                 }
                 break;
             case 'publisher-campaigns':
                 if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                     $aParams = array('publisher_id' => $publisherId, 'placement_id' => $placementId, 'include' => array('placement_id'), 'exclude' => array('zone_id'));
                     $aPlacements = array();
                     foreach (Admin_DA::fromCache('getEntitiesStats', $aParams + $this->aDates) as $v) {
                         $aPlacements[$v['placement_id']] = true;
                     }
                     $params = $this->aPageParams;
                     $campaigns = Admin_DA::getPlacements(array(), false);
                     foreach ($campaigns as $campaign) {
                         if (isset($aPlacements[$campaign['placement_id']])) {
                             $params['campaignid'] = $campaign['placement_id'];
                             phpAds_PageContext(MAX_buildName($campaign['placement_id'], $campaign['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $campaign['placement_id']);
                         }
                     }
                 }
                 break;
             case 'zones':
                 $aParams['publisher_id'] = $this->aPageParams['affiliateid'];
                 $params = $this->aPageParams;
                 $zones = Admin_DA::getZones($aParams, false);
                 foreach ($zones as $zone) {
                     $params['zoneid'] = $zone['zone_id'];
                     phpAds_PageContext(MAX_buildName($zone['zone_id'], $zone['name']), $this->_addPageParamsToURI($this->pageName, $params, true), $current_id == $zone['zone_id']);
                 }
                 break;
         }
     }
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:95,代码来源:Common.php


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