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


PHP OX_Admin_Redirect类代码示例

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


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

示例1: 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

示例2: process

 function process()
 {
     if (!empty($this->request['submit'])) {
         $this->aErrors = $this->oPlugin->validateUsersData($this->request);
         if (empty($this->aErrors)) {
             $this->userid = $this->oPlugin->saveUser($this->userid, $this->request['login'], $this->request['passwd'], $this->request['contact_name'], $this->request['email_address'], $this->request['language'], $this->accountId);
             if ($this->userid) {
                 OA_Admin_UI_UserAccess::linkUserToAccount($this->userid, $this->accountId, $this->aPermissions, $this->aAllowedPermissions);
                 OX_Admin_Redirect::redirect($this->getRedirectUrl());
             } else {
                 $this->aErrors = $this->oPlugin->getSignupErrors();
             }
         }
     }
     $this->display();
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:16,代码来源:UserAccess.php

示例3: _runReport

 /**
  * A private method to generate a report plugin.
  *
  * @access private
  * @param Plugins_Reports $oPlugin The report plugin.
  *
  * @TODO Extend to allow use of other report writers, if required.
  */
 function _runReport($oPlugin)
 {
     if (!$oPlugin->isAllowedToExecute()) {
         // User cannot execute this report
         OX_Admin_Redirect::redirect('report-index.php');
     }
     $aInfo = $oPlugin->info();
     // Get the variables for running the report plugin
     $aVariables = $this->_getVariablesForReport($aInfo['plugin-import']);
     // Set the Excel Report writer
     $oWriter = new OA_Admin_ExcelWriter();
     $oPlugin->useReportWriter($oWriter);
     // Generate the report by calling the report plugin's
     // execute method with the required variables
     $aCallback = array(&$oPlugin, 'execute');
     $result = call_user_func_array($aCallback, $aVariables);
     if (!empty($result)) {
         OX_Admin_Redirect::redirect('report-generation.php?report=' . $oPlugin->getComponentIdentifier() . '&error=' . $result);
     }
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:28,代码来源:Generate.php

示例4: handlePost

 function handlePost($vars)
 {
     $codes = array();
     if (isset($vars['tag']) && is_array($vars['tag'])) {
         foreach ($vars['tag'] as $k => $v) {
             $codes[$k] = array('tagcode' => stripslashes($v), 'paused' => false);
             $codes[$k]['autotrack'] = isset($vars['autotrack'][$k]);
         }
     }
     if (isset($vars['t_paused'])) {
         foreach (explode(',', $vars['t_paused']) as $k) {
             if (isset($codes[$k])) {
                 $codes[$k]['paused'] = true;
             }
         }
     }
     if (isset($vars['t_action'])) {
         switch ($vars['t_action']) {
             case 'new':
                 $codes[] = array('tagcode' => '', 'paused' => false);
                 break;
             case 'del':
                 if (isset($vars['t_id']) && isset($codes[$vars['t_id']])) {
                     unset($codes[$vars['t_id']]);
                 }
                 break;
             case 'up':
                 if (isset($vars['t_id']) && isset($codes[$vars['t_id']]) && isset($codes[$vars['t_id'] - 1])) {
                     $tmp = $codes[$vars['t_id']];
                     $codes[$vars['t_id']] = $codes[$vars['t_id'] - 1];
                     $codes[$vars['t_id'] - 1] = $tmp;
                 }
                 break;
             case 'down':
                 if (isset($vars['t_id']) && isset($codes[$vars['t_id']]) && isset($codes[$vars['t_id'] + 1])) {
                     $tmp = $codes[$vars['t_id']];
                     $codes[$vars['t_id']] = $codes[$vars['t_id'] + 1];
                     $codes[$vars['t_id'] + 1] = $tmp;
                 }
                 break;
             case 'pause':
             case 'restart':
                 if (isset($vars['t_id']) && isset($codes[$vars['t_id']])) {
                     $codes[$vars['t_id']]['paused'] = $vars['t_action'] == 'pause';
                 }
                 break;
         }
     }
     if (isset($vars['save'])) {
         $this->_dal->setAppendCodes($this->tracker_id, $codes);
         // Queue confirmation message
         $doTrackers = OA_Dal::factoryDO('trackers');
         $doTrackers->get($this->tracker_id);
         $translation = new OX_Translation();
         $translated_message = $translation->translate($GLOBALS['strTrackerAppendHasBeenUpdated'], array(MAX::constructURL(MAX_URL_ADMIN, "tracker-edit.php?clientid=" . $this->advertiser_id . "&trackerid=" . $this->tracker_id), htmlspecialchars($doTrackers->trackername)));
         OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
         OX_Admin_Redirect::redirect("tracker-append.php?clientid={$this->advertiser_id}&trackerid={$this->tracker_id}");
     } else {
         $this->codes = $codes;
         $this->showReminder = true;
     }
 }
开发者ID:akirsch,项目名称:revive-adserver,代码行数:62,代码来源:TrackerAppend.php

示例5: phpAds_registerGlobal

//require_once MAX_PATH . '/lib/max/deliverycache/cache-'.$conf['delivery']['cache'].'.inc.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';
require_once OX_PATH . '/lib/pear/DB/DataObject.php';
// Register input variables
phpAds_registerGlobal('returnurl', 'agencyid');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
// CVE-2013-5954 - see OA_Permission::checkSessionToken() method for details
OA_Permission::checkSessionToken();
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
if (!empty($agencyid)) {
    $doAgency = OA_Dal::factoryDO('agency');
    $doAgency->agencyid = $agencyid;
    $doAgency->get($agencyid);
    $doAgency->delete();
}
// Run the Maintenance Priority Engine process
OA_Maintenance_Priority::scheduleRun();
// Rebuild cache
// phpAds_cacheDelete();
if (!isset($returnurl) || $returnurl == '') {
    $returnurl = 'advertiser-index.php';
}
OX_Admin_Redirect::redirect($returnurl);
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:30,代码来源:agency-delete.php

示例6: array_keys

        $sessionClientId = $session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'];
        if (isset($aAdvertisers[$sessionClientId])) {
            //check if 'id' from session was not removed
            $clientid = $sessionClientId;
        }
    }
    if (empty($clientid)) {
        //was empty, is still empty - just pick one, no need for redirect
        $ids = array_keys($aAdvertisers);
        $clientid = !empty($ids) ? $ids[0] : -1;
        //if no advertisers set to non-existent id
    }
} else {
    if (!isset($aAdvertisers[$clientid])) {
        $page = basename($_SERVER['SCRIPT_NAME']);
        OX_Admin_Redirect::redirect($page);
    }
}
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
$oHeaderModel = buildHeaderModel($clientid, $aAdvertisers);
phpAds_PageHeader(null, $oHeaderModel);
/*-------------------------------------------------------*/
/* Get preferences                                       */
/*-------------------------------------------------------*/
if (!isset($hideinactive)) {
    if (isset($session['prefs']['advertiser-campaigns.php'][$clientid]['hideinactive'])) {
        $hideinactive = $session['prefs']['advertiser-campaigns.php'][$clientid]['hideinactive'];
    } else {
        $pref =& $GLOBALS['_MAX']['PREF'];
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:advertiser-campaigns.php

示例7: processForm

function processForm($aZone, $form, $oComponent = null)
{
    $aFields = $form->exportValues();
    if (empty($aFields['zoneid'])) {
        return;
    }
    $doZones = OA_Dal::factoryDO('zones');
    $doZones->get($aFields['zoneid']);
    // Determine chain
    if ($aFields['chaintype'] == '1' && $aFields['chainzone'] != '') {
        $chain = 'zone:' . $aFields['chainzone'];
    } else {
        $chain = '';
    }
    $doZones->chain = $chain;
    if (!isset($aFields['prepend'])) {
        $aFields['prepend'] = '';
    }
    $aFields['prepend'] = MAX_commonGetValueUnslashed('prepend');
    $doZones->prepend = $aFields['prepend'];
    // Do not save append until not finished with zone appending, if present
    if (!empty($aFields['appendsave'])) {
        if (!isset($aFields['append'])) {
            $aFields['append'] = '';
        }
        if (!isset($aFields['appendtype'])) {
            $aFields['appendtype'] = phpAds_ZoneAppendZone;
        }
        $aFields['append'] = MAX_commonGetValueUnslashed('append');
        $doZones->append = $aFields['append'];
        $doZones->appendtype = $aFields['appendtype'];
    }
    if (isset($aFields['forceappend'])) {
        $doZones->forceappend = $aFields['forceappend'];
    }
    $block = _initCappingVariables($aFields['time'], $aFields['capping'], $aFields['session_capping']);
    // Set adselection PCI if required
    if (isset($aFields['ext_adselection'])) {
        $doZones->ext_adselection = $aFields['ext_adselection'] == 'none' ? OX_DATAOBJECT_NULL : $aFields['ext_adselection'];
    }
    $doZones->block = $block;
    $doZones->capping = $aFields['capping'];
    $doZones->session_capping = $aFields['session_capping'];
    if ($aFields['show_capped_no_cookie'] != 1) {
        $aFields['show_capped_no_cookie'] = 0;
    }
    $doZones->show_capped_no_cookie = $aFields['show_capped_no_cookie'];
    $doZones->update();
    // Queue confirmation message
    $translation = new OX_Translation();
    $translated_message = $translation->translate($GLOBALS['strZoneAdvancedHasBeenUpdated'], array(MAX::constructURL(MAX_URL_ADMIN, 'zone-edit.php?affiliateid=' . $aFields['affiliateid'] . '&zoneid=' . $aFields['zoneid']), htmlspecialchars($doZones->zonename)));
    OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
    // Rebuild Cache
    // require_once MAX_PATH . '/lib/max/deliverycache/cache-'.$conf['delivery']['cache'].'.inc.php';
    // phpAds_cacheDelete('what=zone:'.$zoneid);
    $oUI = OA_Admin_UI::getInstance();
    OX_Admin_Redirect::redirect("zone-advanced.php?affiliateid=" . $aFields['affiliateid'] . "&zoneid=" . $aFields['zoneid']);
}
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:58,代码来源:zone-advanced.php

示例8: array_keys

            $sessionCampaignId = $session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['campaignid'][$clientid];
            if (isset($aCampaigns[$sessionCampaignId])) {
                //check if 'id' from session was not removed
                $campaignid = $sessionCampaignId;
            }
        }
        if (empty($campaignid)) {
            //was empty, is still empty - just pick one, no need for redirect
            $ids = array_keys($aCampaigns);
            $campaignid = !empty($ids) ? $ids[0] : -1;
            //if no campaigns set to non-existent id
        }
    } else {
        if (!isset($aCampaigns[$campaignid])) {
            $page = basename($_SERVER['SCRIPT_NAME']);
            OX_Admin_Redirect::redirect("{$page}?clientid={$clientid}");
        }
    }
}
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
// Initialise some parameters
$pageName = basename($_SERVER['SCRIPT_NAME']);
$tabindex = 1;
$agencyId = OA_Permission::getAgencyId();
$aEntities = array('clientid' => $clientid, 'campaignid' => $campaignid);
$oTrans = new OX_Translation();
// Display navigation
$aOtherAdvertisers = Admin_DA::getAdvertisers(array('agency_id' => $agencyId));
$aOtherCampaigns = Admin_DA::getPlacements(array('advertiser_id' => $clientid));
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:campaign-banners.php

