亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? yazdstate.java

?? 這是學習Java必須讀懂兩套源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */

package com.Yasna.forum.tags;

import java.util.*;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.http.*;
import com.Yasna.forum.*;

 /**
 * Maintains Yazd state information for the user session.
 * Provides methods required for maintaining the
 * user session state information.
 *
 * @see YazdRequest
 *
 * @author Glenn Nielsen
 */

public class YazdState implements HttpSessionBindingListener
{
  private Authorization authorization = null;
  // Keep track of user display preferences
  private int message_depth = 1;
  private int thread_depth = 3;
  private int items_per_page = 25;
  // Keep track of currently selected forum, thread, and message
  // for forum navigation
  private int forumID = -1;
  private int threadID = -1;
  private int messageID = -1;
  private int parentID = -1;
  // Flag whether the user is logged in
  private boolean logged_in = false;
  // Date of users last session
  private Date lastVisit = null;
  // Date of users last use of current session
  private Date nextVisit = null;
  // Variables for tracking last visist to a Forum
  private Map nextForumVisit = new HashMap();
  private Map lastForumVisit = new HashMap();
  private Map lastForumVisitCookie = new HashMap();
  // Variables for tracking previous messages page
  private Map prevMessages = new HashMap();
  // And some constants for use with extended user properties
  public final static String LAST_VISIT = "lastVisitDate";
  public final static String THREAD_DEPTH = "threadDepth";
  public final static String MESSAGE_DEPTH = "messageDepth";
  public final static String ITEMS_PER_PAGE = "itemsPerPage";
  public final static String LAST_FORUM_VISIT = "lastForumVisitDate_";
  public final static int COOKIE_EXPIRE = 60*60*24*365;

  /**
   * Required for implementing interface
   * HttpSessionBindingListener
   */
  public final void valueBound(HttpSessionBindingEvent e)
  {
  }

  /**
   * Required for implementing interface
   * HttpSessionBindingListener, used to save the
   * date and time of users lastVisit to Yazd.
   * If forums were visited, save nextForumVisit date
   * and time as an extended user property.
   */
  public final void valueUnbound(HttpSessionBindingEvent e)
  {
    saveLastVisit();
  }

  /**
   * If user is logged in save the
   * date and time user last used current session
   * as their lastVisist to Yazd.
   * If forums were visited, save nextForumVisit date
   * and time as an extended user property.
   */
  public final void saveLastVisit()
  {
    if( nextVisit == null )return;
    User user;
    ForumFactory ff = ForumFactory.getInstance(authorization);
    if( ff == null )return;
    ProfileManager pm = ff.getProfileManager();
    try {
      user = pm.getUser(authorization.getUserID());
    } catch( UserNotFoundException ex ) {
      return;
    }
    if( user.isAnonymous() ) {
      return;
    }

    user.setProperty(LAST_VISIT,"" + nextVisit.getTime());
    // Save next lastForumVisit dates to extended user properties
    String tmp;
    Date last;
    for( Iterator it=nextForumVisit.keySet().iterator(); it.hasNext(); ) {
      tmp = (String)it.next();
      last = (Date)nextForumVisit.get(tmp);
      user.setProperty( tmp, "" + last.getTime());
    }
  }

  /**
   * Update users Authorization state information
   * for current session.
   */
  public final void setAuthorization(Authorization auth)
  {
    authorization = auth;
  }

  /**
   * Get users Authorization state information
   * for current session.
   *
   * @return users Authorization
   */
  public final Authorization getAuthorization()
  {
    return authorization;
  }

  /**
   * Set the users currently selected forum
   * as session state information
   */
  public final void setForumID(int id)
  {
    forumID=id;
  }

  /**
   * Get the users currently selected forum
   * from session state information
   *
   * @return forumID
   */
  public final int getForumID()
  {
    return forumID;
  }

  /**
   * Set the users currently selected thread
   * as session state information
   */
  public final void setThreadID(int id)
  {
    threadID=id;
  }

  /**
   * Get the users currently selected thread
   * from session state information
   *
   * @return threadID
   */
  public final int getThreadID()
  {
    return threadID;
  }

