📄 _useraccount__jsp.java
字号:
/*
* JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
*/
package _forum;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.net.URLEncoder;
import com.coolservlets.forum.*;
import com.coolservlets.forum.util.*;
import java.util.Date;
import java.text.SimpleDateFormat;
public class _useraccount__jsp extends com.caucho.jsp.JavaPage{
private boolean _caucho_isDead;
////////////////////////
// global page variables
// date formatter for today's date
private final SimpleDateFormat todayDateFormatter =
new SimpleDateFormat("MMMM d");
///////////////////////
// breadcrumb variables
// change these values to customize the look of your breadcrumb bar
// Colors
final static String crumbBgcolor = "#999999";
final static String crumbFgcolor = "#ccccdd";
/////////////////////
// toolbar variables
// change these values to customize the look of your toolbar
// Colors
final static String toolbarBgcolor = "#cccccc";
final static String toolbarFgcolor = "#eeeeff";
public void
_jspService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException
{
com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.Servlet page = this;
javax.servlet.http.HttpSession session = pageContext.getSession();
javax.servlet.ServletContext application = pageContext.getServletContext();
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("GB2312");
try {
pageContext.write(_jsp_string0, 0, _jsp_string0.length);
/**
* $RCSfile: userAccount.jsp,v $
* $Revision: 1.4 $
* $Date: 2000/12/18 02:04:56 $
*/
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
pageContext.write(_jsp_string2, 0, _jsp_string2.length);
////////////////////////
// Authorization check
// check for the existence of an authorization token
Authorization authToken = SkinUtils.getUserAuthorization(request,response);
// if the token was null, they're not authorized. Since this skin will
// allow guests to view forums, we'll set a "guest" authentication
// token
if( authToken == null ) {
authToken = AuthorizationFactory.getAnonymousAuthorization();
}
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
////////////////////
// get parameters
boolean showEmail = ParamUtils.getBooleanParameter(request,"showEmail");
boolean showName = ParamUtils.getBooleanParameter(request,"showName");
boolean saveChanges = ParamUtils.getBooleanParameter(request,"saveChanges");
String message = ParamUtils.getParameter(request,"msg");
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
///////////////////
// error/page variables
boolean unauthorized = false;
boolean showMessage = (message!=null);
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
/////////////////////
// create user object
ForumFactory forumFactory = ForumFactory.getInstance(authToken);
ProfileManager manager = forumFactory.getProfileManager();
User user = null;
try {
user = manager.getUser(authToken.getUserID());
}
catch( UserNotFoundException unfe ) {}
boolean isEmailVisible = user.isEmailVisible();
boolean isNameVisible = user.isNameVisible();
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
////////////////////
// save changes if necessary
if( saveChanges && user!=null ) {
try {
if( showName != isNameVisible ) {
user.setNameVisible(showName);
}
if( showEmail != isEmailVisible ) {
user.setEmailVisible(showEmail);
}
response.sendRedirect("userAccount.jsp?msg="
+ URLEncoder.encode("修改保存成功.") );
return;
}
catch( UnauthorizedException ue ) {
unauthorized = true;
}
}
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
/////////////////////
// page title
String title = "Jive 用户账号";
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
/////////////////////
// page header
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
/**
* $RCSfile: header.jsp,v $
* $Revision: 1.3 $
* $Date: 2000/12/18 02:04:56 $
*/
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string4, 0, _jsp_string4.length);
pageContext.write(_jsp_string5, 0, _jsp_string5.length);
/////////////////////
// header variables
// change these values to customize the look of your header
// Colors
String headerBgcolor = "#000000";
String headerFgcolor = "#ffffff";
// header image vars
String headerImgURL = "";
String headerImgSRC = "images/jnjtzxlt.gif";
String headerImgWidth = "140";
String headerImgHeight = "60";
String headerImgAltText = "Jive: 实例层";
// Header text
String headerText = "";
pageContext.write(_jsp_string6, 0, _jsp_string6.length);
out.print(( headerFgcolor ));
pageContext.write(_jsp_string7, 0, _jsp_string7.length);
out.print(( headerImgURL ));
pageContext.write(_jsp_string8, 0, _jsp_string8.length);
out.print(( headerImgSRC ));
pageContext.write(_jsp_string9, 0, _jsp_string9.length);
out.print(( headerImgWidth ));
pageContext.write(_jsp_string10, 0, _jsp_string10.length);
out.print(( headerImgHeight ));
pageContext.write(_jsp_string11, 0, _jsp_string11.length);
out.print(( headerImgAltText ));
pageContext.write(_jsp_string12, 0, _jsp_string12.length);
out.print(( headerText ));
pageContext.write(_jsp_string13, 0, _jsp_string13.length);
////////////////////
// breadcrumb array & include
String[][] breadcrumbs = {
{ "论坛主页", "" },
{ "用户帐号", "" }
};
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
/**
* $RCSfile: breadcrumb.jsp,v $
* $Revision: 1.4 $
* $Date: 2000/12/18 02:04:56 $
*/
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string6, 0, _jsp_string6.length);
out.print(( crumbBgcolor ));
pageContext.write(_jsp_string14, 0, _jsp_string14.length);
out.print(( crumbFgcolor ));
pageContext.write(_jsp_string15, 0, _jsp_string15.length);
// don't show any breadcrumbs if the breadcrumbs array is null or
// zero length
if( breadcrumbs != null && breadcrumbs.length > 0 ) {
// loop through the breadcrumbs array, only display the first
// n-1 items (the last one will be displayed as a non-link
// because that should represent the page we're on.
int i=0;
while( breadcrumbs.length > 1 && i < (breadcrumbs.length-1) ) {
pageContext.write(_jsp_string16, 0, _jsp_string16.length);
out.print(( breadcrumbs[i][1] ));
pageContext.write(_jsp_string17, 0, _jsp_string17.length);
out.print(( breadcrumbs[i][0] ));
pageContext.write(_jsp_string18, 0, _jsp_string18.length);
i++;
}
if( breadcrumbs.length >= 1 ) {
pageContext.write(_jsp_string19, 0, _jsp_string19.length);
out.print(( breadcrumbs[i][0] ));
pageContext.write(_jsp_string20, 0, _jsp_string20.length);
// end of while loop
}
pageContext.write(_jsp_string21, 0, _jsp_string21.length);
// grab the username to display who we are logged in as. If the
// authentication token is null, that means a guest is viewing the page,
// so display "guest" instead of a username:
boolean loggedIn = authToken != null && !user.isAnonymous();
String username = "<i>游客</i>";
if( loggedIn ) {
username = user.getUsername();
}
pageContext.write(_jsp_string22, 0, _jsp_string22.length);
if( loggedIn ) {
pageContext.write(_jsp_string23, 0, _jsp_string23.length);
out.print(( username ));
pageContext.write(_jsp_string24, 0, _jsp_string24.length);
} else {
pageContext.write(_jsp_string25, 0, _jsp_string25.length);
}
pageContext.write(_jsp_string26, 0, _jsp_string26.length);
}
pageContext.write(_jsp_string27, 0, _jsp_string27.length);
///////////////////
// toolbar variables
boolean showToolbar = true;
String viewLink = null;
String postLink = null;
String replyLink = null;
String searchLink = null;
String accountLink = null;
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
/**
* $RCSfile: toolbar.jsp,v $
* $Revision: 1.4.2.1 $
* $Date: 2001/01/21 21:30:25 $
*/
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
//////////////////
// variables for displaying items on the toolbar
boolean showLink = (viewLink!=null && !viewLink.equals(""));
boolean showPost = (postLink!=null && !postLink.equals(""));
boolean showReply = (replyLink!=null && !replyLink.equals(""));
boolean showSearch = (searchLink!=null && !searchLink.equals(""));
boolean showAccount = (accountLink!=null && !accountLink.equals(""));
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
/////////////////////
// toolbar variables
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -