?? searchpost.java
字號:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.web.form.*;
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 SearchPost
extends BaseAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
SearchPostForm form = (SearchPostForm) actionForm;
UserCheck uc = this.getUserCheck(httpServletRequest, httpServletResponse,
form.getBid());
if (uc.isGuest()) {
errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
saveErrors(httpServletRequest, errors);
//return actionMapping.findForward("login");
return SysUtil.getPassLogin(actionMapping);
}
if (uc.getBs() == null) {
errors.add("error.baordsno", new ActionError("error.baordsno"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
if (uc.getBs().getAttrib5() == 0) {
errors.add("error.forum.canontread",
new ActionError("error.forum.canontread"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
Pages pages = new Pages(httpServletRequest);
pages.setPage(form.getPage());
pages.setPerPageNum(40);
//pages.setPerPageNum(uc.getFormPerNum());
pages.setFileName("searchPost" + Constant.FILEPREFIX + "?bid=" +
form.getBid() + "&con=" +
SysUtil.encodeURL(form.getCon(), Constant.CHARSET) +
"&text=" +
SysUtil.encodeURL(form.getText(), Constant.CHARSET));
pages.setStyle(1);
PageList pl = getForumService().getSearchList(form.getBid(), form.getCon(),
form.getText(), pages);
httpServletRequest.setAttribute("pl", pl);
httpServletRequest.setAttribute("uc", uc);
httpServletRequest.setAttribute("pages", String.valueOf(form.getPage()));
return actionMapping.findForward("searchpost");
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -