global.jsp

来自「jive3论坛开源 最新 有版主功能 jive3论坛开源 最新 有版主功能 」· JSP 代码 · 共 57 行

JSP
57
字号
<%/** *	$RCSfile: global.jsp,v $ *	$Revision: 1.4 $ *	$Date: 2002/09/16 12:04:54 $ */%><%@ page import="java.text.*,                 java.util.*,                 com.jivesoftware.util.*,                 com.jivesoftware.forum.*,                 com.jivesoftware.forum.util.*,                 com.jivesoftware.base.*"%><%  // Create Jive skin page variables:    //    //  * authToken    - The auth token for the page user (logged-in or guest)    //  * isGuest      - Indicates if the page user is a guest    //  * forumFactory - All Jive objects come from this    //  * pageUser     - The logged-in user using the page (is null if a guest is using the page)    //    // Since this page is included in all skin pages you can refer to these variables as    // local variables.    // Check to see if a Jive authorization token exists. If not, create an anonymous one:    AuthToken authToken = null;    try {        authToken = AuthFactory.getAuthToken(request, response);    }    catch (UnauthorizedException ue) {        authToken = AuthFactory.getAnonymousAuthToken();    }    // Indicate if the user is a guest:    boolean isGuest = authToken.isAnonymous();    // Get the forum factory object.    ForumFactory forumFactory = ForumFactory.getInstance(authToken);    // Get the user of this page and set a custom locale for the user if that    // feature is enabled:    User pageUser = null;    if (!isGuest) {	    pageUser = forumFactory.getUserManager().getUser(authToken.getUserID());    }    // The last time the user visited this page    Date lastVisited = new Date(SkinUtils.getLastVisited(request,response));    // A date formatter used throughout the pages:    DateFormat dateFormatter            = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);    // A short date formatter used throughout the pages:    DateFormat shortDateFormatter = new SimpleDateFormat("MMM, yyyy");%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?