示例9: phpAds_SessionDataStore

    if (isset($language)) {
        $doUsers->language = $language;
    }
    if (!count($aErrormessage)) {
        if ($doUsers->update() === false) {
            // Unable to update the preferences
            $aErrormessage[0][] = $strUnableToWritePrefs;
        } else {
            //Add the new username to the session
            $oUser =& OA_Permission::getCurrentUser();
            $oUser->aUser['contact_name'] = $contact_name;
            $oUser->aUser['language'] = $language;
            phpAds_SessionDataStore();
            // The "preferences" were written correctly saved to the database,
            // go to the "next" preferences page from here
            OX_Admin_Redirect::redirect('account-user-email.php');
        }
    }
}
// Display the settings page's header and sections
phpAds_PageHeader("5.1");
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
    // Show all "Preferences" sections
    phpAds_ShowSections(array("5.1", "5.2", "5.3", "5.5", "5.6", "5.4"));
} else {
    if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
        // Show the "Account Preferences", "User Log" and "Channel Management" sections of the "Preferences" sections
        phpAds_ShowSections(array("5.1", "5.2", "5.4", "5.7"));
    } else {
        if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER) || OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
            // Show the "User Preferences" section of the "Preferences" sections
开发者ID:JackyKit,项目名称:revive-adserver,代码行数:31,代码来源:account-user-name-language-timezone.php

