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


PHP OA_Permission::enforceAccount方法代码示例

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


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

示例1: checkAccess

 /**
  * A method to check for permissions to display the widget
  *
  */
 function checkAccess()
 {
     if (empty($this->accessList)) {
         $this->accessList = array(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
     }
     OA_Permission::enforceAccount($this->accessList);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:11,代码来源:Widget.php

示例2: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.1.1';
         $this->aPageSections = array('2.1.1', '2.1.2', '2.1.3');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.1';
         $this->aPageSections = array('1.1', '1.2', '1.3');
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('advertiser', $advertiserId);
     // Add context
     $this->aPageContext = array('advertisers', $advertiserId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     // Prepare the data for display by output() method
     $aParams = array('advertiser_id' => $advertiserId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:39,代码来源:AdvertiserHistory.php

示例3: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $placementId = $this->_getId('placement');
     $adId = $this->_getId('ad');
     $zoneId = $this->_getId('zone');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId));
     // Cross-entity security check
     if (!empty($zoneId)) {
         $aZones = $this->getBannerZones($adId, $placementId);
         if (!isset($aZones[$zoneId])) {
             $this->noStatsAvailable = true;
         }
     }
     // Cross-entity security check
     if (!isset($aZones[$zoneId])) {
         $this->noStatsAvailable = true;
     }
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId, 'bannerid' => $adId, 'affiliateid' => $publisherId, 'zoneid' => $zoneId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.1.2.2.2.2';
         $this->aPageSections = array($this->pageId);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.2.2.4.2';
         $this->aPageSections = array($this->pageId);
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('banner', $adId);
     $this->addCrossBreadcrumbs('zone', $zoneId);
     // Add context
     $params = $this->aPageParams;
     foreach ($aZones as $k => $v) {
         $params['affiliateid'] = $aZones[$k]['publisher_id'];
         $params['zoneid'] = $k;
         phpAds_PageContext(MAX_buildName($k, MAX_getZoneName($v['name'], null, $v['anonymous'], $k)), $this->_addPageParamsToURI($this->pageName, $params, true), $zoneId == $k);
     }
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     $this->_addShortcut($GLOBALS['strCampaignProperties'], 'campaign-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId, 'images/icon-campaign.gif');
     $this->_addShortcut($GLOBALS['strBannerProperties'], 'banner-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-banner-stored.gif');
     $this->_addShortcut($GLOBALS['strModifyBannerAcl'], 'banner-acl.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-acl.gif');
     // Prepare the data for display by output() method
     $aParams = array('ad_id' => $adId, 'zone_id' => $zoneId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:62,代码来源:BannerZoneHistory.php

示例4: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get the preferences
     $aPref = $GLOBALS['_MAX']['PREF'];
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $placementId = $this->_getId('placement');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.1.2.2';
         $this->aPageSections = array('2.1.2.1', '2.1.2.2', '2.1.2.3', '2.1.2.4');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.2.2';
         $this->aPageSections = array('1.2.1', '1.2.2', '1.2.3');
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('campaign', $placementId);
     // Add context
     $this->aPageContext = array('campaigns', $placementId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     $this->_addShortcut($GLOBALS['strCampaignProperties'], 'campaign-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId, 'images/icon-campaign.gif');
     $this->hideInactive = MAX_getStoredValue('hideinactive', $aPref['ui_hide_inactive'] == true, null, true);
     $this->showHideInactive = true;
     $this->startLevel = 0;
     // Init nodes
     $this->aNodes = MAX_getStoredArray('nodes', array());
     $expand = MAX_getValue('expand', '');
     $collapse = MAX_getValue('collapse');
     // Adjust which nodes are opened closed...
     MAX_adjustNodes($this->aNodes, $expand, $collapse);
     $aParams = array();
     $aParams['placement_id'] = $placementId;
     $this->aEntitiesData = $this->getBanners($aParams, $this->startLevel, $expand);
     // Summarise the values into a the totals array, & format
     $this->_summariseTotalsAndFormat($this->aEntitiesData);
     $this->showHideLevels = array();
     $this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveBannersHidden']}";
     // Save prefs
     $this->aPagePrefs['startlevel'] = $this->startLevel;
     $this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
     $this->aPagePrefs['hideinactive'] = $this->hideInactive;
     $this->aPagePrefs['startlevel'] = $this->startLevel;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:61,代码来源:CampaignBanners.php

示例5: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get the preferences
     $aPref = $GLOBALS['_MAX']['PREF'];
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
     // HTML Framework
     $this->pageId = '2.4';
     $this->aPageSections = array('2.1', '2.4', '2.2');
     $this->hideInactive = MAX_getStoredValue('hideinactive', $aPref['ui_hide_inactive'] == true, null, true);
     $this->showHideInactive = true;
     $this->startLevel = MAX_getStoredValue('startlevel', 0, null, true);
     // Init nodes
     $this->aNodes = MAX_getStoredArray('nodes', array());
     $expand = MAX_getValue('expand', '');
     $collapse = MAX_getValue('collapse');
     // Adjust which nodes are opened closed...
     MAX_adjustNodes($this->aNodes, $expand, $collapse);
     $aParams = array();
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $aParams['agency_id'] = OA_Permission::getAgencyId();
     }
     // Add module page parameters
     $this->aPageParams['period_preset'] = MAX_getStoredValue('period_preset', 'today');
     $this->aPageParams['statsBreakdown'] = htmlspecialchars(MAX_getStoredValue('statsBreakdown', 'day'));
     $this->_loadParams();
     switch ($this->startLevel) {
         case 1:
             $this->aEntitiesData = $this->getZones($aParams, $this->startLevel, $expand);
             break;
         default:
             $this->startLevel = 0;
             $this->aEntitiesData = $this->getPublishers($aParams, $this->startLevel, $expand);
             break;
     }
     // Summarise the values into a the totals array, & format
     $this->_summariseTotalsAndFormat($this->aEntitiesData);
     $this->showHideLevels = array();
     switch ($this->startLevel) {
         case 1:
             $this->showHideLevels = array(0 => array('text' => $GLOBALS['strShowParentAffiliates'], 'icon' => 'images/icon-affiliate.gif'));
             $this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveZonesHidden']}";
             break;
         case 0:
             $this->showHideLevels = array(1 => array('text' => $GLOBALS['strHideParentAffiliates'], 'icon' => 'images/icon-affiliate-d.gif'));
             $this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveAffiliatesHidden']}";
             break;
     }
     // Save prefs
     $this->aPagePrefs['startlevel'] = $this->startLevel;
     $this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
     $this->aPagePrefs['hideinactive'] = $this->hideInactive;
     $this->aPagePrefs['startlevel'] = $this->startLevel;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:59,代码来源:GlobalAffiliates.php

示例6: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $publisherId = $this->_getId('publisher');
     $placementId = $this->_getId('placement', 0);
     $zoneId = $this->_getId('zone');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
     $this->_checkAccess(array('publisher' => $publisherId, 'zone' => $zoneId));
     // Cross-entity security check
     if (!empty($zoneId)) {
         $aPlacements = $this->getZoneCampaigns($zoneId);
         if (!isset($aPlacements[$placementId])) {
             $this->noStatsAvailable = true;
         }
     }
     // Add standard page parameters
     $this->aPageParams = array('affiliateid' => $publisherId, 'campaignid' => $placementId, 'zoneid' => $zoneId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.4.2.2.1';
         $this->aPageSections = array($this->pageId);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->pageId = '1.2.2.1';
         $this->aPageSections = array($this->pageId);
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('zone', $zoneId);
     $this->addCrossBreadcrumbs('campaign', $placementId);
     // Add context
     $params = $this->aPageParams;
     foreach ($aPlacements as $k => $v) {
         $params['campaignid'] = $k;
         phpAds_PageContext(MAX_buildName($k, MAX_getPlacementName($v)), $this->_addPageParamsToURI($this->pageName, $params, true), $placementId == $k);
     }
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->_addShortcut($GLOBALS['strAffiliateProperties'], 'affiliate-edit.php?affiliateid=' . $publisherId, 'images/icon-affiliate.gif');
     }
     $this->_addShortcut($GLOBALS['strZoneProperties'], 'zone-edit.php?affiliateid=' . $publisherId . '&zoneid=' . $zoneId, 'images/icon-zone.gif');
     // Prepare the data for display by output() method
     $aParams = array('zone_id' => $zoneId, 'placement_id' => $placementId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:54,代码来源:ZoneCampaignHistory.php

示例7: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $publisherId = $this->_getId('publisher');
     $adId = $this->_getId('ad', 0);
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
     $this->_checkAccess(array('publisher' => $publisherId));
     // Fetch banners
     $aAds = $this->getPublisherBanners($publisherId);
     // Cross-entity security check
     if (!isset($aAds[$adId])) {
         $this->noStatsAvailable = true;
     }
     // Add standard page parameters
     $this->aPageParams = array('affiliateid' => $publisherId, 'campaignid' => $aAds[$adId]['placement_id'], 'bannerid' => $adId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.4.3.2';
         $this->aPageSections = array($this->pageId);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->pageId = '1.3.2';
         $this->aPageSections = array($this->pageId);
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('publisher', $publisherId);
     $this->addCrossBreadcrumbs('banner', $adId);
     // Add context
     $params = $this->aPageParams;
     foreach ($aAds as $k => $v) {
         $params['campaignid'] = $v['placement_id'];
         $params['bannerid'] = $k;
         phpAds_PageContext(MAX_buildName($k, MAX_getAdName($v['name'], null, null, $v['anonymous'], $k)), $this->_addPageParamsToURI($this->pageName, $params, true), $adId == $k);
     }
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->_addShortcut($GLOBALS['strAffiliateProperties'], 'affiliate-edit.php?affiliateid=' . $publisherId, 'images/icon-affiliate.gif');
     }
     // Prepare the data for display by output() method
     $aParams = array('publisher_id' => $publisherId, 'ad_id' => $adId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:villos,项目名称:tree_admin,代码行数:52,代码来源:AffiliateBannerHistory.php

示例8: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $placementId = $this->_getId('placement');
     $adId = $this->_getId('ad');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId, 'bannerid' => $adId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.1.2.2.1';
         $this->aPageSections = array('2.1.2.2.1', '2.1.2.2.2', '2.1.2.2.3');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.2.2.1';
         $this->aPageSections[] = '1.2.2.1';
         if (OA_Permission::hasPermission(OA_PERM_BANNER_EDIT)) {
             $this->aPageSections[] = '1.2.2.2';
         }
         $this->aPageSections[] = '1.2.2.4';
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('banner', $adId);
     // Add context
     $this->aPageContext = array('banners', $adId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     $this->_addShortcut($GLOBALS['strCampaignProperties'], 'campaign-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId, 'images/icon-campaign.gif');
     $this->_addShortcut($GLOBALS['strBannerProperties'], 'banner-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-banner-stored.gif');
     $this->_addShortcut($GLOBALS['strModifyBannerAcl'], 'banner-acl.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-acl.gif');
     // Prepare the data for display by output() method
     $aParams = array('ad_id' => $adId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:48,代码来源:BannerHistory.php

示例9: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     $this->pageId = '2.2';
     $this->aPageSections = array('2.1', '2.4', '2.2');
     // Prepare the data for display by output() method
     $aParams = array();
     if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams['agency_id'] = OA_Permission::getAgencyId();
     }
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:24,代码来源:GlobalHistory.php

示例10: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $publisherId = $this->_getId('publisher');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
     $this->_checkAccess(array('publisher' => $publisherId));
     // Add standard page parameters
     $this->aPageParams = array('affiliateid' => $publisherId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.4.1';
         $this->aPageSections = array('2.4.1', '2.4.2', '2.4.3');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->pageId = '1.1';
         $this->aPageSections = array('1.1', '1.2', '1.3');
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('publisher', $publisherId);
     // Add context
     $this->aPageContext = array('publishers', $publisherId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $this->_addShortcut($GLOBALS['strAffiliateProperties'], 'affiliate-edit.php?affiliateid=' . $publisherId, 'images/icon-affiliate.gif');
     }
     // Prepare the data for display by output() method
     $aParams = array('publisher_id' => $publisherId);
     // Limit by advertiser
     $advertiserId = (int) MAX_getValue('clientid', '');
     if (!empty($advertiserId)) {
         $aParams['advertiser_id'] = $advertiserId;
     }
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:44,代码来源:AffiliateHistory.php

示例11: phpAds_registerGlobal

// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/other/html.php';
// Register input variables
phpAds_registerGlobal('action', 'variablemethod');
// Since there may be an unknown number of variables posted (which are accessed by $_POST directly in the code below),
// clean the whole $_POST array
MAX_commonRemoveSpecialChars($_POST);
/*-------------------------------------------------------*/
/* Affiliate interface security                          */
/*-------------------------------------------------------*/
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients', $clientid);
OA_Permission::enforceAccessToObject('trackers', $trackerid);
/*-------------------------------------------------------*/
/* Store preferences									 */
/*-------------------------------------------------------*/
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'] = $clientid;
phpAds_SessionDataStore();
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
if (!isset($variables)) {
    if (isset($session['prefs']['tracker-variables.php']['variables']) && $session['prefs']['tracker-variables.php']['trackerid'] == $trackerid) {
        $variables = $session['prefs']['tracker-variables.php']['variables'];
    }
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:tracker-variables.php

示例12: phpAds_registerGlobal

*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
//require_once MAX_PATH . '/lib/max/deliverycache/cache-'.$conf['delivery']['cache'].'.inc.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';
require_once OX_PATH . '/lib/pear/DB/DataObject.php';
// Register input variables
phpAds_registerGlobal('returnurl', 'agencyid');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
// CVE-2013-5954 - see OA_Permission::checkSessionToken() method for details
OA_Permission::checkSessionToken();
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
if (!empty($agencyid)) {
    $doAgency = OA_Dal::factoryDO('agency');
    $doAgency->agencyid = $agencyid;
    $doAgency->get($agencyid);
    $doAgency->delete();
}
// Run the Maintenance Priority Engine process
OA_Maintenance_Priority::scheduleRun();
// Rebuild cache
// phpAds_cacheDelete();
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:agency-delete.php

示例13: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $publisherId = $this->_getId('publisher');
     $zoneId = $this->_getId('zone');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId));
     // Cross-entity security check
     if (!empty($zoneId)) {
         $aZones = $this->getAdvertiserZones($advertiserId);
         if (!isset($aZones[$zoneId])) {
             $this->noStatsAvailable = true;
         }
     } elseif (!empty($publisherId)) {
         $aPublishers = $this->getAdvertiserPublishers($advertiserId);
         if (!isset($aPublishers[$publisherId])) {
             $this->noStatsAvailable = true;
         }
     }
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId);
     // Add the cross-entity parameters
     if (!empty($zoneId)) {
         $this->aPageParams['affiliateid'] = $aZones[$zoneId]['publisher_id'];
         $this->aPageParams['zoneid'] = $zoneId;
     } elseif (!empty($publisherId)) {
         $this->aPageParams['affiliateid'] = $publisherId;
     }
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         if (empty($publisherId) && empty($zoneId)) {
             $this->pageId = '2.1.1.1';
         } else {
             // Cross-entity
             $this->pageId = empty($zoneId) ? '2.1.3.1.1' : '2.1.3.2.1';
         }
         $this->aPageSections = array($this->pageId);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         if (empty($publisherId) && empty($zoneId)) {
             $this->pageId = '1.1.1';
         } else {
             // Cross-entity
             $this->pageId = empty($zoneId) ? '1.3.1.1' : '1.3.2.1';
         }
         $this->aPageSections = array($this->pageId);
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('advertiser', $advertiserId);
     if (!empty($zoneId)) {
         $this->addCrossBreadcrumbs('zone', $zoneId);
     } elseif (!empty($publisherId)) {
         $this->addCrossBreadcrumbs('publisher', $publisherId);
     }
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     // Prepare the data for display by output() method
     $aParams = array('advertiser_id' => $advertiserId);
     if (!empty($zoneId)) {
         $aParams['zone_id'] = $zoneId;
     } elseif (!empty($publisherId)) {
         $aParams['publisher_id'] = $publisherId;
     }
     $this->prepare($aParams);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:75,代码来源:AdvertiserDaily.php

示例14: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get the preferences
     $aPref = $GLOBALS['_MAX']['PREF'];
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $placementId = $this->_getId('placement');
     $adId = $this->_getId('ad');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId, 'bannerid' => $adId);
     // Load the period preset and stats breakdown parameters
     $this->_loadPeriodPresetParam();
     $this->_loadStatsBreakdownParam();
     // Load $_GET parameters
     $this->_loadParams();
     // HTML Framework
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $this->pageId = '2.1.2.2.2';
         $this->aPageSections = array('2.1.2.2.1', '2.1.2.2.2', '2.1.2.2.3');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.2.2.4';
         $this->aPageSections[] = '1.2.2.1';
         if (OA_Permission::hasPermission(OA_PERM_BANNER_EDIT)) {
             $this->aPageSections[] = '1.2.2.2';
         }
         $this->aPageSections[] = '1.2.2.4';
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('banner', $adId);
     // Add context
     $this->aPageContext = array('banners', $adId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     $this->_addShortcut($GLOBALS['strCampaignProperties'], 'campaign-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId, 'images/icon-campaign.gif');
     $this->_addShortcut($GLOBALS['strBannerProperties'], 'banner-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-banner-stored.gif');
     $this->_addShortcut($GLOBALS['strModifyBannerAcl'], 'banner-acl.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-acl.gif');
     // Fix entity links
     $this->entityLinks['p'] = 'stats.php?entity=banner&breakdown=affiliate-history';
     $this->entityLinks['z'] = 'stats.php?entity=banner&breakdown=zone-history';
     $this->hideInactive = MAX_getStoredValue('hideinactive', $aPref['ui_hide_inactive'] == true, null, true);
     $this->showHideInactive = true;
     $this->startLevel = MAX_getStoredValue('startlevel', 0, null, true);
     // Init nodes
     $this->aNodes = MAX_getStoredArray('nodes', array());
     $expand = MAX_getValue('expand', '');
     $collapse = MAX_getValue('collapse');
     // Adjust which nodes are opened closed...
     MAX_adjustNodes($this->aNodes, $expand, $collapse);
     $aParams = array();
     $aParams['ad_id'] = $adId;
     switch ($this->startLevel) {
         case 1:
             $this->aEntitiesData = $this->getZones($aParams, $this->startLevel, $expand, true);
             break;
         default:
             $this->startLevel = 0;
             $this->aEntitiesData = $this->getPublishers($aParams, $this->startLevel, $expand);
             break;
     }
     // Summarise the values into a the totals array, & format
     $this->_summariseTotalsAndFormat($this->aEntitiesData);
     $this->showHideLevels = array();
     switch ($this->startLevel) {
         case 1:
             $this->showHideLevels = array(0 => array('text' => $GLOBALS['strShowParentAffiliates'], 'icon' => 'images/icon-affiliate.gif'));
             $this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveZonesHidden']}";
             break;
         case 0:
             $this->showHideLevels = array(1 => array('text' => $GLOBALS['strHideParentAffiliates'], 'icon' => 'images/icon-affiliate-d.gif'));
             $this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveAffiliatesHidden']}";
             break;
     }
     // Save prefs
     $this->aPagePrefs['startlevel'] = $this->startLevel;
     $this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
     $this->aPagePrefs['hideinactive'] = $this->hideInactive;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:87,代码来源:BannerAffiliates.php

示例15: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     $placementId = $this->_getId('placement');
     $adId = $this->_getId('ad');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId, 'bannerid' => $adId);
     // Load $_GET parameters
     $this->_loadParams();
     // Prepare HTML Framework
     $this->pageId = '2.1.2.2.3.1';
     $this->aPageSections = array($this->pageId);
     // Add breadcrumb
     $this->_addBreadcrumbs('banner', $adId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     $this->_addShortcut($GLOBALS['strCampaignProperties'], 'campaign-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId, 'images/icon-campaign.gif');
     $this->_addShortcut($GLOBALS['strBannerProperties'], 'banner-edit.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-banner-stored.gif');
     $this->_addShortcut($GLOBALS['strModifyBannerAcl'], 'banner-acl.php?clientid=' . $advertiserId . '&campaignid=' . $placementId . '&bannerid=' . $adId, 'images/icon-acl.gif');
     // Prepare the data for display by output() method
     $aParams = array('ad_id' => $adId);
     $this->prepare($aParams);
 }
开发者ID:villos,项目名称:tree_admin,代码行数:34,代码来源:BannerTargetingDaily.php


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