本文整理汇总了PHP中MAX_commonRegisterGlobalsArray函数的典型用法代码示例。如果您正苦于以下问题:PHP MAX_commonRegisterGlobalsArray函数的具体用法?PHP MAX_commonRegisterGlobalsArray怎么用?PHP MAX_commonRegisterGlobalsArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAX_commonRegisterGlobalsArray函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MAX_layerGetHtml
function MAX_layerGetHtml($output, $uniqid)
{
global $transparent, $backcolor, $shiftv;
// Register input variables
MAX_commonRegisterGlobalsArray(array('transparent', 'backcolor', 'shiftv'));
if (!isset($transparent)) {
$transparent = 't';
}
if (!isset($backcolor)) {
$backcolor = '#FFFFFF';
}
if (!isset($shiftv)) {
$shiftv = '0';
}
// return HTML code
return '<div id="MAX_' . $uniqid . '" style="position:absolute; width:' . $output['width'] . 'px; height:' . $output['height'] . 'px; z-index:99; left: 0px; top: ' . $shiftv . 'px; visibility: hidden; overflow: hidden' . ($transparent == 't' ? '' : '; background-color: "' . $backcolor . '; layer-background-color: "' . $backcolor) . '">' . $output['html'] . '</td></tr></table></div>';
}
示例2: _unsetMAXGlobals
function _unsetMAXGlobals()
{
unset($GLOBALS['zoneid']);
unset($GLOBALS['campaignid']);
unset($GLOBALS['clientid']);
unset($GLOBALS['bannerid']);
unset($GLOBALS['what']);
unset($GLOBALS['target']);
unset($GLOBALS['charset']);
unset($GLOBALS['withText']);
unset($GLOBALS['withtext']);
MAX_commonRegisterGlobalsArray(array('context', 'source', 'target', 'withText', 'withtext', 'ct0', 'what', 'loc', 'referer', 'zoneid', 'campaignid', 'bannerid', 'clientid', 'charset'));
}
示例3: OX_Plugin_ComponentGroupManager
} else {
$backURL = "plugin-index.php?selection=plugins";
}
// get the settings for this plugin
$oManager =& new OX_Plugin_ComponentGroupManager();
$aConfig = $oManager->_getComponentGroupConfiguration($group);
// If the settings page is a submission, deal with the form data
if (isset($_POST['submitok']) && $_POST['submitok'] == 'true') {
// Prepare an array of the HTML elements to process, and the
// location to save the values in the settings configuration
// file
$aElements = array();
foreach ($aConfig['preferences'] as $k => $v) {
$aElements[] = $group . '_' . $v['key'];
// Register the HTML element value
MAX_commonRegisterGlobalsArray(array($group . '_' . $v['key']));
}
$aCheckboxes = array();
$valid = true;
$validationFile = MAX_PATH . $GLOBALS['_MAX']['CONF']['pluginPaths']['packages'] . $group . '/processPreferences.php';
if (file_exists($validationFile)) {
$className = $group . '_processPreferences';
include $validationFile;
if (class_exists($className)) {
$oPlugin = new $className();
if (method_exists($oPlugin, 'validate')) {
$aErrormessage = array();
$valid = $oPlugin->validate($aErrormessage);
}
}
}
示例4: MAX_commonSendContentTypeHeader
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/adSelect.php';
require_once MAX_PATH . '/lib/max/Delivery/flash.php';
require_once MAX_PATH . '/lib/max/Delivery/cache.php';
MAX_commonSendContentTypeHeader('text/html');
//Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('timeout'));
$timeout = !empty($timeout) ? $timeout : 0;
if ($zoneid > 0) {
// Get the zone from cache
$aZone = MAX_cacheGetZoneInfo($zoneid);
} else {
// Direct selection, or problem with admin DB
$aZone = array();
$aZone['zoneid'] = $zoneid;
$aZone['append'] = '';
$aZone['prepend'] = '';
}
// Get the banner from cache
$aBanner = MAX_cacheGetAd($bannerid);
$prepend = !empty($aZone['prepend']) ? $aZone['prepend'] : '';
$html = MAX_adRender($aBanner, $zoneid, $source, $target, $ct0, $withtext);
示例5: array
// file
$aElements = array();
// Banner Delivery Cache Settings
$aElements += array('delivery_cacheExpire' => array('delivery' => 'cacheExpire'), 'delivery_cacheStorePlugin' => array('delivery' => 'cacheStorePlugin'));
// Banner Delivery Settings
$aElements += array('delivery_acls' => array('delivery' => 'acls', 'bool' => true), 'delivery_aclsDirectSelection' => array('delivery' => 'aclsDirectSelection', 'bool' => true), 'delivery_obfuscate' => array('delivery' => 'obfuscate', 'bool' => true), 'delivery_execPhp' => array('delivery' => 'execPhp', 'bool' => true), 'delivery_ctDelimiter' => array('delivery' => 'ctDelimiter'), 'defaultBanner_imageUrl' => array('defaultBanner' => 'imageUrl'));
// Invocation Defaults
$aElements += array('delivery_clicktracking' => array('delivery' => 'clicktracking'));
// P3P Privacy Policies
$aElements += array('p3p_policies' => array('p3p' => 'policies', 'bool' => true), 'p3p_compactPolicy' => array('p3p' => 'compactPolicy'), 'p3p_policyLocation' => array('p3p' => 'policyLocation'));
// OpenX Server Access Paths
$aElements += array('webpath_admin' => array('webpath' => 'admin', 'preg_match' => '#/$#', 'preg_replace' => ''), 'webpath_delivery' => array('webpath' => 'delivery', 'preg_match' => '#/$#', 'preg_replace' => ''), 'webpath_deliverySSL' => array('webpath' => 'deliverySSL', 'preg_match' => '#/$#', 'preg_replace' => ''), 'webpath_images' => array('webpath' => 'images', 'preg_match' => '#/$#', 'preg_replace' => ''), 'webpath_imagesSSL' => array('webpath' => 'imagesSSL', 'preg_match' => '#/$#', 'preg_replace' => ''));
// Delivery File Names
$aElements += array('file_click' => array('file' => 'click'), 'file_conversionvars' => array('file' => 'conversionvars'), 'file_content' => array('file' => 'content'), 'file_conversion' => array('file' => 'conversion'), 'file_conversionjs' => array('file' => 'conversionjs'), 'file_frame' => array('file' => 'frame'), 'file_image' => array('file' => 'image'), 'file_js' => array('file' => 'js'), 'file_layer' => array('file' => 'layer'), 'file_log' => array('file' => 'log'), 'file_popup' => array('file' => 'popup'), 'file_view' => array('file' => 'view'), 'file_xmlrpc' => array('file' => 'xmlrpc'), 'file_local' => array('file' => 'local'), 'file_frontcontroller' => array('file' => 'frontcontroller'), 'file_flash' => array('file' => 'flash'), 'file_singlepagecall' => array('file' => 'singlepagecall'), 'file_spcjs' => array('file' => 'spcjs'));
// Test the suitability of the cache store type, if required
MAX_commonRegisterGlobalsArray(array('delivery_cacheStorePlugin'));
if (isset($delivery_cacheStorePlugin)) {
// Check for problems in selected delivery store plugin
$oDeliveryCacheStore =& OX_Component::factoryByComponentIdentifier($delivery_cacheStorePlugin);
$result = $oDeliveryCacheStore->getStatus();
if ($result !== true) {
$aErrormessage[1][] = $oTranslation->translate('ErrorInCacheStorePlugin', array($oDeliveryCacheStore->getName()));
foreach ($result as $error) {
$aErrormessage[1][] = " - " . $error;
}
}
}
if (empty($aErrormessage)) {
// Create a new settings object, and save the settings!
$oSettings = new OA_Admin_Settings();
$result = $oSettings->processSettingsFromForm($aElements);
示例6: define
<?php
/*
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Define constant used to place code generator
define('phpAds_adLayerLoaded', true);
// Register input variables
MAX_commonRegisterGlobalsArray(array('target', 'align', 'padding', 'closebutton', 'backcolor', 'bordercolor', 'valign', 'closetime', 'shifth', 'shiftv', 'nobg', 'noborder'));
/**
*
* Layerstyle for invocation tag plugin
*
*/
class Plugins_oxInvocationTags_Adlayer_Layerstyles_Simple_Invocation extends Plugins_InvocationTags_OxInvocationTags_adlayer
{
/*-------------------------------------------------------*/
/* Place ad-generator settings */
/*-------------------------------------------------------*/
function placeLayerSettings()
{
global $align, $valign, $closetime, $padding;
global $shifth, $shiftv, $closebutton;
global $backcolor, $bordercolor;
global $nobg, $noborder;
示例7: phpAds_registerGlobal
/**
* Register an array of variable names in the global scope
*
* Note: This is now a wrapper to the delivery engine's equivalent function
*
*/
function phpAds_registerGlobal()
{
$args = func_get_args();
MAX_commonRegisterGlobalsArray($args);
}
示例8: array
<?php
require_once '../../../../init.php';
require_once '../../config.php';
require_once MAX_PATH . '/lib/OA/Admin/TemplatePlugin.php';
$inputVariables = array('entity', 'entityId', 'startDate', 'endDate', 'dimension', 'exportCsv', 'showAs', 'expandId');
MAX_commonRegisterGlobalsArray($inputVariables);
PEAR::pushErrorHandling(null);
require_once 'stats-api.php';
require_once 'stats-debug.php';
include_once 'lib/SmartyFunctions/function.url.php';
include_once 'lib/SmartyFunctions/modifier.formatNumber.php';
include_once 'VastAreaGraph.php';
include_once 'VastMultiAreaGraph.php';
// Entity
$availableEntities = array('advertiser', 'campaign', 'banner', 'website', 'zone');
if (!in_array($entity, $availableEntities)) {
exit("Invalid input parameters");
}
$entityToRequiredAccess = array('advertiser' => 'clients', 'campaign' => 'campaigns', 'banner' => 'banners', 'website' => 'affiliates', 'zone' => 'zones');
OA_Permission::enforceAccessToObject($entityToRequiredAccess[$entity], $entityId);
$entityId = (int) $entityId;
$startDate = urlencode($startDate);
$endDate = urlencode($endDate);
// "Show as" dropdown
$availableShowAs = array('table' => "Table", 'graph-percentage' => "Graph (% of views)", 'graph-count' => "Graph (# of views)");
if (empty($showAs) || !isset($availableShowAs[$showAs])) {
$showAs = 'table';
}
$selectedShowAs = $showAs;
// "View by" dimension
示例9: MAX_commonSetNoCacheHeaders
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/adSelect.php';
// No Caching
MAX_commonSetNoCacheHeaders();
//Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('left', 'top', 'popunder', 'timeout', 'delay', 'toolbars', 'location', 'menubar', 'status', 'resizable', 'scrollbars'));
// Set defaults for script specific input variables
if (!isset($left)) {
$left = 0;
}
if (!isset($top)) {
$top = 0;
}
if (!isset($popunder)) {
$popunder = 0;
}
if (!isset($timeout)) {
$timeout = 0;
}
if (!isset($delay)) {
$delay = 0;
示例10: MAX_commonSetNoCacheHeaders
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/cache.php';
require_once MAX_PATH . '/lib/max/Delivery/javascript.php';
require_once MAX_PATH . '/lib/max/Delivery/tracker.php';
// No Caching
MAX_commonSetNoCacheHeaders();
//Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('trackerid', 'inherit', 'append'));
if (empty($trackerid)) {
$trackerid = 0;
}
$conversionsid = NULL;
$variablesScript = '';
MAX_commonSendContentTypeHeader("application/x-javascript", $charset);
// Log the tracker impression
$logVars = false;
$aConversion = $aConversionInfo = array();
if ($conf['logging']['trackerImpressions']) {
// Only log and gather variable data if this conversion connects back
$aConversion = MAX_trackerCheckForValidAction($trackerid);
if (!empty($aConversion)) {
$aConversionInfo = MAX_Delivery_log_logConversion($trackerid, $aConversion);
// Generate code required to send variable values to the {$conf['file']['conversionvars']} script
示例11: bumpVastEventTrackingBucketCounter
$time = $GLOBALS['_MAX']['NOW'];
return $time;
}
function bumpVastEventTrackingBucketCounter($data)
{
$aQuery = array('interval_start' => $data['interval_start'], 'creative_id' => $data['creative_id'], 'zone_id' => $data['zone_id'], 'vast_event_id' => $data['vast_event_id']);
return OX_bucket_updateTable('data_bkt_vast_e', $aQuery);
}
###START_STRIP_DELIVERY
OX_Delivery_logMessage('starting delivery script ' . __FILE__, 7);
###END_STRIP_DELIVERY
MAX_commonRegisterGlobalsArray(array('vast_event'));
// if its a vast tracking event
if ($vast_event) {
// NB: videotimeposn is not yet supported by the player
MAX_commonRegisterGlobalsArray(array('video_time_posn', 'banner_id', 'zone_id'));
// Prevent the logging beacon from being cached by browsers
MAX_commonSetNoCacheHeaders();
// Remove any special characters from the request variables
MAX_commonRemoveSpecialChars($_REQUEST);
$time = getTimeNow();
$oi = $GLOBALS['_MAX']['CONF']['maintenance']['operationInterval'];
$intervalStart = gmdate('Y-m-d H:i:s', $time - $time % ($oi * 60));
$viewerIsOkToLog = _viewersHostOkayToLog();
$aQuery = array('creative_id' => intVal($banner_id), 'zone_id' => intVal($zone_id), 'vast_event_id' => getVastEventIdFromVastEventStr($vast_event), 'interval_start' => $intervalStart, 'is_host_ok' => $viewerIsOkToLog);
if ($viewerIsOkToLog) {
bumpVastEventTrackingBucketCounter($aQuery);
}
if (!empty($_REQUEST[$GLOBALS['_MAX']['CONF']['var']['dest']])) {
MAX_redirect($_REQUEST[$GLOBALS['_MAX']['CONF']['var']['dest']]);
exit;
示例12: MAX_commonSetNoCacheHeaders
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/adSelect.php';
require_once MAX_PATH . '/lib/max/Delivery/javascript.php';
MAX_commonSetNoCacheHeaders();
/*-------------------------------------------------------*/
/* Register input variables */
/*-------------------------------------------------------*/
MAX_commonRegisterGlobalsArray(array('zones', 'source', 'block', 'blockcampaign', 'exclude', 'q', 'prefix'));
/*-------------------------------------------------------*/
/* Main code */
/*-------------------------------------------------------*/
// Derive the source parameter
$source = MAX_commonDeriveSource($source);
$spc_output = array();
if (!empty($zones)) {
$zones = explode('|', $zones);
foreach ($zones as $id => $thisZoneid) {
$zonename = $prefix . $id;
// Clear deiveryData between iterations
unset($GLOBALS['_MAX']['deliveryData']);
$what = 'zone:' . $thisZoneid;
// Get the banner
$output = MAX_adSelect($what, $clientid, $target, $source, $withtext, $charset, $context, true, $ct0, $GLOBALS['loc'], $GLOBALS['referer']);
示例13: show
//.........这里部分代码省略.........
}
// Test to see if the item is a preference item, and if it needs to be disabled from the account in use
if ($this->_optionType == 'account-preferences' || $this->_optionType == 'account-user') {
$result = $this->_hideOrDisablePreference($aPref[$aItem['name']]['account_type']);
if ($result == 'disable') {
$aItem['disabled'] = true;
$showBreak = false;
}
}
// Update the JavaScript used to enable/disabled option items
if (($this->_optionType == 'account-preferences' || $this->_optionType == 'account-preferences-user') && $aItem['type'] == 'statscolumns') {
// The statscolumns data type needs to have some conversion work done to match
// the more simple data structure used by other option items
foreach ($aItem['rows'] as $aSubItem) {
// Create two fake items for the label and rank
$aLabelItem = array('name' => $aSubItem['name'] . '_label', 'depends' => $aSubItem['name'] . '==true');
$aRankItem = array('name' => $aSubItem['name'] . '_rank', 'depends' => $aSubItem['name'] . '==true', 'check' => 'wholeNumber');
$checkbuffer .= "max_formSetRequirements('" . $aSubItem['name'] . '_rank' . "', '" . addslashes($aSubItem['text']) . "', false, 'wholeNumber');\n";
// Add the fake item dependencies
$dependbuffer .= $this->_showCheckDependancies($aData, $aLabelItem);
$dependbuffer .= $this->_showCheckDependancies($aData, $aRankItem);
}
} else {
if (!$aItem['disabled']) {
$dependbuffer .= $this->_showCheckDependancies($aData, $aItem);
}
}
// Display the option item
if (count($aErrors)) {
// Page is the result of an error message, get values from the input,
// not from the settings configuration file or preferences in the database
$value = '';
if (isset($aItem['name'])) {
MAX_commonRegisterGlobalsArray(array($aItem['name']));
if (isset($GLOBALS[$aItem['name']])) {
$value = stripslashes($GLOBALS[$aItem['name']]);
if ($aErrors[0] != MAX_ERROR_YOU_HAVE_NO_TRACKERS && $aErrors[0] != MAX_ERROR_YOU_HAVE_NO_CAMPAIGNS) {
if (isset($GLOBALS[$aItem['name'] . '_defVal'])) {
$value = $GLOBALS[$aItem['name'] . '_defVal'];
}
}
}
}
if ($aItem[type] != 'break') {
$showBreak = true;
}
} else {
// The page had no error, so, get the value for the item from an appropriate source
unset($value);
if (isset($aItem['name'])) {
// Try to load the item value from the globals array
if (isset($GLOBALS[$aItem['name'] . '_defVal'])) {
$value = $GLOBALS[$aItem['name'] . '_defVal'];
}
// If that did not work, and the item is a setting, try to load the
// item value from the settings configuration file
if (is_null($value) && $this->_optionType == 'account-settings') {
$aNameExploded = explode('_', $aItem['name']);
$aSettingSection = isset($aNameExploded[0]) ? $aNameExploded[0] : null;
$aSettingKey = isset($aNameExploded[1]) ? $aNameExploded[1] : null;
if (isset($aConf[$aSettingSection][$aSettingKey])) {
// Load the configuration .php file value
$value = $aConf[$aSettingSection][$aSettingKey];
} elseif (isset($aConf[$aItem['name']][0])) {
// The value in the settings configuration file is an array,
// so re-constitute into a comma separated list
示例14: MAX_commonSetNoCacheHeaders
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/adSelect.php';
// No Caching
MAX_commonSetNoCacheHeaders();
// Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('n'));
if (!isset($n)) {
$n = 'default';
}
$richMedia = false;
// This is an image tag - we only need the filename (or URL?) of the image...
$target = '';
// Target cannot be dynamically set in basic tags.
$context = array();
// I don't think that $context is valid in adview.php...
$ct0 = '';
// Click tracking should be done using external tags rather than this way...
$withText = 0;
// Cannot write text using a simple tag...
$row = MAX_adSelect($what, $campaignid, $target, $source, $withText, $charset, $context, $richMedia, $ct0, $loc, $referer);
if (!empty($row['html'])) {
示例15: array
<?php
/*
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
/*
* NOTE: If this list of event ever changes (IDs or names), the Video Reports must be updated as well
*/
$aVastEventStrToIdMap = array('start' => 1, 'midpoint' => 2, 'firstquartile' => 3, 'thirdquartile' => 4, 'complete' => 5, 'mute' => 6, 'replay' => 7, 'fullscreen' => 8, 'stop' => 9, 'unmute' => 10, 'resume' => 11, 'pause' => 12);
MAX_commonRegisterGlobalsArray(array('event', 'video_time_posn'));
// Prevent the logging beacon from being cached by browsers
MAX_commonSetNoCacheHeaders();
// if its a vast tracking event
if (!empty($bannerid) && isset($aVastEventStrToIdMap[$event])) {
// Remove any special characters from the request variables
MAX_commonRemoveSpecialChars($_REQUEST);
$time = MAX_commonGetTimeNow();
$oi = $GLOBALS['_MAX']['CONF']['maintenance']['operationInterval'];
$GLOBALS['_MAX']['deliveryData'] = array('interval_start' => gmdate('Y-m-d H:i:s', $time - $time % ($oi * 60)), 'creative_id' => (int) $bannerid, 'zone_id' => (int) $zoneid, 'vast_event_id' => $aVastEventStrToIdMap[$event]);
OX_Delivery_Common_hook('logImpressionVast', array($bannerid, $zoneid, _viewersHostOkayToLog()));
}
MAX_cookieFlush();
MAX_commonDisplay1x1();