示例10: processStatusForm

function processStatusForm($form)
{
    $aFields = $form->exportValues();
    if (empty($aFields['campaignid'])) {
        return;
    }
    //update status for existing campaign
    $doCampaigns = OA_Dal::factoryDO('campaigns');
    $doCampaigns->campaignid = $aFields['campaignid'];
    $doCampaigns->as_reject_reason = $aFields['as_reject_reason'];
    $doCampaigns->status = $aFields['status'];
    $doCampaigns->update();
    // Run the Maintenance Priority Engine process
    OA_Maintenance_Priority::scheduleRun();
    OX_Admin_Redirect::redirect("campaign-edit.php?clientid=" . $aFields['clientid'] . "&campaignid=" . $aFields['campaignid']);
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:16,代码来源:campaign-edit.php

示例11: processForm

function processForm($form)
{
    $aFields = $form->exportValues();
    // If ID is not set, it should be a null-value for the auto_increment
    if (empty($aFields['trackerid'])) {
        $aFields['trackerid'] = "null";
    }
    $doTrackers = OA_Dal::factoryDO('trackers');
    $doTrackers->trackername = $aFields['trackername'];
    $doTrackers->description = $aFields['description'];
    $doTrackers->status = $aFields['status'];
    $doTrackers->type = $aFields['type'];
    $doTrackers->linkcampaigns = $aFields['linkcampaigns'] == "t" ? "t" : "f";
    $doTrackers->clientid = $aFields['clientid'];
    if (empty($aFields['trackerid']) || $aFields['trackerid'] == "null") {
        $aFields['trackerid'] = $doTrackers->insert();
        // Queue confirmation message
        $translation = new OX_Translation();
        $translated_message = $translation->translate($GLOBALS['strTrackerHasBeenAdded'], array(MAX::constructURL(MAX_URL_ADMIN, "tracker-edit.php?clientid=" . $aFields['clientid'] . "&trackerid=" . $aFields['trackerid']), htmlspecialchars($aFields['trackername'])));
        OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
        OX_Admin_Redirect::redirect('advertiser-trackers.php?clientid=' . $aFields['clientid']);
    } else {
        $doTrackers->trackerid = $aFields['trackerid'];
        $doTrackers->update();
        // Queue confirmation message
        $translation = new OX_Translation();
        $translated_message = $translation->translate($GLOBALS['strTrackerHasBeenUpdated'], array(MAX::constructURL(MAX_URL_ADMIN, "tracker-edit.php?clientid=" . $aFields['clientid'] . "&trackerid=" . $aFields['trackerid']), htmlspecialchars($aFields['trackername'])));
        OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
        OX_Admin_Redirect::redirect("tracker-edit.php?clientid=" . $aFields['clientid'] . "&trackerid=" . $aFields['trackerid']);
    }
    exit;
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:32,代码来源:tracker-edit.php

示例12:

require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/OA/Permission.php';
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER, OA_ACCOUNT_TRAFFICKER);
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
    // Show Dashboard if Dashboard is enabled
    if ($GLOBALS['_MAX']['CONF']['ui']['dashboardEnabled']) {
        OX_Admin_Redirect::redirect('dashboard.php');
    } else {
        OX_Admin_Redirect::redirect('agency-index.php');
    }
}
if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
    // Show Dashboard if Dashboard is enabled, Sync is enabled and PHP is SSL enabled
    if ($GLOBALS['_MAX']['CONF']['ui']['dashboardEnabled'] && $GLOBALS['_MAX']['CONF']['sync']['checkForUpdates'] && OA::getAvailableSSLExtensions()) {
        OX_Admin_Redirect::redirect('dashboard.php');
    } else {
        OX_Admin_Redirect::redirect('advertiser-index.php');
    }
}
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
    OX_Admin_Redirect::redirect('stats.php?entity=advertiser&breakdown=history&clientid=' . OA_Permission::getEntityId());
}
if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
    OX_Admin_Redirect::redirect('stats.php?entity=affiliate&breakdown=history&affiliateid=' . OA_Permission::getEntityId());
}
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:index.php

示例13: setCurrentLeftMenuSubItem

        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');
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:demoUI-page.php

示例14: array

            if (method_exists($oPlugin, 'validate')) {
                $aErrormessage = array();
                $valid = $oPlugin->validate($aErrormessage);
            }
        }
    }
    if ($valid) {
        // Create a new settings object, and save the settings!
        $result = OA_Preferences::processPreferencesFromForm($aElements, $aCheckboxes);
        if ($result) {
            // Queue confirmation message
            $title = $group . ' ' . $GLOBALS['strPluginPreferences'];
            $translation = new OX_Translation();
            $translated_message = $translation->translate($GLOBALS['strXPreferencesHaveBeenUpdated'], array(htmlspecialchars($title)));
            OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
            OX_Admin_Redirect::redirect('account-preferences-plugin.php?group=' . $group);
        }
        // Could not write the settings configuration file, store this
        // error message and continue
        $aErrormessage[0][] = $strUnableToWritePrefs;
    }
}
// Display the preference page's header and sections
phpAds_PageHeader("account-preferences-index");
// Set the correct section of the preference pages and display the drop-down menu
$oOptions->selection($group);
// Prepare an array of HTML elements to display for the form, and
// output using the $oOption object
foreach ($aGroup['preferences'] as $k => $v) {
    $aPreferences[0]['text'] = $group . ($disabled ? ' - the Administrator has disabled this plugin, you may only change preferences when it is enabled.' : '');
    $aPreferences[0]['items'][] = array('type' => $v['type'], 'name' => $group . '_' . $v['name'], 'text' => $v['label'], 'req' => $v['required'], 'size' => $v['size'], 'value' => $v['value'], 'visible' => $v['visible'], 'disabled' => $disabled);
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:account-preferences-plugin.php

示例15: array

$aErrormessage = array();
// 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 which
    // of the preferences are checkboxes
    $aElements = array();
    $aCheckboxes = array();
    // Tracker
    $aElements[] = 'tracker_default_status';
    $aElements[] = 'tracker_default_type';
    $aElements[] = 'tracker_link_campaigns';
    $aCheckboxes['tracker_link_campaigns'] = true;
    // Save the preferences
    $result = OA_Preferences::processPreferencesFromForm($aElements, $aCheckboxes);
    if ($result) {
        OX_Admin_Redirect::redirect('account-preferences-tracker.php');
    }
    // Could not write the preferences to the database, store this
    // error message and continue
    $aErrormessage[0][] = $strUnableToWritePrefs;
}
// Display the settings page's header and sections
phpAds_PageHeader("account-preferences-index");
// Set the correct section of the preference pages and display the drop-down menu
$oOptions->selection("tracker");
// Get the details of possible tracker statuses
$aStatuses = array();
foreach ($GLOBALS['_MAX']['STATUSES'] as $statusId => $statusName) {
    $aStatuses[$statusId] = $GLOBALS[$statusName];
}
// Get the details of possible tracker types
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:account-preferences-tracker.php


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