global.jsp
来自「Jive(J道版) Jive(J道版)是在Jive 2.1版本基础上改编而成」· JSP 代码 · 共 55 行
JSP
55 行
<%
/**
* $RCSfile: global.jsp,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:50:31 $
*/
%>
<% // Security check
Authorization authToken = (Authorization)session.getAttribute("jive.admin.authorization");
if (authToken == null) {
response.sendRedirect("login.jsp");
return;
} else {
// check for an anonymous user token
if (authToken.isAnonymous()) {
response.sendRedirect("login.jsp");
return;
}
}
// Get the forum factory object.
ForumFactory forumFactory = ForumFactory.getInstance(authToken);
// Get the user of this page
User pageUser = null;
try {
forumFactory.getUserManager().getUser(authToken.getUserID());
}
catch (Exception e) {
response.sendRedirect("login.jsp");
return;
}
String onload = "";
%>
<%! // Global vars/methods for the entire skin
static final String tableBorderColor = "#999999";
static final String errorColor = "#ff0000";
static final String messageColor = "#006600";
private String getOneTimeMessage(HttpSession session, String name) {
String message = (String)session.getAttribute("admin."+name);
if (message != null) {
session.removeAttribute("admin."+name);
return message;
}
return null;
}
private void setOneTimeMessage(HttpSession session, String name, String value) {
session.setAttribute("admin."+name, value);
}
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?