function displayPage($form, $aMessages = '')
{
    phpAds_PageHeader('devtools-plugins', '', '../../');
    $oTpl = new OA_Plugin_Template('oxPlugin.html', 'oxPlugin');
    //$oTpl->debugging = true;
    $oTpl->assign('aMessages', $aMessages);
    $oTpl->assign('form', $form->serialize());
    $oTpl->display();
    phpAds_PageFooter();
}
}
if (!isset($listorder)) {
    if (isset($session['prefs']['campaign-banners.php'][$campaignid]['listorder'])) {
        $listorder = $session['prefs']['campaign-banners.php'][$campaignid]['listorder'];
    } else {
        $listorder = '';
    }
}
if (!isset($orderdirection)) {
    if (isset($session['prefs']['campaign-banners.php'][$campaignid]['orderdirection'])) {
        $orderdirection = $session['prefs']['campaign-banners.php'][$campaignid]['orderdirection'];
    } else {
        $orderdirection = '';
    }
}
$oTpl = new OA_Plugin_Template('oxMarkedTextAdvertiser.html', 'oxMarkedTextAdvertiser');
$doBanners = OA_Dal::factoryDO('banners');
$doBanners->campaignid = $campaignid;
$doBanners->addListorderBy($listorder, $orderdirection);
$doBanners->selectAdd('storagetype AS type');
$doBanners->find();
$countActive = 0;
while ($doBanners->fetch() && ($row = $doBanners->toArray())) {
    $banners[$row['bannerid']] = $row;
    $banners[$row['bannerid']]['active'] = $banners[$row['bannerid']]["status"] == OA_ENTITY_STATUS_RUNNING;
    $banners[$row['bannerid']]['description'] = $strUntitled;
    if (isset($banners[$row['bannerid']]['alt']) && $banners[$row['bannerid']]['alt'] != '') {
        $banners[$row['bannerid']]['description'] = $banners[$row['bannerid']]['alt'];
    }
    $campaign_details = Admin_DA::getPlacement($row['campaignid']);
    $campaignAnonymous = $campaign_details['anonymous'] == 't' ? true : false;
<?php

/*
+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
require_once 'testPlugin-common.php';
phpAds_PageHeader("test-plugin-0", '', '../../');
$oTpl = new OA_Plugin_Template('testPlugin.html', 'testPlugin');
$message = 'Test Plugin';
$oTpl->assign('message', $message);
$oTpl->display();
$dispatcher = OA_Admin_Plugins_EventDispatcher::singleton();
$context = new OA_Admin_Plugins_EventContext();
$context->pageId = 'test-plugin-0';
$context->templates = array();
$templates = $dispatcher->onAfterContent($context);
//process results
foreach ($templates as $oPluginTemplate) {
    if (is_a($oPluginTemplate, 'Smarty')) {
        $oPluginTemplate->display();
    }
}
phpAds_PageFooter();
        case '4-1':
            OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
            $message = 'Dynamic submenu 4-1';
            $menu = 'demo-menu-4';
            // PageHeader function needs to know the *parent* menu
            setCurrentLeftMenuSubItem('demo-menu-4-1');
            break;
        case '4-2':
            OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
            $message = 'Dynamic submenu 4-2';
            $menu = 'demo-menu-4';
            // PageHeader function needs to know the *parent* menu
            setCurrentLeftMenuSubItem('demo-menu-4-2');
            break;
    }
    $colour = $GLOBALS['_MAX']['PREF']['demoUserInterface_demopref_' . OA_Permission::getAccountType(true)];
    //$image   = 'demoUI'.$i.'.jpg';
    $message = $message;
    addLeftMenuSubItem('demo-menu-4-1', 'demo submenu 4-1', 'plugins/demoUserInterface/demoUI-page.php?action=4-1');
    addLeftMenuSubItem('demo-menu-4-2', 'demo submenu 4-2', 'plugins/demoUserInterface/demoUI-page.php?action=4-2');
    phpAds_PageHeader($menu, '', '../../');
    $oTpl = new OA_Plugin_Template('demoUI.html', 'demoUserInterface');
    //$oTpl->assign('image',$image);
    $oTpl->assign('message', $message);
    $oTpl->assign('colour', $colour);
    $oTpl->display();
    phpAds_PageFooter();
} else {
    require_once LIB_PATH . '/Admin/Redirect.php';
    OX_Admin_Redirect::redirect('plugins/demoUserInterface/demoUI-index.php');
}
<?php

/*
+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
require_once 'oxToolbox-common.php';
phpAds_PageHeader("devtools-home", '', '../../');
$oTpl = new OA_Plugin_Template('oxToolbox.html', 'oxToolbox');
$oTpl->display();
phpAds_PageFooter();
Esempio n. 6
0
<?php

require_once '../../../../init.php';
require_once '../../config.php';
require_once MAX_PATH . '/lib/OA/Admin/TemplatePlugin.php';
$production = $GLOBALS['_MAX']['CONF']['debug']['production'];
$urlIframe = "./players-content.html";
// TEMPLATE
$oTpl = new OA_Plugin_Template('players.html', 'openXVideoAds');
$oTpl->assign('urlIframe', $urlIframe);
phpAds_PageHeader("players-vast", '', '../../');
$oTpl->display();
phpAds_PageFooter();
function display_page($banner_id, $campaign_id, $client_id)
{
    $page_name = basename($_SERVER['PHP_SELF']);
    $entities = array('clientid' => $client_id, 'campaignid' => $campaign_id, 'bannerid' => $banner_id);
    $entity_id = OA_Permission::getEntityId();
    if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
        $entity_type = 'advertiser_id';
    } else {
        $entity_type = 'agency_id';
    }
    // Display navigation
    $other_campaigns = Admin_DA::getPlacements(array($entity_type => $entity_id));
    $other_banners = Admin_DA::getAds(array('placement_id' => $campaign_id), false);
    displayNavigationBanner($page_name, $other_campaigns, $other_banners, $entities);
    if (!empty($banner_id)) {
        $template_id = OA_Dal::factoryDO('Zpbanners')->get_zp_banner_id((int) $banner_id);
        $form = explode('|', form_ajax_request($template_id));
    }
    $template = new OA_Plugin_Template('designer-form.html', 'bannerDesigner');
    //$oTpl->debugging = true;
    $template->assign('bannerid', $banner_id);
    $template->assign('campaignid', $campaign_id);
    $template->assign('clientid', $client_id);
    $template->assign('template_id', $template_id);
    $template->assign('form', $form);
    $template->display();
    phpAds_PageFooter();
}
<?php

/*
+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
/**
 * OpenX Schema Management Utility
 */
require_once '../../../../init.php';
require_once '../../config.php';
phpAds_PageHeader("devtools-schema", '', '../../');
require_once MAX_PATH . '/lib/OA/Admin/TemplatePlugin.php';
$oTpl = new OA_Plugin_Template('oxSchema-frame.html', 'oxSchema');
$oTpl->debugging = false;
$src = $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . '/oxSchema-frame.php';
$oTpl->assign('src', $src);
$oTpl->display();
phpAds_PageFooter();
            if ($entity == 'website') {
                // Websites expand to Zones
                $selectedDimensionExpanded = 'zone';
            } else {
                // Date do not expand when looking at Banners or Zones
                $selectedDimensionExpanded = false;
            }
        }
    }
}
if ($selectedDimensionExpanded && !empty($expandId)) {
    $expandedDataTable = $videoReport->getVastStatistics($entity, $entityId, $selectedDimensionExpanded, $startDate, $endDate, $dimension, $expandId);
}
$isThereAnyData = @$summaryRow[1] > 0;
// TEMPLATE
$oTpl = new OA_Plugin_Template('video-report.html', 'openXVideoAds');
$oTpl->register_function('url', 'smarty_function_url');
$oTpl->register_modifier('formatNumber', 'smarty_modifier_formatNumber');
$oTpl->assign('isThereAnyData', $isThereAnyData);
$oTpl->assign('isThereAtLeastTwoDataPoints', $isThereAtLeastTwoDataPoints);
$oTpl->assign('entityName', ucfirst($entity));
$oTpl->assign('dataForTopGraphInJsonFormat', $topGraphJSON);
$oTpl->assign('dataForBottomGraphInJsonFormat', $bottomGraphJSON);
$oTpl->assign('dataTable', $dataTable);
$oTpl->assign('expandedDataTable', $expandedDataTable);
$oTpl->assign('selectedDimensionExpanded', urlencode($selectedDimensionExpanded));
$oTpl->assign('columns', $columns);
$oTpl->assign('summaryRow', $summaryRow);
$oTpl->assign('availableDateRanges', $availableDateRanges);
$oTpl->assign('thirtyDaysAgo', $thirtyDaysAgo);
$oTpl->assign('expandId', urlencode($expandId));