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


PHP phpAds_SessionDataStore函数代码示例

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


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

示例1: saveDefaults

 /**
  * The local implementation of the saveDefaults() method to save the
  * values used for the report by the user to the user's session
  * preferences, so that they can be re-used in other reports.
  */
 function saveDefaults()
 {
     global $session;
     if (isset($_REQUEST['period_preset'])) {
         $session['prefs']['GLOBALS']['report_period_preset'] = $_REQUEST['period_preset'];
     }
     phpAds_SessionDataStore();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:13,代码来源:breakdown.class.php

示例2: getMessage

 /**
  * Retreives information from session
  *
  * @return string
  * @static
  */
 function getMessage()
 {
     global $session;
     $message = isset($session['message']) ? $session['message'] : null;
     unset($session['message']);
     phpAds_SessionDataStore();
     return $message;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:14,代码来源:Session.php

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

示例4: addToRecentlyUsedAccounts

 public static function addToRecentlyUsedAccounts($accountId)
 {
     global $session;
     if (empty($session['recentlyUsedAccounts'])) {
         $session['recentlyUsedAccounts']['a' . $accountId] = $accountId;
     } else {
         $session['recentlyUsedAccounts'] = array_merge(array('a' . $accountId => $accountId), $session['recentlyUsedAccounts']);
     }
     phpAds_SessionDataStore();
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:10,代码来源:AccountSwitch.php

示例5: phpAds_SessionDataRegister

function phpAds_SessionDataRegister($key, $value = '')
{
    global $Session;
    if (!defined('phpAds_installing')) {
        phpAds_SessionStart();
    }
    if (is_array($key) && $value == '') {
        foreach (array_keys($key) as $name) {
            $Session[$name] = $key[$name];
        }
    } else {
        $Session[$key] = $value;
    }
    phpAds_SessionDataStore();
    // This function has been disabled because of incompatibility
    // problem with ZendOptimizer 1.00. Call sessionDataStore
    // manually if have modified the session array.
    // register_shutdown_function("phpAds_SessionDataStore");
}
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:19,代码来源:lib-sessions.inc.php

示例6: switch

+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Include required files
require_once MAX_PATH . '/lib/max/language/Loader.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/OA/Admin/Reports/Generate.php';
global $session;
if (isset($_REQUEST['submit_type']) && $_REQUEST['submit_type'] == 'change') {
    // Store any values we need to pass to the next page
    switch ($_REQUEST['changed_field']) {
        case 'publisher':
            if (isset($_REQUEST['publisherId'])) {
                $session['prefs']['GLOBALS']['report_publisher'] = $_REQUEST['publisherId'];
                phpAds_SessionDataStore();
            }
        default:
            break;
    }
    echo "<script type='text/javascript'>window.location='" . $_REQUEST['refresh_page'] . "'</script>";
}
// If the report is for a "specific" period, store the period for later user
if (!is_null($_GET['period_preset']) && $_GET['period_preset'] == 'specific') {
    if (!is_null($_GET['period_start'])) {
        $session['prefs']['GLOBALS']['startDate'] = $_GET['period_start'] = date('Y-m-d', strtotime($_GET['period_start']));
    }
    if (!is_null($_GET['period_end'])) {
        $session['prefs']['GLOBALS']['endDate'] = $_GET['period_end'] = date('Y-m-d', strtotime($_GET['period_end']));
    }
}
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:31,代码来源:report-generate.php

示例7: phpAds_SessionDataRegister

function phpAds_SessionDataRegister($key, $value = '')
{
    $conf = $GLOBALS['_MAX']['CONF'];
    global $session;
    //if ($conf['openads']['installed'])
    if (OA_INSTALLATION_STATUS == OA_INSTALLATION_STATUS_INSTALLED) {
        phpAds_SessionStart();
    }
    if (is_array($key) && $value == '') {
        foreach (array_keys($key) as $name) {
            $session[$name] = $key[$name];
        }
    } else {
        $session[$key] = $value;
    }
    //if ($conf['openads']['installed'])
    if (OA_INSTALLATION_STATUS == OA_INSTALLATION_STATUS_INSTALLED) {
        phpAds_SessionDataStore();
    }
}
开发者ID:villos,项目名称:tree_admin,代码行数:20,代码来源:lib-sessions.inc.php

示例8: saveNewPasswordAndLogin

 /**
  * Save the new password in the user properties
  *
  * @param string recovery ID
  * @param string new password
  * @return bool Ttrue the new password was correctly saved
  */
 function saveNewPasswordAndLogin($recoveryId, $password)
 {
     $doPwdRecovery = OA_Dal::factoryDO('password_recovery');
     $doPwdRecovery->recovery_id = $recoveryId;
     $doPwdRecoveryClone = clone $doPwdRecovery;
     $doPwdRecovery->find();
     if ($doPwdRecovery->fetch()) {
         $userId = $doPwdRecovery->user_id;
         $doPlugin =& OA_Auth::staticGetAuthPlugin();
         $doPlugin->setNewPassword($userId, $password);
         $doPwdRecoveryClone->delete();
         phpAds_SessionStart();
         $doUser = OA_Dal::staticGetDO('users', $userId);
         phpAds_SessionDataRegister(OA_Auth::getSessionData($doUser));
         phpAds_SessionDataStore();
         return true;
     }
     return false;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:26,代码来源:PasswordRecovery.php

示例9: _checkLoginOld

 function _checkLoginOld($tableName, $agencySupport)
 {
     if (!isset($_COOKIE['sessionID'])) {
         return new PEAR_Error($GLOBALS['strEnableCookies']);
     }
     $prefix = $GLOBALS['_MAX']['CONF']['table']['prefix'];
     $oDbh = OA_DB::singleton();
     if (!PEAR::isError($oDbh)) {
         $tblPreferences = $oDbh->quoteIdentifier($prefix . $tableName, true);
         $query = "SELECT admin, admin_pw FROM {$tblPreferences}";
         if ($agencySupport) {
             $query .= " WHERE agencyid = 0";
         }
         $aPref = $oDbh->queryRow($query, null, MDB2_FETCHMODE_ASSOC);
         if (is_array($aPref)) {
             $oPlugin =& OA_Auth::staticGetAuthPlugin('internal');
             $aCredentials = $oPlugin->_getCredentials(false);
             if (!PEAR::isError($aCredentials)) {
                 if (strtolower($aPref['admin']) == strtolower($aCredentials['username']) && $aPref['admin_pw'] == md5($aCredentials['password'])) {
                     $doUser = OA_Dal::factoryDO('users');
                     $doUser->username = $aPref['admin'];
                     $aSession = OA_Auth::getSessionData($doUser, true);
                     $aSession['user']->aAccount['account_type'] = OA_ACCOUNT_ADMIN;
                     phpAds_SessionDataRegister($aSession);
                 }
             }
         }
         // Openads for PostgreSQL 2.0 session.last_used field is a
         // timestamp with timezone, which gives troubles reading back
         // session data if TZ offset is > 0
         if ($tableName == 'config' && $oDbh->dbsyntax == 'pgsql') {
             // Make sure that session time is loaded as UTC
             $oDbh->exec("SET TIMEZONE TO 'UTC'");
             phpAds_SessionDataStore();
             $oDbh->exec("SET TIMEZONE TO DEFAULT");
             return;
         }
         phpAds_SessionDataStore();
     }
 }
开发者ID:villos,项目名称:tree_admin,代码行数:40,代码来源:Login.php

示例10: scheduleRun

 function scheduleRun()
 {
     global $session;
     if ($GLOBALS['_MAX']['CONF']['priority']['instantUpdate']) {
         $session['RUN_MPE'] = true;
         phpAds_SessionDataStore();
         return true;
     }
     return false;
 }
开发者ID:akirsch,项目名称:revive-adserver,代码行数:10,代码来源:Priority.php

示例11: removeOneMessage

 /**
  * Removes from queue the latest message related to a given action. Please
  * make sure that if you intend to remove messages you queue them with 'relatedAction'
  * parameter set properly.
  *
  * @param string $relatedAction name of the action which messages should be removed
  * @return true if there was any message removed, false otherwise
  */
 function removeOneMessage($relatedAction)
 {
     global $session;
     if (empty($relatedAction) || !isset($session['messageQueue']) || !is_array($session['messageQueue']) || !count($session['messageQueue'])) {
         return false;
     }
     $aMessages = $session['messageQueue'];
     //filter messages out, if any
     $count = count($aMessages);
     for ($i = 0; $i < $count; $i++) {
         if ($relatedAction == $aMessages[$i]['relatedAction']) {
             unset($aMessages[$i]);
             $aMessages = array_slice($aMessages, 0);
             //a hack to reorder indices after elem was removed
             break;
         }
     }
     //if sth was filtered save new queue
     if ($count > count($aMessages)) {
         $session['messageQueue'] = $aMessages;
         // Force session storage
         phpAds_SessionDataStore();
     }
     return $count - count($aMessages);
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:33,代码来源:UI.php

示例12: OA_Start

/**
 * Starts or continue existing session
 *
 * @param unknown_type $checkRedirectFunc
 */
function OA_Start($checkRedirectFunc = null)
{
    $conf = $GLOBALS['_MAX']['CONF'];
    global $session;
    // XXX: Why not try loading session data when OpenX is not installed?
    //if ($conf['openads']['installed'])
    if (OA_INSTALLATION_STATUS == OA_INSTALLATION_STATUS_INSTALLED) {
        phpAds_SessionDataFetch();
    }
    if (!OA_Auth::isLoggedIn() || OA_Auth::suppliedCredentials()) {
        // Required files
        include_once MAX_PATH . '/lib/max/language/Loader.php';
        // Load the required language files
        Language_Loader::load('default');
        phpAds_SessionDataRegister(OA_Auth::login($checkRedirectFunc));
        $aPlugins = OX_Component::getListOfRegisteredComponentsForHook('afterLogin');
        foreach ($aPlugins as $i => $id) {
            if ($obj = OX_Component::factoryByComponentIdentifier($id)) {
                $obj->afterLogin();
            }
        }
    }
    // Overwrite certain preset preferences
    if (!empty($session['language']) && $session['language'] != $GLOBALS['pref']['language']) {
        $GLOBALS['_MAX']['CONF']['max']['language'] = $session['language'];
    }
    // Check if manual account switch has happened and migrate to new global variable
    if (isset($session['accountSwitch'])) {
        $GLOBALS['_OX']['accountSwtich'] = $session['accountSwitch'];
        unset($session['accountSwitch']);
        phpAds_SessionDataStore();
    }
}
开发者ID:JackyKit,项目名称:revive-adserver,代码行数:38,代码来源:config.php

示例13: phpAds_SessionGetToken

function phpAds_SessionGetToken()
{
    if (OA_INSTALLATION_STATUS != OA_INSTALLATION_STATUS_INSTALLED) {
        return false;
    }
    global $session;
    phpAds_SessionStart();
    if (empty($session['token'])) {
        $session['token'] = md5(uniqid('phpads', 1));
        phpAds_SessionDataStore();
    }
    return $session['token'];
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:13,代码来源:lib-sessions.inc.php

示例14: OA_Start

/**
 * Starts or continue existing session
 *
 * @param unknown_type $checkRedirectFunc
 */
function OA_Start($checkRedirectFunc = null)
{
    $conf = $GLOBALS['_MAX']['CONF'];
    global $session;
    // Send no cache headers
    MAX_header('Pragma: no-cache');
    MAX_header('Cache-Control: no-cache, no-store, must-revalidate');
    MAX_header('Expires: 0');
    if (RV_INSTALLATION_STATUS == RV_INSTALLATION_STATUS_INSTALLED) {
        phpAds_SessionDataFetch();
    }
    if (!OA_Auth::isLoggedIn() || OA_Auth::suppliedCredentials()) {
        // Required files
        include_once MAX_PATH . '/lib/max/language/Loader.php';
        // Load the required language files
        Language_Loader::load('default');
        phpAds_SessionDataRegister(OA_Auth::login($checkRedirectFunc));
        $aPlugins = OX_Component::getListOfRegisteredComponentsForHook('afterLogin');
        foreach ($aPlugins as $i => $id) {
            if ($obj = OX_Component::factoryByComponentIdentifier($id)) {
                $obj->afterLogin();
            }
        }
    }
    // Overwrite certain preset preferences
    if (!empty($session['language']) && $session['language'] != $GLOBALS['pref']['language']) {
        $GLOBALS['_MAX']['CONF']['max']['language'] = $session['language'];
    }
    // Check if manual account switch has happened and migrate to new global variable
    if (isset($session['accountSwitch'])) {
        $GLOBALS['_OX']['accountSwtich'] = $session['accountSwitch'];
        unset($session['accountSwitch']);
        phpAds_SessionDataStore();
    }
}
开发者ID:akirsch,项目名称:revive-adserver,代码行数:40,代码来源:config.php

示例15: clearNotifications

 function clearNotifications()
 {
     global $session;
     $session['notificationQueue'] = array();
     phpAds_SessionDataStore();
 }
开发者ID:villos,项目名称:tree_admin,代码行数:6,代码来源:NotificationManager.php


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