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


PHP MAX_adRender函数代码示例

本文整理汇总了PHP中MAX_adRender函数的典型用法代码示例。如果您正苦于以下问题:PHP MAX_adRender函数的具体用法?PHP MAX_adRender怎么用?PHP MAX_adRender使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: test_MAX_adRender

 /**
  * TODO: need data
  *
  */
 function test_MAX_adRender()
 {
     //		$this->sendMessage('test_MAX_adRender');
     //		require_once MAX_PATH . '/lib/max/Delivery/common.php';
     // note: following code to extract test data from db
     //      require_once MAX_PATH . '/lib/max/Delivery/tests/data/test_adRenderImage.php';
     //	    $return = _adRenderImage($aBanner, $zoneId, $source, $target, $ct0, $withText, $logClick, $logView, $richMedia, $loc, $referer, $context);
     //		$this->assertEqual($return, $result);
     // Silly test, test patch OX-2091
     require MAX_PATH . '/lib/max/Delivery/tests/data/test_adRenderImage.php';
     $this->assertNull($aBanner['bannerContent']);
     $this->assertNull($aBanner['logUrl']);
     $this->assertNull($aBanner['clickUrl']);
     $return = MAX_adRender($aBanner);
     $this->assertTrue($aBanner['bannerContent']);
     $this->assertTrue($aBanner['logUrl']);
     $this->assertTrue($aBanner['clickUrl']);
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:22,代码来源:adRender.del.test.php

示例2: MAX_adSelect

function MAX_adSelect($what, $campaignid = '', $target = '', $source = '', $withtext = 0, $charset = '', $context = array(), $richmedia = true, $ct0 = '', $loc = '', $referer = '')
{
    $conf = $GLOBALS['_MAX']['CONF'];
    if (empty($GLOBALS['source'])) {
        $GLOBALS['source'] = $source;
    }
    if (empty($GLOBALS['loc'])) {
        $GLOBALS['loc'] = $loc;
    }
    $originalZoneId = null;
    if (strpos($what, 'zone:') === 0) {
        $originalZoneId = intval(substr($what, 5));
    } elseif (strpos($what, 'campaignid:') === 0) {
        $originalCampaignId = intval(substr($what, 11));
    } elseif (strpos($what, 'bannerid:') === 0) {
        $originalBannerId = intval(substr($what, 9));
    }
    $userid = MAX_cookieGetUniqueViewerId();
    MAX_cookieAdd($conf['var']['viewerId'], $userid, _getTimeYearFromNow());
    $outputbuffer = '';
    $found = false;
    $GLOBALS['_MAX']['followedChain'] = array();
    $GLOBALS['_MAX']['adChain'] = array();
    $GLOBALS['_MAX']['considered_ads'] = array();
    $first = true;
    global $g_append, $g_prepend;
    $g_append = '';
    $g_prepend = '';
    if (!empty($what)) {
        while ($first || $what != '' && $found == false) {
            $first = false;
            $ix = strpos($what, '|');
            if ($ix === false) {
                $remaining = '';
            } else {
                $remaining = substr($what, $ix + 1);
                $what = substr($what, 0, $ix);
            }
            if (strpos($what, 'zone:') === 0) {
                $zoneId = intval(substr($what, 5));
                $row = _adSelectZone($zoneId, $context, $source, $richmedia);
            } else {
                if (strpos($what, '/') > 0) {
                    if (strpos($what, '@') > 0) {
                        list($what, $append) = explode('@', $what);
                    } else {
                        $append = '';
                    }
                    $separate = explode('/', $what);
                    $expanded = '';
                    $collected = array();
                    reset($separate);
                    while (list(, $v) = each($separate)) {
                        $expanded .= ($expanded != '' ? ',+' : '') . $v;
                        $collected[] = $expanded . ($append != '' ? ',+' . $append : '');
                    }
                    $what = strtok(implode('|', array_reverse($collected)), '|');
                    $remaining = strtok('') . ($remaining != '' ? '|' . $remaining : '');
                }
                $row = _adSelectDirect($what, $campaignid, $context, $source, $richmedia, $remaining == '');
            }
            if (is_array($row) && empty($row['default'])) {
                MAX_Delivery_log_logAdRequest($row['bannerid'], $row['zoneid'], $row);
                if (($row['adserver'] == 'max' || $row['adserver'] == '3rdPartyServers:ox3rdPartyServers:max') && preg_match("#{$conf['webpath']['delivery']}.*zoneid=([0-9]+)#", $row['htmltemplate'], $matches) && !stristr($row['htmltemplate'], $conf['file']['popup'])) {
                    $GLOBALS['_MAX']['adChain'][] = $row;
                    $found = false;
                    $what = "zone:{$matches[1]}";
                } else {
                    $found = true;
                }
            } else {
                MAX_Delivery_log_logAdRequest(null, $originalZoneId, null);
                $what = $remaining;
            }
        }
    }
    if ($found) {
        $zoneId = empty($row['zoneid']) ? 0 : $row['zoneid'];
        if (!empty($GLOBALS['_MAX']['adChain'])) {
            foreach ($GLOBALS['_MAX']['adChain'] as $index => $ad) {
                if ($ad['ad_id'] != $row['ad_id'] && !empty($ad['append'])) {
                    $row['append'] .= $ad['append'];
                }
            }
        }
        $outputbuffer = MAX_adRender($row, $zoneId, $source, $target, $ct0, $withtext, $charset, true, true, $richmedia, $loc, $referer, $context);
        $output = array('html' => $outputbuffer, 'bannerid' => $row['bannerid'], 'contenttype' => $row['contenttype'], 'alt' => $row['alt'], 'width' => $row['width'], 'height' => $row['height'], 'url' => $row['url'], 'campaignid' => $row['campaignid'], 'clickUrl' => $row['clickUrl'], 'logUrl' => $row['logUrl'], 'aSearch' => $row['aSearch'], 'aReplace' => $row['aReplace'], 'bannerContent' => $row['bannerContent'], 'clickwindow' => $row['clickwindow'], 'aRow' => $row, 'context' => _adSelectBuildContext($row, $context), 'iframeFriendly' => (bool) $row['iframe_friendly']);
        $row += array('block_ad' => 0, 'cap_ad' => 0, 'session_cap_ad' => 0, 'block_campaign' => 0, 'cap_campaign' => 0, 'session_cap_campaign' => 0, 'block_zone' => 0, 'cap_zone' => 0, 'session_cap_zone' => 0);
        if (MAX_Delivery_cookie_cappingOnRequest()) {
            if ($row['block_ad'] > 0 || $row['cap_ad'] > 0 || $row['session_cap_ad'] > 0) {
                MAX_Delivery_cookie_setCapping('Ad', $row['bannerid'], $row['block_ad'], $row['cap_ad'], $row['session_cap_ad']);
            }
            if ($row['block_campaign'] > 0 || $row['cap_campaign'] > 0 || $row['session_cap_campaign'] > 0) {
                MAX_Delivery_cookie_setCapping('Campaign', $row['campaign_id'], $row['block_campaign'], $row['cap_campaign'], $row['session_cap_campaign']);
            }
            if ($row['block_zone'] > 0 || $row['cap_zone'] > 0 || $row['session_cap_zone'] > 0) {
                MAX_Delivery_cookie_setCapping('Zone', $row['zoneid'], $row['block_zone'], $row['cap_zone'], $row['session_cap_zone']);
            }
            MAX_Delivery_log_setLastAction(0, array($row['bannerid']), array($zoneId), array($row['viewwindow']));
        }
//.........这里部分代码省略.........
开发者ID:hawodi,项目名称:revive-adserver,代码行数:101,代码来源:al.php

示例3: phpAds_buildBannerCode

function phpAds_buildBannerCode($bannerid, $fullpreview = false)
{
    include_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);
    return $bannerCode;
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:9,代码来源:lib-statistics.inc.php

示例4: strip_tags

| but WITHOUT ANY WARRANTY; without even the implied warranty of            |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
| GNU General Public License for more details.                              |
|                                                                           |
| You should have received a copy of the GNU General Public License         |
| along with this program; if not, write to the Free Software               |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: banner-htmlpreview.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/Delivery/adRender.php';
require_once MAX_PATH . '/lib/max/Admin_DA.php';
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
$aBanner = Admin_DA::getAd($bannerid);
$aBanner['bannerid'] = $aBanner['ad_id'];
if (!empty($aBanner)) {
    $conf = $GLOBALS['_MAX']['CONF'];
    $bannerName = strip_tags(phpAds_buildBannerName($bannerid, $aBanner['name'], $aBanner['alt']));
    $sizeDescription = $aBanner['type'] == 'txt' ? ' ' : "   width: {$aBanner['width']}  height: {$aBanner['height']}";
    $bannerCode = MAX_adRender($aBanner, 0, '', '', '', true, '', false, false);
    $protocol = $_SERVER['SERVER_PORT'] == $conf['openads']['sslPort'] ? "https" : "http";
    $deliveryUrl = $protocol . ':' . MAX_commonConstructPartialDeliveryUrl($conf['file']['flash']);
    echo "\n<html>\n<head>\n<title>{$bannerName}</title>\n<link rel='stylesheet' href='" . OX::assetPath() . "/css/interface-{$phpAds_TextDirection}.css'>\n<script type='text/javascript' src='{$deliveryUrl}'></script>\n</head>\n<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#EFEFEF'>\n<table cellpadding='0' cellspacing='0' border='0'>\n<tr height='32'>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-tl.gif' width='32' height='32'></td>\n    <td background='" . OX::assetPath() . "/images/ruler-top.gif'>&nbsp;</td>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-tr.gif' width='32' height='32'></td>\n</tr>\n<tr height='{$aBanner['height']}'>\n    <td width='32' background='" . OX::assetPath() . "/images/ruler-left.gif'>&nbsp;</td>\n    <td bgcolor='#FFFFFF' width='{$aBanner['width']}'>\n        {$bannerCode}\n    </td>\n    <td width='32'>&nbsp;</td>\n</tr>\n<tr height='32'>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-bl.gif' width='32' height='32'></td>\n    <td>{$sizeDescription}</td>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-br.gif' width='32' height='32'></td>\n</tr>\n</table>\n</body>\n</html>";
}
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:banner-htmlpreview.php

示例5: MAX_commonSendContentTypeHeader

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);
$append = !empty($aZone['append']) ? $aZone['append'] : '';
$title = !empty($aBanner['alt']) ? $aBanner['alt'] : 'Advertisement';
echo "\n<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n<head>\n<title>{$title}</title>";
if ($timeout > 0) {
    $timeoutMs = $timeout * 1000;
    echo "\n<script type='text/javascript'>\n<!--// <![CDATA[\n  window.setTimeout(\"window.close()\",{$timeoutMs});\n// ]]> -->\n</script>";
}
// Include the FlashObject script if required
if ($aBanner['contenttype'] == 'swf') {
    echo MAX_flashGetFlashObjectExternal();
}
echo "\n<style type='text/css'>\nbody {margin:0; height:100%; width:100%}\n</style>\n</head>\n<body>\n{$prepend}{$html}{$append}\n</body>\n</html>";
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:ac.php

示例6: MAX_adSelect

function MAX_adSelect($what, $campaignid = '', $target = '', $source = '', $withtext = 0, $charset = '', $context = array(), $richmedia = true, $ct0 = '', $loc = '', $referer = '')
{
    $conf = $GLOBALS['_MAX']['CONF'];
    // For local mode and XML-RPC calls the some parameters are not set in the global scope
    // So we need to override the empty globals with the values passed into this function.
    if (empty($GLOBALS['source'])) {
        $GLOBALS['source'] = $source;
    }
    if (empty($GLOBALS['loc'])) {
        $GLOBALS['loc'] = $loc;
    }
    // Store the original zone, campaign or banner IDs for later use
    if (strpos($what, 'zone:') === 0) {
        $originalZoneId = intval(substr($what, 5));
    } elseif (strpos($what, 'campaignid:') === 0) {
        $originalCampaignId = intval(substr($what, 11));
    } elseif (strpos($what, 'bannerid:') === 0) {
        $originalBannerId = intval(substr($what, 9));
    }
    $userid = MAX_cookieGetUniqueViewerID();
    MAX_cookieSet($conf['var']['viewerId'], $userid, _getTimeYearFromNow());
    $outputbuffer = '';
    // Set flag
    $found = false;
    // Reset followed zone chain
    $GLOBALS['_MAX']['followedChain'] = array();
    $GLOBALS['_MAX']['adChain'] = array();
    $first = true;
    global $g_append, $g_prepend;
    $g_append = '';
    $g_prepend = '';
    if (!empty($what)) {
        while ($first || $what != '' && $found == false) {
            $first = false;
            // Get first part, store second part
            $ix = strpos($what, '|');
            if ($ix === false) {
                $remaining = '';
            } else {
                $remaining = substr($what, $ix + 1);
                $what = substr($what, 0, $ix);
            }
            if (strpos($what, 'zone:') === 0) {
                $zoneId = intval(substr($what, 5));
                $row = _adSelectZone($zoneId, $context, $source, $richmedia);
            } else {
                // Expand paths to regular statements
                if (strpos($what, '/') > 0) {
                    if (strpos($what, '@') > 0) {
                        list($what, $append) = explode('@', $what);
                    } else {
                        $append = '';
                    }
                    $separate = explode('/', $what);
                    $expanded = '';
                    $collected = array();
                    reset($separate);
                    while (list(, $v) = each($separate)) {
                        $expanded .= ($expanded != '' ? ',+' : '') . $v;
                        $collected[] = $expanded . ($append != '' ? ',+' . $append : '');
                    }
                    $what = strtok(implode('|', array_reverse($collected)), '|');
                    $remaining = strtok('') . ($remaining != '' ? '|' . $remaining : '');
                }
                $row = _adSelectDirect($what, $campaignid, $context, $source, $richmedia, $remaining == '');
            }
            if (is_array($row) && empty($row['default'])) {
                // Log the ad request
                MAX_Delivery_log_logAdRequest($row['bannerid'], $row['zoneid'], $row);
                if (($row['adserver'] == 'max' || $row['adserver'] == '3rdPartyServers:ox3rdPartyServers:max') && preg_match("#{$conf['webpath']['delivery']}.*zoneid=([0-9]+)#", $row['htmltemplate'], $matches) && !stristr($row['htmltemplate'], $conf['file']['popup'])) {
                    // The ad selected was an OpenX HTML ad on the same server... do internal redirecty stuff
                    $GLOBALS['_MAX']['adChain'][] = $row;
                    $found = false;
                    $what = "zone:{$matches[1]}";
                } else {
                    $found = true;
                }
            } else {
                $what = $remaining;
            }
        }
    }
    // Return the banner information
    if ($found) {
        $zoneId = empty($row['zoneid']) ? 0 : $row['zoneid'];
        // For internal redirected creatives, make sure that any appended code in the adChain is appended
        if (!empty($GLOBALS['_MAX']['adChain'])) {
            foreach ($GLOBALS['_MAX']['adChain'] as $index => $ad) {
                if ($ad['ad_id'] != $row['ad_id'] && !empty($ad['append'])) {
                    $row['append'] .= $ad['append'];
                }
            }
        }
        $outputbuffer = MAX_adRender($row, $zoneId, $source, $target, $ct0, $withtext, $charset, true, true, $richmedia, $loc, $referer, $context);
        $output = array('html' => $outputbuffer, 'bannerid' => $row['bannerid'], 'contenttype' => $row['contenttype'], 'alt' => $row['alt'], 'width' => $row['width'], 'height' => $row['height'], 'url' => $row['url'], 'campaignid' => $row['campaignid'], 'clickUrl' => $row['clickUrl'], 'logUrl' => $row['logUrl'], 'aSearch' => $row['aSearch'], 'aReplace' => $row['aReplace'], 'bannerContent' => $row['bannerContent'], 'clickwindow' => $row['clickwindow'], 'aRow' => $row, 'context' => _adSelectBuildContext($row, $context));
        // If ad-logging is disabled, the log beacon won't be sent, so set the capping at request
        if (MAX_Delivery_cookie_cappingOnRequest()) {
            if ($row['block_ad'] > 0 || $row['cap_ad'] > 0 || $row['session_cap_ad'] > 0) {
                MAX_Delivery_cookie_setCapping('Ad', $row['bannerid'], $row['block_ad'], $row['cap_ad'], $row['session_cap_ad']);
            }
//.........这里部分代码省略.........
开发者ID:villos,项目名称:tree_admin,代码行数:101,代码来源:alocal.php

示例7: MAX_bannerPreview

function MAX_bannerPreview($bannerId)
{
    require_once MAX_PATH . '/lib/max/Delivery/adRender.php';
    $aBanner = Admin_DA::getAd($bannerId);
    $aBanner['storagetype'] = $aBanner['type'];
    $aBanner['bannerid'] = $aBanner['ad_id'];
    if ($aBanner['contenttype'] == 'swf') {
        return MAX_adRender($aBanner, 0, '', '', '', true, '', false, false) . "<br /><br />" . _adRenderImage($aBanner, 0, '', '', true, false, false, true);
    } else {
        return MAX_adRender($aBanner, 0, '', '', '', true, '', false, false);
    }
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:12,代码来源:html.php

示例8: 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();
}
开发者ID:rcdesign-cemetery,项目名称:openx-markedtext,代码行数:68,代码来源:banner-edit.php

示例9: MAX_displayNavigationBanner

function MAX_displayNavigationBanner($pageName, $aOtherCampaigns, $aOtherBanners, $aEntities)
{
    global $phpAds_TextDirection;
    $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}";
    }
    // Build ad preview
    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 />";
    }
    addBannerPageTools($advertiserId, $campaignId, $bannerId, $aOtherCampaigns, $aOtherBanners, $aEntities);
    phpAds_PageHeader($tabValue, $oHeaderModel);
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:49,代码来源:html.php


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