本文整理汇总了PHP中MAX_getValue函数的典型用法代码示例。如果您正苦于以下问题:PHP MAX_getValue函数的具体用法?PHP MAX_getValue怎么用?PHP MAX_getValue使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAX_getValue函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* PHP5-style constructor
*/
function __construct()
{
$this->_useDefaultDal();
$this->advertiser_id = MAX_getValue('clientid', 0);
$this->tracker_id = MAX_getValue('trackerid', 0);
$this->assetPath = OX::assetPath();
$this->showReminder = false;
}
示例2: 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 = $this->coreParams;
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;
}
示例3: parseDay
/**
* A method to parse the day paramer, check it's validity, and store it
* in the provided $aDates array.
*
* @param array $aDates A references to an array that will be set to
* contain the valid day as the "day_begin" and
* "day_end" values.
*/
function parseDay(&$aDates)
{
$day = MAX_getValue('day', '');
if (!preg_match('/^(\\d\\d\\d\\d)(\\d\\d)(\\d\\d)$/D', $day, $matches)) {
phpAds_PageHeader('2');
phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']);
}
if (!checkdate($matches[2], $matches[3], $matches[1])) {
phpAds_PageHeader('2');
phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']);
}
$aDates = array();
$aDates['day_begin'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}";
$aDates['day_end'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}";
}
示例4: 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');
}
示例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'];
// 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.2';
$this->aPageSections = array('2.4.1', '2.4.2', '2.4.3');
} elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
$this->pageId = '1.2';
$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');
}
$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 = $this->coreParams;
$aParams['publisher_id'] = $publisherId;
// Limit by advertiser
$advertiserId = (int) MAX_getValue('clientid', '');
if (!empty($advertiserId)) {
$aParams['advertiser_id'] = $advertiserId;
}
// Limit by advertiser
$advertiserId = (int) MAX_getValue('clientid', '');
if (!empty($advertiserId)) {
$aParams['advertiser_id'] = $advertiserId;
}
$this->aEntitiesData = $this->getZones($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['strInactiveZonesHidden']}";
// Save prefs
$this->aPagePrefs['startlevel'] = $this->startLevel;
$this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
$this->aPagePrefs['hideinactive'] = $this->hideInactive;
}
示例6: 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
$publisherId = $this->_getId('publisher');
$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));
// Add standard page parameters
$this->aPageParams = array('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.4.2.2';
$this->aPageSections = array('2.4.2.1', '2.4.2.2');
} elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
$this->pageId = '1.2.2';
$this->aPageSections = array('1.2.1', '1.2.2');
}
// Add breadcrumbs
$this->_addBreadcrumbs('zone', $zoneId);
// Add context
$this->aPageContext = array('zones', $zoneId);
// 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');
// Fix entity links
$this->entityLinks['c'] = 'stats.php?entity=zone&breakdown=campaign-history';
$this->entityLinks['b'] = 'stats.php?entity=zone&breakdown=banner-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 = $this->coreParams;
$aParams['zone_id'] = $zoneId;
switch ($this->startLevel) {
case 1:
$this->aEntitiesData = $this->getBanners($aParams, $this->startLevel, $expand, true);
break;
default:
$this->startLevel = 0;
$this->aEntitiesData = $this->getCampaigns($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['strShowParentCampaigns'], 'icon' => 'images/icon-campaign.gif'));
$this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveBannersHidden']}";
break;
case 0:
$this->showHideLevels = array(1 => array('text' => $GLOBALS['strHideParentCampaigns'], 'icon' => 'images/icon-campaign-d.gif'));
$this->hiddenEntitiesText = "{$this->hiddenEntities} {$GLOBALS['strInactiveCampaignsHidden']}";
break;
}
// Add standard page parameters
$this->aPageParams = array('affiliateid' => $publisherId, 'zoneid' => $zoneId);
$this->aPageParams['period_preset'] = MAX_getStoredValue('period_preset', 'today');
$this->aPageParams['statsBreakdown'] = htmlspecialchars(MAX_getStoredValue('statsBreakdown', 'day'));
$this->_loadParams();
// Save prefs
$this->aPagePrefs['startlevel'] = $this->startLevel;
$this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
$this->aPagePrefs['hideinactive'] = $this->hideInactive;
$this->aPagePrefs['startlevel'] = $this->startLevel;
}
示例7: MAX_getValue
require_once MAX_PATH . '/lib/OA/Dll/Audit.php';
require_once MAX_PATH . '/lib/OA/Admin/UI/Field/AuditDaySpanField.php';
require_once 'Pager/Pager.php';
require_once MAX_PATH . '/lib/OX/Translation.php';
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccountPermission(OA_ACCOUNT_ADVERTISER, OA_PERM_USER_LOG_ACCESS);
OA_Permission::enforceAccountPermission(OA_ACCOUNT_TRAFFICKER, OA_PERM_USER_LOG_ACCESS);
// Register input variables
$advertiserId = MAX_getValue('advertiserId', 0);
$campaignId = MAX_getValue('campaignId', 0);
$publisherId = MAX_getValue('publisherId', 0);
$zoneId = MAX_getValue('zoneId', 0);
$startDate = MAX_getStoredValue('period_start', null);
$endDate = MAX_getStoredValue('period_end', null);
$periodPreset = MAX_getValue('period_preset', 'all_events');
if (!empty($advertiserId)) {
OA_Permission::enforceAccessToObject('clients', $advertiserId);
}
if (!empty($campaignId)) {
OA_Permission::enforceAccessToObject('campaigns', $campaignId);
}
if (!empty($publisherId)) {
OA_Permission::enforceAccessToObject('affiliates', $publisherId);
}
if (!empty($zoneId)) {
OA_Permission::enforceAccessToObject('zones', $zoneId);
}
/*-------------------------------------------------------*/
/* HTML framework */
/*-------------------------------------------------------*/
示例8: 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;
}
示例9: MAX_getValue
$returnurl = MAX_getValue('returnurl');
$statusIds = MAX_getValue('statusIds');
$pageID = MAX_getValue('pageID');
$setPerPage = MAX_getValue('setPerPage');
$aParams = array();
$aParams['clientid'] = $clientId;
$aParams['campaignid'] = $campaignId;
$aParams['bannerid'] = $bannerId;
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
if (!empty($day)) {
// Reset period
$period_preset = '';
// Always refresh howLong and hour
$howLong = MAX_getValue('howLong', 'd');
$hour = MAX_getValue('hour');
} else {
$period_preset = MAX_getStoredValue('period_preset', 'today');
$period_start = MAX_getStoredValue('period_start', date('Y-m-d'));
$period_end = MAX_getStoredValue('period_end', date('Y-m-d'));
}
if (!empty($period_preset)) {
$aDates = MAX_getDatesByPeriod($period_preset, $period_start, $period_end);
} else {
$aDates = array();
$oDayDate = new Date();
$oDayDate->setDate($day, DATE_FORMAT_TIMESTAMP);
if (!empty($hour)) {
// If hour is set build day date including hour
$aDates['day_hour'] = $oDayDate->format('%Y-%m-%d') . ' ' . $hour;
} else {
示例10: MAX_getValue
$hour = MAX_getValue('hour');
} else {
$period_preset = MAX_getStoredValue('period_preset', 'today');
$period_start = MAX_getStoredValue('period_start', date('Y-m-d'));
$period_end = MAX_getStoredValue('period_end', date('Y-m-d'));
}
if (is_numeric($hour) && $hour < 10 && strlen($hour) != 2) {
$hour = '0' . $hour;
}
$expand = MAX_getValue('expand', '');
$collapse = MAX_getValue('collapse');
$clientId = MAX_getValue('clientid');
$campaignId = MAX_getValue('campaignid');
$bannerId = MAX_getValue('bannerid');
$affiliateId = MAX_getValue('affiliateid');
$zoneId = MAX_getValue('zoneid');
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
$clientId = $clientid = OA_Permission::getEntityId();
} elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
$affiliateId = $affiliateid = OA_Permission::getEntityId();
}
// Build $addUrl variable which will be added to any required link on this page, eg: expand, collapse, editStatuses
$entityIds = array('entity' => 'conversions', 'clientid' => $clientid, 'campaignid' => $campaignId, 'bannerid' => $bannerId, 'affiliateid' => $affiliateId, 'zoneid' => $zoneId, 'setPerPage' => $setPerPage, 'pageID' => $pageID);
$addUrl = "entity=conversions&clientid={$clientId}&campaignid={$campaignId}&bannerid={$bannerId}&affiliateid={$affiliateId}&zoneid={$zoneId}&setPerPage={$setPerPage}&pageID={$pageID}";
if (!empty($day)) {
$entityIds += array('day' => $day, 'hour' => $hour, 'howLong' => $howLong);
$addUrl .= "&day={$day}&hour={$hour}&howLong={$howLong}";
} else {
$entityIds += array('period_preset' => $period_preset, 'period_start' => $period_start, 'period_end' => $period_end);
$addUrl .= "&period_preset={$period_preset}&period_start={$period_start}&period_end={$period_end}";
}
示例11: MAX_getValue
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/max/other/html.php';
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/lib/OX/Admin/UI/ViewHooks.php';
/*-------------------------------------------------------*/
/* HTML framework */
/*-------------------------------------------------------*/
$advertiserId = MAX_getValue('clientid');
$campaignId = MAX_getValue('campaignid');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients', $clientid, false, OA_Permission::OPERATION_VIEW);
OA_Permission::enforceAccessToObject('campaigns', $campaignid, true, OA_Permission::OPERATION_EDIT);
/*-------------------------------------------------------*/
/* Store preferences */
/*-------------------------------------------------------*/
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'] = $clientid;
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['campaignid'][$clientid] = $campaignid;
phpAds_SessionDataStore();
$agencyId = OA_Permission::getAgencyId();
$aOtherAdvertisers = Admin_DA::getAdvertisers(array('agency_id' => $agencyId));
$aOtherCampaigns = Admin_DA::getPlacements(array('advertiser_id' => $advertiserId));
$pageName = basename($_SERVER['SCRIPT_NAME']);
$aEntities = array('clientid' => $advertiserId, 'campaignid' => $campaignId);
示例12: MAX_getValue
// Get input parameters
$pref =& $GLOBALS['_MAX']['PREF'];
$publisherId = MAX_getValue('affiliateid');
$zoneId = MAX_getValue('zoneid');
$advertiserId = MAX_getValue('clientid');
$placementId = MAX_getValue('campaignid');
$adId = MAX_getValue('bannerid');
$action = MAX_getValue('action');
$aCurrent = MAX_getValue('includebanner');
$hideInactive = MAX_getStoredValue('hideinactive', $pref['ui_hide_inactive'] == true, null, true);
$listorder = MAX_getStoredValue('listorder', 'name');
$orderdirection = MAX_getStoredValue('orderdirection', 'up');
$selection = MAX_getValue('selection');
$showMatchingAds = MAX_getStoredValue('showbanners', $pref['ui_show_matching_banners'] == true, null, true);
$showParentPlacements = MAX_getStoredValue('showcampaigns', $pref['ui_show_matching_banners_parents'] == true, null, true);
$submit = MAX_getValue('submit');
$view = MAX_getStoredValue('view', 'placement');
$aZone = Admin_DA::getZone($zoneId);
if ($aZone['type'] == MAX_ZoneEmail) {
$view = 'ad';
}
// Initialise some parameters
$pageName = basename($_SERVER['PHP_SELF']);
$tabIndex = 1;
$agencyId = OA_Permission::getAgencyId();
$aEntities = array('affiliateid' => $publisherId, 'zoneid' => $zoneId);
if (isset($action)) {
$result = true;
if ($action == 'set' && $view == 'placement' && !empty($placementId)) {
$aLinkedPlacements = Admin_DA::getPlacementZones(array('zone_id' => $zoneId), false, 'placement_id');
if (!isset($aLinkedPlacements[$placementId])) {
示例13: _getId
/**
* A private method that can be inherited and used by children classes
* to obtain the correct ID of various entities.
*
* @access private
* @param string $type One of "advertiser", "publisher", "placement",
* "ad", "zone".
* @param ingeger $default Optional default value.
* @return integer The appropriate ID field.
*/
function _getId($type, $default = null)
{
if ($type == 'advertiser') {
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
return OA_Permission::getEntityId();
} else {
if (is_null($default)) {
return (int) MAX_getValue('clientid', '');
} else {
return (int) MAX_getValue('clientid', $default);
}
}
} else {
if ($type == 'publisher') {
if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
return OA_Permission::getEntityId();
} else {
if (is_null($default)) {
return (int) MAX_getValue('affiliateid', '');
} else {
return (int) MAX_getValue('affiliateid', $default);
}
}
} else {
if ($type == 'placement') {
if (is_null($default)) {
return (int) MAX_getValue('campaignid', '');
} else {
return (int) MAX_getValue('campaignid', $default);
}
} else {
if ($type == 'ad') {
if (is_null($default)) {
return (int) MAX_getValue('bannerid', '');
} else {
return (int) MAX_getValue('bannerid', $default);
}
} else {
if ($type == 'zone') {
if (is_null($default)) {
return (int) MAX_getValue('zoneid', '');
} else {
return (int) MAX_getValue('zoneid', $default);
}
}
}
}
}
}
}
示例14: MAX_commonSetNoCacheHeaders
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/OA/Admin/DaySpan.php';
require_once MAX_PATH . '/lib/OA/Admin/Statistics/Factory.php';
require_once MAX_PATH . '/lib/pear/Date.php';
// No cache
MAX_commonSetNoCacheHeaders();
// The URL for stats pages may include values for "period_preset",
// "period_start" and "period_end". However, the user may have
// bookmarked or emailed a statsistics URL, and so the page may
// be viewed on a day that is NOT the day the URL was created.
// As a result, the "period_preset" value may no longer match
// the dates. So, to prevent confusion, re-set the "period_preset"
// value to the range that matches the date, if possible - otherwise
// use the "Specific Dates" value. The exception, of course, is
// "".
$periodPreset = MAX_getValue('period_preset', 'today');
if ($periodPreset == 'all_stats') {
unset($_REQUEST['period_start']);
unset($session['prefs']['GLOBALS']['period_start']);
unset($_REQUEST['period_end']);
unset($session['prefs']['GLOBALS']['period_end']);
$_REQUEST['period_preset'] = $periodPreset;
$session['prefs']['GLOBALS']['period_preset'] = $periodPreset;
} else {
$period_start = htmlspecialchars(MAX_getStoredValue('period_start', date('Y-m-d')));
if (!strstr($period_start, '-')) {
$period_start = date('Y-m-d', strtotime($period_start));
MAX_changeStoredValue('period_start', $period_start);
}
$period_end = htmlspecialchars(MAX_getStoredValue('period_end', date('Y-m-d')));
if (!strstr($period_end, '-')) {