  /**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕中文字幕一区| 欧美性做爰猛烈叫床潮| www.亚洲激情.com| 欧美视频一区二区三区四区| 久久精品视频免费观看| 日韩不卡一区二区三区| 成人精品gif动图一区| 欧美一区日本一区韩国一区| 亚洲婷婷在线视频| 国产乱码精品一区二区三区忘忧草 | 一本色道久久综合亚洲aⅴ蜜桃 | 欧美日本一区二区在线观看| 欧美国产精品中文字幕| 日韩二区在线观看| 91精品福利在线| 亚洲天堂a在线| 国产精品亚洲专一区二区三区| 欧美久久久影院| 亚洲综合色区另类av| av资源站一区| 日本一区二区三区视频视频| 国产麻豆精品在线观看| 91精品国产91久久久久久一区二区 | 久久国产视频网| 制服视频三区第一页精品| 日韩电影一区二区三区| 色狠狠色狠狠综合| 国产精品福利av| 91丨porny丨蝌蚪视频| 久久久久国产精品麻豆| 国产成人欧美日韩在线电影| 2023国产精品| 国产91丝袜在线播放| 国产精品沙发午睡系列990531| 国产成人免费视频网站 | 韩国av一区二区三区四区| 精品999久久久| 国产精品综合网| 国产精品色婷婷久久58| 99久久久久久| 一区二区视频在线看| 欧美视频在线一区| 日本不卡的三区四区五区| 日韩欧美中文字幕制服| 久草精品在线观看| 欧美激情资源网| 91色乱码一区二区三区| 亚洲一区二区不卡免费| 日韩一区国产二区欧美三区| 黄网站免费久久| 国产精品久久久久久久久搜平片 | 狠狠v欧美v日韩v亚洲ⅴ| 国产欧美1区2区3区| 99久久亚洲一区二区三区青草| 亚洲视频免费看| 777久久久精品| 国产精品正在播放| 一区二区三区高清在线| 欧美一区二区视频在线观看2022| 麻豆91在线播放免费| 国产欧美综合在线观看第十页| 99精品视频一区| 午夜亚洲国产au精品一区二区| 日韩久久久久久| 不卡在线视频中文字幕| 亚洲va欧美va人人爽| 久久亚洲综合av| 欧美午夜影院一区| 国产美女一区二区三区| 亚洲一区二区三区视频在线播放| 欧美电视剧在线观看完整版| 国产高清久久久| 亚洲高清免费视频| 中文字幕+乱码+中文字幕一区| 欧美性受极品xxxx喷水| 国产一区二区三区在线观看精品 | 91麻豆swag| 美国十次了思思久久精品导航| 亚洲国产精品99久久久久久久久| 欧美日韩www| a在线欧美一区| 久久草av在线| 亚洲高清免费在线| 亚洲国产精品二十页| 欧美电影免费观看完整版 | 国产一区二区导航在线播放| 日韩国产精品久久| 成人免费一区二区三区在线观看| 欧美日韩你懂得| 91原创在线视频| 国产伦精品一区二区三区视频青涩| 肉色丝袜一区二区| 一区二区三区鲁丝不卡| 国产精品无遮挡| 2024国产精品视频| 日韩西西人体444www| 欧美性高清videossexo| 成人黄页在线观看| 国产麻豆91精品| 久久99精品网久久| 美腿丝袜亚洲综合| 丝袜国产日韩另类美女| 亚洲欧美区自拍先锋| 中文字幕一区二区三区在线观看| 久久综合狠狠综合久久综合88 | 欧美丝袜第三区| 99re成人精品视频| 成人深夜在线观看| 国产成人激情av| 国产精品资源在线看| 国产综合色视频| 老司机免费视频一区二区三区| 午夜精品一区在线观看| 亚洲午夜影视影院在线观看| 一区二区三区四区在线免费观看 | 国产人成一区二区三区影院| 日韩精品中文字幕在线不卡尤物| 欧美精品高清视频| 91麻豆精品91久久久久同性| 欧美日韩一区二区电影| 在线综合视频播放| 日韩一本二本av| 久久久影视传媒| 国产精品三级电影| 亚洲色图制服丝袜| 一级精品视频在线观看宜春院| 亚洲综合在线免费观看| 亚洲不卡av一区二区三区| 日韩电影在线观看一区| 久久99久久精品| 国产精品影音先锋| 99久久婷婷国产综合精品电影| av电影天堂一区二区在线观看| 一道本成人在线| 555www色欧美视频| 337p日本欧洲亚洲大胆精品| 国产精品美女一区二区在线观看| 亚洲私人影院在线观看| 亚洲va欧美va人人爽| 国精品**一区二区三区在线蜜桃| 国产69精品久久久久毛片| 日本大香伊一区二区三区| 欧美日韩亚洲国产综合| 精品欧美一区二区久久| 中文字幕亚洲不卡| 天堂午夜影视日韩欧美一区二区| 精品一区二区三区香蕉蜜桃| av一二三不卡影片| 欧美一二三四区在线| 亚洲综合小说图片| 日av在线不卡| 成人久久18免费网站麻豆| 欧美日韩美少妇| 欧美极品美女视频| 日韩国产欧美在线观看| 99精品国产视频| 精品国内片67194| 亚洲精品ww久久久久久p站| 国产一区二区在线看| 91成人在线观看喷潮| 久久久久久9999| 五月婷婷激情综合网| 波多野结衣视频一区| 欧美一二三四区在线| 亚洲精品欧美激情| 国产成人在线观看| 欧美一区二区三区四区视频| 国产精品女人毛片| 日韩精品一区第一页| 国产精品一区二区不卡| 欧美精品日日鲁夜夜添| 国产日韩欧美精品电影三级在线| 亚洲线精品一区二区三区八戒| 激情丁香综合五月| 精品一区二区免费| 欧美日韩综合色| 亚洲欧洲精品一区二区三区不卡| 男女男精品网站| 99精品偷自拍| 国产精品热久久久久夜色精品三区 | 欧美丝袜第三区| 中文文精品字幕一区二区| 日本午夜一本久久久综合| 一本久道久久综合中文字幕| 久久这里只有精品6| 一区二区三区欧美视频| 97久久久精品综合88久久| 欧美videossexotv100| 夜夜嗨av一区二区三区| 91网站视频在线观看| 精品国产免费一区二区三区香蕉| 亚洲国产精品一区二区久久恐怖片| 青青青爽久久午夜综合久久午夜| 99re这里都是精品| 欧美国产欧美综合| 成人av影视在线观看| 26uuu精品一区二区| 日韩精品每日更新| 欧美精品少妇一区二区三区| 亚洲男女毛片无遮挡|