本文整理汇总了PHP中MAX::constructUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP MAX::constructUrl方法的具体用法?PHP MAX::constructUrl怎么用?PHP MAX::constructUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MAX
的用法示例。
在下文中一共展示了MAX::constructUrl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
$conf = $GLOBALS['_MAX']['CONF'];
if (!$conf['audit']['enabled']) {
$this->oTpl->assign('screen', 'disabled');
$this->oTpl->assign('siteTitle', $GLOBALS['strAuditTrailSetup']);
$this->oTpl->assign('siteUrl', MAX::constructUrl(MAX_URL_ADMIN, 'account-settings-debug.php'));
} else {
// Account security
if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
$aParams['account_id'] = OA_Permission::getAccountId();
}
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
$aParams['advertiser_account_id'] = OA_Permission::getAccountId();
}
if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
$aParams['website_account_id'] = OA_Permission::getAccountId();
}
$oAudit = new OA_Dll_Audit();
$aAuditData = $oAudit->getAuditLogForAuditWidget($aParams);
if (count($aAuditData) > 0) {
foreach ($aAuditData as $key => $aValue) {
$aValue['action'] = $this->oTrans->translate($oAudit->getActionName($aValue['actionid']));
$result = $oAudit->getParentContextData($aValue);
$str = "{$aValue['username']} {$GLOBALS['strHas']} {$aValue['action']} {$aValue['context']}";
if (!empty($aValue['contextid'])) {
$str .= " ({$aValue['contextid']})";
}
if (!empty($aValue['parentcontext'])) {
$str .= " {$GLOBALS['strFor']} {$aValue['parentcontext']} ({$aValue['parentcontextid']})";
}
if (!empty($aValue['hasChildren'])) {
$str .= " {$GLOBALS['strAdditionItems']}";
}
$aAuditData[$key]['desc'] = strlen($str) > 30 ? substr($str, 0, 30) . '...' : $str;
}
} else {
$this->oTpl->assign('noData', $GLOBALS['strAuditNoData']);
}
$this->oTpl->assign('screen', 'enabled');
$this->oTpl->assign('aAuditData', $aAuditData);
$this->oTpl->assign('siteUrl', MAX::constructUrl(MAX_URL_ADMIN, 'userlog-index.php'));
$this->oTpl->assign('siteTitle', $GLOBALS['strAuditTrailGoTo']);
}
$this->oTpl->display();
}
示例2: display
/**
* A method to launch and display the widget
*
* @param array $aParams The parameters array, usually $_REQUEST
*/
function display()
{
$conf = $GLOBALS['_MAX']['CONF'];
if (!$conf['audit']['enabled']) {
$this->oTpl->assign('screen', 'disabled');
$this->oTpl->assign('siteTitle', $GLOBALS['strCampaignAuditTrailSetup']);
$this->oTpl->assign('siteUrl', MAX::constructUrl(MAX_URL_ADMIN, 'account-settings-debug.php'));
} else {
$oCache = new OA_Cache('campaignOverview', 'Widgets');
$aCache = $oCache->load(true);
$aCampaign = array();
if (isset($aCache['maxItems'])) {
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
foreach ($aCache['aAccounts'] as $aActions) {
foreach ($aActions as $aAction) {
$aCampaign[$aAction['auditid']] = $aAction;
}
}
} else {
$aAccountsId = OA_Permission::getOwnedAccounts(OA_Permission::getAccountId());
foreach ($aAccountsId as $accountId) {
if (isset($aCache['aAccounts'][$accountId])) {
foreach ($aCache['aAccounts'][$accountId] as $aAction) {
$aCampaign[$aAction['auditid']] = $aAction;
}
}
}
}
krsort($aCampaign);
$aCampaign = array_slice($aCampaign, 0, $aCache['maxItems']);
}
if (count($aCampaign)) {
$aActionMap = array('added' => $GLOBALS['strCampaignStatusAdded'], 'started' => $GLOBALS['strCampaignStatusStarted'], 'restarted' => $GLOBALS['strCampaignStatusRestarted'], 'completed' => $GLOBALS['strCampaignStatusExpired'], 'paused' => $GLOBALS['strCampaignStatusPaused'], 'deleted' => $GLOBALS['strCampaignStatusDeleted']);
foreach ($aCampaign as $k => $v) {
if (isset($aActionMap[$v['action']])) {
$aCampaign[$k]['actionDesc'] = $aActionMap[$v['action']];
}
}
} else {
// Check if the account has any campaign in its realm
$doCampaigns = OA_Dal::factoryDO('campaigns');
if (!empty($aParam['account_id'])) {
$doClients = OA_Dal::factoryDO('clients');
$doAgency = OA_Dal::factoryDO('agency');
$doAgency->account_id = $aParam['account_id'];
$doClients->joinAdd($doAgency);
$doCampaigns->joinAdd($doClients);
}
$doCampaigns->limit(1);
$this->oTpl->assign('hasCampaigns', $doCampaigns->count());
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
$this->oTpl->assign('isAdmin', true);
}
}
$this->oTpl->assign('screen', 'enabled');
$this->oTpl->assign('aCampaign', $aCampaign);
$this->oTpl->assign('siteUrl', MAX::constructURL(MAX_URL_ADMIN, 'advertiser-campaigns.php'));
$this->oTpl->assign('baseUrl', MAX::constructURL(MAX_URL_ADMIN, 'campaign-edit.php'));
}
$this->oTpl->display();
}
示例3: addChannelPageTools
function addChannelPageTools($agencyid, $websiteId, $channelid, $channelType)
{
if ($channelType == 'publisher') {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'affiliate-channels.php');
} else {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'channel-index.php');
}
//duplicate
addPageLinkTool($GLOBALS["strDuplicate"], MAX::constructUrl(MAX_URL_ADMIN, "channel-modify.php?duplicate=true&agencyid={$agencyid}&affiliateid={$websiteId}&channelid={$channelid}&returnurl=" . urlencode(basename($_SERVER['SCRIPT_NAME']))), "iconTargetingChannelDuplicate");
//delete
$deleteConfirm = phpAds_DelConfirm($GLOBALS['strConfirmDeleteChannel']);
addPageLinkTool($GLOBALS["strDelete"], MAX::constructUrl(MAX_URL_ADMIN, "channel-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "&agencyid={$agencyid}&affiliateid={$websiteId}&channelid={$channelid}&returnurl={$deleteReturlUrl}"), "iconDelete", null, $deleteConfirm);
}
示例4: displayPage
function displayPage($bannerid, $campaignid, $clientid, $bannerTypes, $aBanner, $type, $form, $ext_bannertype, $formDisabled = false)
{
$pageName = 'advertiser-campaigns';
$aEntities = array('clientid' => $clientid, 'campaignid' => $campaignid, 'bannerid' => $bannerid);
$entityId = OA_Permission::getEntityId();
$entityType = 'advertiser_id';
$aOtherCampaigns = Admin_DA::getPlacements(array($entityType => $entityId));
$aOtherBanners = Admin_DA::getAds(array('placement_id' => $campaignid), false);
$advertiserId = $aEntities['clientid'];
$campaignId = $aEntities['campaignid'];
$bannerId = $aEntities['bannerid'];
$entityString = _getEntityString($aEntities);
$aOtherEntities = $aEntities;
unset($aOtherEntities['bannerid']);
$otherEntityString = _getEntityString($aOtherEntities);
if ($pageName == 'banner-edit.php' && empty($bannerId)) {
$tabValue = 'banner-edit_new';
$pageType = 'edit-new';
} else {
$pageType = 'edit';
}
$advertiserEditUrl = '';
$campaignEditUrl = '';
if (OA_Permission::hasAccessToObject('clients', $advertiserId)) {
$advertiserEditUrl = "advertiser-edit.php?clientid={$advertiserId}";
}
if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
$campaignEditUrl = "campaign-edit.php?clientid={$advertiserId}&campaignid={$campaignId}";
}
if ($bannerId && !empty($GLOBALS['_MAX']['PREF']['ui_show_banner_preview']) && empty($_GET['nopreview'])) {
require_once MAX_PATH . '/lib/max/Delivery/adRender.php';
$aBanner = Admin_DA::getAd($bannerId);
$aBanner['storagetype'] = $aBanner['type'];
$aBanner['bannerid'] = $aBanner['ad_id'];
$bannerCode = MAX_adRender($aBanner, 0, '', '', '', true, '', false, false);
} else {
$bannerCode = '';
}
$advertiserDetails = phpAds_getClientDetails($advertiserId);
$advertiserName = $advertiserDetails['clientname'];
$campaignDetails = Admin_DA::getPlacement($campaignId);
$campaignName = $campaignDetails['name'];
$bannerName = $aOtherBanners[$bannerId]['name'];
$builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
$oHeaderModel = $builder->buildEntityHeader(array(array("name" => $advertiserName, "url" => $advertiserEditUrl), array("name" => $campaignName, "url" => $campaignEditUrl), array("name" => $bannerName)), "banner", $pageType);
global $phpAds_breadcrumbs_extra;
$phpAds_breadcrumbs_extra .= "<div class='bannercode'>{$bannerCode}</div>";
if ($bannerCode != '') {
$phpAds_breadcrumbs_extra .= "<br />";
}
addPageLinkTool($GLOBALS["strDuplicate"], MAX::constructUrl(MAX_URL_ADMIN, "plugins/oxMarkedTextAdvertiser/banner-modify.php?duplicate=true&clientid={$advertiserId}&campaignid={$campaignId}&bannerid={$bannerId}&returnurl=" . urlencode(basename($_SERVER['SCRIPT_NAME']))), "iconBannerDuplicate");
addPageShortcut($GLOBALS['strBackToBanners'], MAX::constructUrl(MAX_URL_ADMIN, "campaign-banners.php?clientid={$advertiserId}&campaignid={$campaignId}"), "iconBack");
$entityString = _getEntityString($aEntities);
addPageShortcut($GLOBALS['strBannerHistory'], MAX::constructUrl(MAX_URL_ADMIN, "stats.php?entity=banner&breakdown=history&{$entityString}"), 'iconStatistics');
phpAds_PageHeader('advertiser-campaigns', $oHeaderModel);
$oTpl = new OA_Admin_Template('banner-edit.html');
$oTpl->assign('clientId', $clientid);
$oTpl->assign('campaignId', $campaignid);
$oTpl->assign('bannerId', $bannerid);
$oTpl->assign('bannerTypes', $bannerTypes);
$oTpl->assign('bannerType', 'bannerTypeText:oxMarkedText:oxMarkedTextComponent');
$oTpl->assign('bannerHeight', $aBanner["height"]);
$oTpl->assign('bannerWidth', $aBanner["width"]);
$oTpl->assign('disabled', $formDisabled);
$oTpl->assign('form', $form->serialize());
$oTpl->display();
phpAds_PageFooter();
}
示例5: getCookiePath
public function getCookiePath()
{
require_once MAX_PATH . '/lib/Max.php';
return parse_url(MAX::constructUrl(MAX_URL_ADMIN), PHP_URL_PATH);
}
示例6: htmlspecialchars
$day = htmlspecialchars($day);
$listorder = htmlspecialchars($listorder);
$orderdirection = htmlspecialchars($orderdirection);
if (!($orderdirection == 'up' || $orderdirection == 'down')) {
if (stristr($orderdirection, 'down')) {
$orderdirection = 'down';
} else {
$orderdirection = 'up';
}
}
if (isset($graphFilter) && is_array($graphFilter)) {
// Remove old filter fileds from link
$REQUEST_URI = $_SERVER['REQUEST_URI'];
$REQUEST_URI = preg_replace('/graphFields\\[\\]=(.*)$/', '', $REQUEST_URI);
$REQUEST_URI = substr(strrchr($REQUEST_URI, '/'), 1);
$redirectUrl = MAX::constructUrl(MAX_URL_ADMIN, $REQUEST_URI);
foreach ($graphFilter as $k => $v) {
$redirectUrl .= '&graphFields[]=' . $v;
}
header("Location: {$redirectUrl}");
die;
} else {
$graphFilter = isset($graphFields) ? $graphFields : null;
}
// Handle filters
if (!empty($advertiser_id)) {
$clientid = (int) $advertiser_id;
}
if (!empty($placement_id)) {
$campaignid = (int) $placement_id;
}