?? myuserinfo.java
字號:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.web.form.*;
import com.laoer.bbscs.bean.*;
import com.laoer.bbscs.web.servlet.*;
import com.laoer.bbscs.sys.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;
/**
* <p>Title: TianYi BBS</p>
* <p>Description: TianYi BBS System</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: LAOER.COM/TIANYISOFT.NET</p>
* @author laoer
* @version 6.0
*/
public class MyUserInfo
extends BaseAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
UserInfoForm form = (UserInfoForm) actionForm;
UserCheck uc = this.getUserCheck(httpServletRequest, httpServletResponse,
Constant.MESSAGE.getMessage(
httpServletRequest.getLocale(), "place.userinfo"));
if (SysInfo.getInstance().getSeeuserinfo() != 0) {
if (uc.isGuest()) {
errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
saveErrors(httpServletRequest, errors);
//return actionMapping.findForward("login");
return SysUtil.getPassLogin(actionMapping);
}
}
httpServletRequest.setAttribute("uc", uc);
com.laoer.bbscs.bean.UserInfo ui = null;
if (form.getT().equals("id")) {
ui = getUserInfoService().findUserInfoById(new Long(form.getId()));
if (ui == null) {
errors.add("getpost", new ActionError("error.getusererror"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
}
if (form.getT().equals("name")) {
ui = getUserInfoService().findUserInfoByUserName(form.getUsername());
if (ui == null) {
errors.add("getpost", new ActionError("error.getusererror"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
}
UserDetail ud = null;
ud = getUserDetailService().findUserDetailByUserID(ui.getId());
if (ud == null) {
ud = new UserDetail();
}
httpServletRequest.setAttribute("ui", ui);
httpServletRequest.setAttribute("ud", ud);
return actionMapping.findForward("userinfo");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -