?? myonline.java
字號:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.web.form.*;
import com.laoer.bbscs.bean.*;
import com.laoer.bbscs.sys.*;
import org.apache.struts.action.*;
import com.laoer.bbscs.web.servlet.*;
import javax.servlet.http.*;
import java.util.*;
/**
* <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 MyOnline
extends BaseAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
BaseForm form = (BaseForm) actionForm;
UserCheck uc = this.getUserCheck(httpServletRequest, httpServletResponse,
Constant.MESSAGE.getMessage(
httpServletRequest.getLocale(),
"place.online"));
if (uc.isGuest()) {
errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
saveErrors(httpServletRequest, errors);
LoginForm loginForm = new LoginForm();
loginForm.setTourl(SysUtil.getToURL(httpServletRequest,
"online" + Constant.FILEPREFIX +
"?action=" + form.getAction()));
/*
loginForm.setTourl(SysUtil.encodeURL("online" + Constant.FILEPREFIX +
"?action=" + form.getAction(),
Constant.CHARSET));*/
httpServletRequest.setAttribute("loginForm", loginForm);
//return actionMapping.findForward("login");
return SysUtil.getPassLogin(actionMapping);
}
List onlinelist = new ArrayList();
if (form.getAction().equals("user")) {
onlinelist = this.getUserOnlineService().getUserOnlineList();
}
if (form.getAction().equals("friend")) {
UserInfo ui = getUserCache().getUserInfoFromCache(uc.getId());
if (ui == null) {
errors.add("error.getusererror", new ActionError("error.getusererror"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
onlinelist = this.getUserOnlineService().getFriendOnlineList(
getUserInfoService().getFriendList(ui));
}
httpServletRequest.setAttribute("onlinelist", onlinelist);
return actionMapping.findForward("online");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -