• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP OA_Permission类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OA_Central_M2M

 /**
  * Class constructor
  *
  * @param string $accountId If null, the current account ID is used
  * @param string $accountType If null, the current account type is used
  * @return OA_Central_M2M
  */
 function OA_Central_M2M($accountId = null)
 {
     parent::OA_Central_Common();
     $currentId = OA_Permission::getAccountId();
     if (is_null($accountId)) {
         $this->accountId = $currentId;
     } else {
         $this->accountId = $accountId;
     }
     if ($this->accountId == $currentId) {
         $this->accountType = OA_Permission::getAccountType();
     } else {
         $doAccounts = OA_Dal::factoryDO('accounts');
         $doAccounts->account_id = $this->accountId;
         $doAccounts->find();
         if ($doAccounts->fetch()) {
             $this->accountType = $doAccounts->account_type;
         } else {
             Max::raiseError('Unexisting account ID', null, PEAR_ERROR_DIE);
         }
     }
     if ($this->accountType == OA_ACCOUNT_ADMIN) {
         $this->accountId = 0;
     }
 }
开发者ID:villos,项目名称:tree_admin,代码行数:32,代码来源:M2M.php


示例2: processBanners

function processBanners($commit = false)
{
    $doBanners = OA_Dal::factoryDO('banners');
    if (OA_INSTALLATION_STATUS === OA_INSTALLATION_STATUS_INSTALLED && OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
        $doBanners->addReferenceFilter('agency', $agencyId = OA_Permission::getEntityId());
    }
    $doBanners->find();
    $different = 0;
    $same = 0;
    $errors = array();
    while ($doBanners->fetch()) {
        // Rebuild filename
        if ($doBanners->storagetype == 'sql' || $doBanners->storagetype == 'web') {
            $doBanners->imageurl = '';
        }
        $GLOBALS['_MAX']['bannerrebuild']['errors'] = false;
        if ($commit) {
            $doBannersClone = clone $doBanners;
            $doBannersClone->update();
            $newCache = $doBannersClone->htmlcache;
        } else {
            $newCache = phpAds_getBannerCache($doBanners->toArray());
        }
        if (empty($GLOBALS['_MAX']['bannerrebuild']['errors'])) {
            if ($doBanners->htmlcache != $newCache && $doBanners->storagetype == 'html') {
                $different++;
            } else {
                $same++;
            }
        } else {
            $errors[] = $doBanners->toArray();
        }
    }
    return array('errors' => $errors, 'different' => $different, 'same' => $same);
}
开发者ID:villos,项目名称:tree_admin,代码行数:35,代码来源:lib-banner-cache.inc.php


示例3: getWebsitesAndZonesByAgencyId

 function getWebsitesAndZonesByAgencyId($agencyId = null)
 {
     if (is_null($agencyId)) {
         $agencyId = OA_Permission::getAgencyId();
     }
     $prefix = $this->getTablePrefix();
     $oDbh = OA_DB::singleton();
     $tableW = $oDbh->quoteIdentifier($prefix . $this->table, true);
     $tableZ = $oDbh->quoteIdentifier($prefix . 'zones', true);
     // Select out websites only first (to ensure websites with no zones are included in the list)
     $aWebsitesAndZones = array();
     $query = "\n            SELECT\n                w.affiliateid AS website_id,\n                w.website     AS website_url,\n                w.name        AS website_name\n            FROM\n                {$tableW} AS w\n            WHERE\n                w.agencyid = " . DBC::makeLiteral($agencyId) . "\n            ORDER BY w.name";
     $rsAffiliates = DBC::NewRecordSet($query);
     $rsAffiliates->find();
     while ($rsAffiliates->fetch()) {
         $aWebsiteZone = $rsAffiliates->toArray();
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['name'] = $aWebsiteZone['website_name'];
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['url'] = $aWebsiteZone['website_url'];
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['zones'] = array();
     }
     $query = "\n        SELECT\n            w.affiliateid AS website_id,\n            w.website     AS website_url,\n            w.name        AS website_name,\n            z.zoneid      AS zone_id,\n            z.zonename    AS zone_name,\n            z.width       AS zone_width,\n            z.height      AS zone_height\n        FROM\n            {$tableW} AS w,\n            {$tableZ} AS z\n        WHERE\n            z.affiliateid = w.affiliateid\n          AND w.agencyid = " . DBC::makeLiteral($agencyId) . "\n        ORDER BY w.name";
     $rsAffiliatesAndZones = DBC::NewRecordSet($query);
     $rsAffiliatesAndZones->find();
     while ($rsAffiliatesAndZones->fetch()) {
         $aWebsiteZone = $rsAffiliatesAndZones->toArray();
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['name'] = $aWebsiteZone['website_name'];
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['url'] = $aWebsiteZone['website_url'];
         $aWebsitesAndZones[$aWebsiteZone['website_id']]['zones'][$aWebsiteZone['zone_id']] = array('name' => $aWebsiteZone['zone_name'], 'width' => $aWebsiteZone['zone_width'], 'height' => $aWebsiteZone['zone_height']);
     }
     return $aWebsitesAndZones;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:Affiliates.php


示例4: export

 /**
  * The method to generate a plugin-style report XLS from an already
  * prepared statistics page OA_Admin_Statistics_Common object.
  */
 function export()
 {
     // Prepare the report name
     // Get system navigation
     $oMenu = OA_Admin_Menu::singleton();
     // Get section by pageId
     $oCurrentSection = $oMenu->get($this->oStatsController->pageId);
     if ($oCurrentSection == null) {
         phpAds_Die($GLOBALS['strErrorOccurred'], 'Menu system error: <strong>' . OA_Permission::getAccountType(true) . '::' . htmlspecialchars($ID) . '</strong> not found for the current user');
     }
     // Get name
     $reportName = $oCurrentSection->getName();
     $this->_name = $reportName;
     // Prepare the output writer for generation
     $reportFileName = 'Exported Statistics - ' . $reportName;
     if (!empty($this->oStatsController->aDates['day_begin'])) {
         $oStartDate = new Date($this->oStatsController->aDates['day_begin']);
         $reportFileName .= ' from ' . $oStartDate->format($GLOBALS['date_format']);
     }
     if (!empty($this->oStatsController->aDates['day_end'])) {
         $oEndDate = new Date($this->oStatsController->aDates['day_end']);
         $reportFileName .= ' to ' . $oEndDate->format($GLOBALS['date_format']);
     }
     $reportFileName .= '.xls';
     $this->_oReportWriter->openWithFilename($reportFileName);
     // Get the header and data arrays from the same statistics controllers
     // that prepare stats for the user interface stats pages
     list($aHeaders, $aData) = $this->getHeadersAndDataFromStatsController(null, $this->oStatsController);
     // Add the worksheet
     $name = ucfirst($this->oStatsController->entity) . ' ' . ucfirst($this->oStatsController->breakdown);
     $this->createSubReport($reportName, $aHeaders, $aData);
     // Close the report writer and send the report to the user
     $this->_oReportWriter->closeAndSend();
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:38,代码来源:Export.php


示例5: mergeData

 /**
  * Merge aggregate stats with entity properties (name, children, etc)
  *
  * The overridden method also takes care to remove inactive entities
  * and to enforce the anonymous properties when logged in as advertiser
  * or publisher
  *
  * @param array Query parameters
  * @param string Key name
  * @return array Full entity stats with entity data
  */
 function mergeData($aParams, $key)
 {
     $aEntitiesData = parent::mergeData($aParams, $key);
     if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER) || OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         if (is_null($this->aAnonAdvertisers)) {
             $this->aAnonAdvertisers = array();
             $this->aAnonPlacements = array();
             $aPlacements = Admin_DA::fromCache('getPlacements', array('placement_anonymous' => 't'));
             foreach ($aPlacements as $placementId => $placement) {
                 $this->aAnonAdvertisers[$placement['advertiser_id']] = true;
                 $this->aAnonPlacements[$placementId] = true;
             }
         }
     }
     foreach (array_keys($aEntitiesData) as $entityId) {
         if (!isset($this->data[$key][$entityId])) {
             unset($aEntitiesData[$entityId]);
         } elseif ($key == 'advertiser_id' && isset($this->aAnonAdvertisers[$entityId])) {
             $aEntitiesData[$entityId]['hidden'] = true;
         } elseif ($key == 'placement_id' && isset($this->aAnonPlacements[$entityId])) {
             $aEntitiesData[$entityId]['hidden'] = true;
         } elseif ($key == 'ad_id' && isset($this->aAnonPlacements[$aEntitiesData[$entityId]['placement_id']])) {
             $aEntitiesData[$entityId]['hidden'] = true;
         } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
             if (isset($aParams['placement_id'])) {
                 $aEntitiesData[$entityId]['hidden'] = isset($this->aAnonPlacements[$aParams['placement_id']]);
             } else {
                 $aEntitiesData[$entityId]['hidden'] = isset($this->aAnonAdvertisers[OA_Permission::getEntityId()]);
             }
         }
     }
     return $aEntitiesData;
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:44,代码来源:CommonCrossEntity.php


示例6: checkAccess

 /**
  * A method to check for permissions to display the widget
  *
  */
 function checkAccess()
 {
     if (empty($this->accessList)) {
         $this->accessList = array(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
     }
     OA_Permission::enforceAccount($this->accessList);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:11,代码来源:Widget.php


示例7: beforePageHeader

 public function beforePageHeader(OX_Admin_UI_Event_EventContext $oEventContext)
 {
     $pageId = $oEventContext->data['pageId'];
     $pageData = $oEventContext->data['pageData'];
     $oHeaderModel = $oEventContext->data['headerModel'];
     $agencyId = $pageData['agencyid'];
     $campaignId = $pageData['campaignid'];
     $advertiserId = $pageData['clientid'];
     $oEntityHelper = $this->oMarkedTextAdvertiserComponent->getEntityHelper();
     if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         switch ($pageId) {
             case 'campaign-banners':
                 $oDalZones = OA_Dal::factoryDAL('zones');
                 $linkedWebsites = $oDalZones->getWebsitesAndZonesListByCategory($agencyId, null, $campaignId, true);
                 $arraylinkedWebsitesKeys = array_keys($linkedWebsites);
                 $linkedWebsitesKey = $arraylinkedWebsitesKeys[0];
                 $arraylinkedZonesKeys = array_keys($linkedWebsites[$linkedWebsitesKey]['zones']);
                 $zoneId = $arraylinkedZonesKeys[0];
                 $aZone = Admin_DA::getZone($zoneId);
                 if ($aZone['type'] == 3) {
                     if (OA_Permission::hasAccessToObject('clients', $clientid) && OA_Permission::hasAccessToObject('campaigns', $campaignid)) {
                         OX_Admin_Redirect::redirect('plugins/' . $this->oMarkedTextAdvertiserComponent->group . "/oxMarkedTextAdvertiser-index.php?campaignid={$campaignId}&clientid={$advertiserId}");
                     }
                 }
                 break;
         }
     }
 }
开发者ID:rcdesign-cemetery,项目名称:openx-markedtext,代码行数:28,代码来源:EntityScreenManager.php


示例8: start

 /**
  * The final "child" implementation of the parental abstract method.
  *
  * @see OA_Admin_Statistics_Common::start()
  */
 function start()
 {
     // Get parameters
     $advertiserId = $this->_getId('advertiser');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId);
     // 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.1';
         $this->aPageSections = array('2.1.1', '2.1.2', '2.1.3');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.1';
         $this->aPageSections = array('1.1', '1.2', '1.3');
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('advertiser', $advertiserId);
     // Add context
     $this->aPageContext = array('advertisers', $advertiserId);
     // Add shortcuts
     if (!OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->_addShortcut($GLOBALS['strClientProperties'], 'advertiser-edit.php?clientid=' . $advertiserId, 'images/icon-advertiser.gif');
     }
     // Prepare the data for display by output() method
     $aParams = array('advertiser_id' => $advertiserId);
     $this->prepare($aParams, 'stats.php');
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:39,代码来源:AdvertiserHistory.php


示例9: parseEntityParams

 private function parseEntityParams($aEntityParams)
 {
     $aMap = array('advertiser' => array('clientid'), 'campaign' => array('clientid', 'campaignid'), 'banner' => array('clientid', 'campaignid', 'bannerid'), 'affiliate' => array('affiliateid'), 'zone' => array('affiliateid', 'zoneid'));
     if (empty($aEntityParams['entity'])) {
         if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
             $aEntityParams['entity'] = 'advertiser';
         } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
             $aEntityParams['entity'] = 'affiliate';
         } else {
             $aEntityParams['entity'] = 'global';
         }
     }
     if ($aEntityParams['entity'] != 'global') {
         $allowed = implode('|', array_keys($aMap));
         if (!preg_match('/^(' . $allowed . ')(?:-(' . $allowed . '))?$/D', $aEntityParams['entity'], $aMatches)) {
             throw new exception("Unsupported entity breakdown");
         }
         array_shift($aMatches);
         $this->entity = join('-', $aMatches);
         foreach ($aMatches as $type) {
             foreach ($aMap[$type] as $inputVar) {
                 $this->aEntityParams[$inputVar] = !empty($aEntityParams[$inputVar]) ? (int) $aEntityParams[$inputVar] : 0;
             }
         }
     } else {
         $this->entity = 'global';
     }
 }
开发者ID:SamWinchester,项目名称:revive-adserver,代码行数:28,代码来源:apGraph.php


示例10: OA_footerNavigation

function OA_footerNavigation()
{
    echo "\n    <script language='JavaScript'>\n    <!--\n    ";
    if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
        echo "function MMM_cascadePermissionsChange()\n        {\n            var e = findObj('permissions_" . OA_PERM_ZONE_EDIT . "');\n            var a = findObj('permissions_" . OA_PERM_ZONE_ADD . "');\n            var d = findObj('permissions_" . OA_PERM_ZONE_DELETE . "');\n\n            a.disabled = d.disabled = !e.checked;\n            if (!e.checked) {\n                a.checked = d.checked = false;\n            }\n        }\n        MMM_cascadePermissionsChange();\n        //-->";
    }
    echo "</script>";
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:8,代码来源:affiliate-user.php


示例11: display

 /**
  * A method to launch and display the widget
  *
  */
 function display()
 {
     $aConf = $GLOBALS['_MAX']['CONF'];
     $oTpl = new OA_Admin_Template('dashboard/disabled.html');
     $oDashboard = new OA_Central_Dashboard();
     $oTpl->assign('isAdmin', OA_Permission::isAccount(OA_ACCOUNT_ADMIN));
     $oTpl->display();
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:12,代码来源:Disabled.php


示例12: 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');
     // Security check
     OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
     $this->_checkAccess(array('advertiser' => $advertiserId, 'placement' => $placementId));
     // Add standard page parameters
     $this->aPageParams = array('clientid' => $advertiserId, 'campaignid' => $placementId);
     // 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';
         $this->aPageSections = array('2.1.2.1', '2.1.2.2', '2.1.2.3', '2.1.2.4');
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $this->pageId = '1.2.2';
         $this->aPageSections = array('1.2.1', '1.2.2', '1.2.3');
     }
     // Add breadcrumbs
     $this->_addBreadcrumbs('campaign', $placementId);
     // Add context
     $this->aPageContext = array('campaigns', $placementId);
     // 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->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['placement_id'] = $placementId;
     $this->aEntitiesData = $this->getBanners($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['strInactiveBannersHidden']}";
     // Save prefs
     $this->aPagePrefs['startlevel'] = $this->startLevel;
     $this->aPagePrefs['nodes'] = implode(",", $this->aNodes);
     $this->aPagePrefs['hideinactive'] = $this->hideInactive;
     $this->aPagePrefs['startlevel'] = $this->startLevel;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:61,代码来源:CampaignBanners.php


示例13: phpAds_MaintenanceSelection

function phpAds_MaintenanceSelection($subSection, $mainSection = 'maintenance')
{
    global $phpAds_TextDirection, $strBanners, $strCache, $strChooseSection, $strPriority, $strSourceEdit, $strStats, $strStorage, $strMaintenance, $strCheckForUpdates, $strViewPastUpdates, $strEncoding, $strDeliveryLimitations, $strAppendCodes, $strMenus, $strPlugins;
    ?>
<script language="JavaScript">
<!--
function maintenance_goto_section()
{
    s = document.maintenance_selection.section.selectedIndex;

    s = document.maintenance_selection.section.options[s].value;
    document.location = '<?php 
    echo $mainSection;
    ?>
-' + s + '.php';
}
// -->
</script>
<?php 
    $conf =& $GLOBALS['_MAX']['CONF'];
    $pref =& $GLOBALS['_MAX']['PREF'];
    echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
    echo "<tr><form name='maintenance_selection'><td height='35'>";
    echo "<b>" . $strChooseSection . ":&nbsp;</b>";
    echo "<select name='section' onChange='maintenance_goto_section();'>";
    if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
        if ($mainSection == 'updates') {
            echo "<option value='product'" . ($subSection == 'product' ? ' selected' : '') . ">" . $strCheckForUpdates . "</option>";
            echo "<option value='history'" . ($subSection == 'history' ? ' selected' : '') . ">" . $strViewPastUpdates . "</option>";
        } else {
            echo "<option value='maintenance'" . ($subSection == 'maintenance' ? ' selected' : '') . ">" . $strMaintenance . "</option>";
            echo "<option value='banners'" . ($subSection == 'banners' ? ' selected' : '') . ">" . $strBanners . "</option>";
            echo "<option value='priority'" . ($subSection == 'priority' ? ' selected' : '') . ">" . $strPriority . "</option>";
            $login = 'ftp://' . $conf['store']['ftpUsername'] . ':' . $conf['store']['ftpPassword'] . '@' . $conf['store']['ftpHost'] . '/' . $conf['store']['ftpPath'];
            if ($conf['allowedBanners']['web'] == true && ($conf['store']['mode'] == 0 && $conf['store']['webDir'] != '' || $conf['store']['mode'] == 1 && $login != '') && $conf['webpath']['images'] != '') {
                echo "<option value='storage'" . ($subSection == 'storage' ? ' selected' : '') . ">" . $strStorage . "</option>";
            }
            //            if (!isset($conf['delivery']['cache']) || $conf['delivery']['cache'] != 'none')
            //                echo "<option value='cache'".($subSection == 'zones' ? ' selected' : '').">".$strCache."</option>";
            if ($conf['delivery']['acls']) {
                echo "<option value='acls'" . ($subSection == 'acls' ? ' selected' : '') . ">" . $strDeliveryLimitations . "</option>";
            }
            echo "<option value='appendcodes'" . ($subSection == 'appendcodes' ? ' selected' : '') . ">" . $strAppendCodes . "</option>";
            echo "<option value='encoding'" . ($subSection == 'encoding' ? ' selected' : '') . ">{$strEncoding}</option>";
            echo "<option value='menus'" . ($subSection == 'menus' ? ' selected' : '') . ">" . $strMenus . "</option>";
            echo "<option value='plugins'" . ($subSection == 'plugins' ? ' selected' : '') . ">" . $strPlugins . "</option>";
        }
    }
    // Switched off
    // echo "<option value='finance'".($subSection == 'finance' ? ' selected' : '').">Finance</option>";
    echo "</select>&nbsp;<a href='javascript:void(0)' onClick='maintenance_goto_section();'>";
    echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/go_blue.gif' border='0'></a>";
    echo "</td></form></tr>";
    echo "</table>";
    phpAds_ShowBreak();
}
开发者ID:villos,项目名称:tree_admin,代码行数:56,代码来源:lib-maintenance.inc.php


示例14: clearEntitiesInSession

 private function clearEntitiesInSession()
 {
     global $session;
     $clientid = $session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'];
     unset($session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid']);
     if ($clientid) {
         unset($session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['campaignid'][$clientid]);
     }
     phpAds_SessionDataStore();
 }
开发者ID:rcdesign-cemetery,项目名称:openx-markedtext,代码行数:10,代码来源:oxMarkedTextAdvertiserEntityChecker.php


示例15: getAgencyDetails

 function getAgencyDetails($agencyId = null)
 {
     if (is_null($agencyId)) {
         $agencyId = OA_Permission::getAgencyId();
     }
     $doAgency =& OA_Dal::factoryDO('agency');
     $doAgency->get($agencyId);
     $aResult = $doAgency->toArray();
     return $aResult;
 }
开发者ID:rcdesign-cemetery,项目名称:openx-markedtext,代码行数:10,代码来源:oxMarkedTextAdvertiser.class.php


示例16: setDefaultForAdd

 /**
  * This method sets all default values when adding a new channel.
  *
  */
 function setDefaultForAdd()
 {
     if (empty($this->agencyId)) {
         $this->agencyId = OA_Permission::getAgencyId();
     }
     if (empty($this->websiteId)) {
         // Set it to 'global'
         $this->websiteId = 0;
     }
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:14,代码来源:ChannelInfo.php


示例17: 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;
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:59,代码来源:GlobalAffiliates.php


示例18: OA_HeaderNavigation

function OA_HeaderNavigation()
{
    global $agencyid;
    if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
        phpAds_PageHeader("agency-access");
        $doAgency = OA_Dal::staticGetDO('agency', $agencyid);
        MAX_displayInventoryBreadcrumbs(array(array("name" => $doAgency->name)), "agency");
    } else {
        phpAds_PageHeader("agency-user");
    }
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:11,代码来源:agency-user.php


示例19: assignModel

 public static function assignModel(OA_Admin_Template $template, $query = '')
 {
     $accounts = OA_Permission::getLinkedAccounts(true, true);
     $remainingCounts = array();
     // Prepare recently used accountName
     $recentlyUsed = array();
     global $session;
     if (empty($query) && !empty($session['recentlyUsedAccounts'])) {
         $allAcountsNoGroups = array();
         foreach ($accounts as $k => $v) {
             foreach ($accounts[$k] as $accountId => $accountName) {
                 $allAcountsNoGroups[$accountId] = $accountName;
             }
         }
         $recentlyUsedAccountIds = $session['recentlyUsedAccounts'];
         $added = 0;
         foreach ($recentlyUsedAccountIds as $k => $recentlyUserAccountId) {
             if (++$added > self::MAX_ACCOUNTS_IN_GROUP) {
                 break;
             }
             $recentlyUsed[$recentlyUserAccountId] = $allAcountsNoGroups[$recentlyUserAccountId];
         }
     }
     // Prepare admin accounts
     if (isset($accounts[OA_ACCOUNT_ADMIN])) {
         $adminAccounts = self::filterByNameAndLimit($accounts[OA_ACCOUNT_ADMIN], $query, $remainingCounts, OA_ACCOUNT_ADMIN);
         unset($accounts[OA_ACCOUNT_ADMIN]);
     } else {
         $adminAccounts = array();
     }
     $showSearchAndRecent = false;
     foreach ($accounts as $k => $v) {
         $workingFor = sprintf($GLOBALS['strWorkingFor'], ucfirst(strtolower($k)));
         $accounts[$workingFor] = self::filterByNameAndLimit($v, $query, $remainingCounts, $workingFor);
         $count = count($accounts[$workingFor]);
         if ($count == 0) {
             unset($accounts[$workingFor]);
         }
         $showSearchAndRecent |= isset($remainingCounts[$workingFor]);
         unset($accounts[$k]);
     }
     // Prepend recently used to the results
     if (!empty($recentlyUsed) && $showSearchAndRecent) {
         $accounts = array_merge(array($GLOBALS['strRecentlyUsed'] => $recentlyUsed), $accounts);
     }
     $template->assign('adminAccounts', $adminAccounts);
     $template->assign('otherAccounts', $accounts);
     $template->assign('remainingCounts', $remainingCounts);
     $template->assign('query', $query);
     $template->assign('noAccountsMessage', sprintf($GLOBALS['strNoAccountWithXInNameFound'], $query));
     $template->assign('currentAccountId', OA_Permission::getAccountId());
     $template->assign('showSearchAndRecent', $showSearchAndRecent);
 }
开发者ID:villos,项目名称:tree_admin,代码行数:53,代码来源:AccountSwitch.php


示例20: getZones

 function getZones()
 {
     global $list_filters;
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $aParams = array();
         $aPublishers = Admin_DA::getPublishers($aParams);
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
         } else {
             // else use all publishers
             $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         }
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams = array('agency_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
         } else {
             // else use all of this agency's publishers
             $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         }
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aParams = array('publisher_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } else {
         $aPublishers = array();
         $aZones = array();
     }
     $aZoneArray = array();
     foreach ($aPublishers as $publisherId => $aPublisher) {
         foreach ($aZones as $zoneId => $aZone) {
             if ($aZone['publisher_id'] == $publisherId) {
                 $aZoneArray[$zoneId] = phpads_buildName($publisherId, MAX_getPublisherName($aPublisher['name'])) . " - " . phpAds_buildName($zoneId, MAX_getZoneName($aZone['name']));
             }
         }
     }
     return $aZoneArray;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:53,代码来源:ZoneIdField.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP OA_ServiceLocator类代码示例发布时间:2022-05-23
下一篇:
PHP OA_Dal_ApplicationVariables类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap