src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php
protected function CommitNoticeListToCookie()
    {
        $aNoticeList = array();
        reset($this->aNoticeList);
        foreach (array_keys($this->aNoticeList) as $iItemId) {
            $aNoticeList[$iItemId] = $this->aNoticeList[$iItemId];
        }
        $sNoticeList = json_encode($aNoticeList);
        $sNoticeList = base64_encode($sNoticeList);
        $iLifeTime = 31536000; // 1 year
        if ($iLifeTime > CHAMELEON_MAX_COOKIE_LIFETIME) {
            $iLifeTime = CHAMELEON_MAX_COOKIE_LIFETIME;
        }
        $expireTime = $iLifeTime + time();
        $domain = TCMSSmartURLData::GetActive()->sOriginalDomainName;
        // drop 'www' subdomain
        if ('www.' === substr($domain, 0, 4)) {
            $domain = substr($domain, 4);
        }
        setcookie(TdbDataExtranetUser::COOKIE_NAME_NOTICELIST, $sNoticeList, $expireTime, '/', '.'.$domain, false, true);
    }
protected function CommitNoticeListToCookie()
    {
        $aNoticeList = array();
        reset($this->aNoticeList);
        foreach (array_keys($this->aNoticeList) as $iItemId) {
            $aNoticeList[$iItemId] = $this->aNoticeList[$iItemId];
        }
        $sNoticeList = json_encode($aNoticeList);
        $sNoticeList = base64_encode($sNoticeList);
        $iLifeTime = 31536000; // 1 year
        if ($iLifeTime > CHAMELEON_MAX_COOKIE_LIFETIME) {
            $iLifeTime = CHAMELEON_MAX_COOKIE_LIFETIME;
        }
        $expireTime = $iLifeTime + time();
        $domain = TCMSSmartURLData::GetActive()->sOriginalDomainName;
        // drop 'www' subdomain
        if ('www.' === substr($domain, 0, 4)) {
            $domain = substr($domain, 4);
        }
        setcookie(TdbDataExtranetUser::COOKIE_NAME_NOTICELIST, $sNoticeList, $expireTime, '/', '.'.$domain, false, true);
    }
protected function CommitNoticeListToCookie ( ) { $ aNoticeList = array ( ) ; reset ( $ this -> aNoticeList ) ; foreach ( array_keys ( $ this -> aNoticeList ) as $ iItemId ) { $ aNoticeList [ $ iItemId ] = $ this -> aNoticeList [ $ iItemId ] ; } $ sNoticeList = json_encode ( $ aNoticeList ) ; $ sNoticeList = base64_encode ( $ sNoticeList ) ; $ iLifeTime = 31536000 ; // 1 year if ( $ iLifeTime > CHAMELEON_MAX_COOKIE_LIFETIME ) { $ iLifeTime = CHAMELEON_MAX_COOKIE_LIFETIME ; } $ expireTime = $ iLifeTime + time ( ) ; $ domain = TCMSSmartURLData :: GetActive ( ) -> sOriginalDomainName ; // drop 'www' subdomain if ( 'www.' === substr ( $ domain , 0 , 4 ) ) { $ domain = substr ( $ domain , 4 ) ; } setcookie ( TdbDataExtranetUser :: COOKIE_NAME_NOTICELIST , $ sNoticeList , $ expireTime , '/' , '.' . $ domain , false , true ) ; }
save user notice list to cookie.
save user notice list to cookie .