📄 adminpost.java
字号:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.web.form.*;
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 AdminPost
extends AdminBaseAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
if (!isLogin(httpServletRequest)) {
errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("adminlogin");
}
AdminPostForm form = (AdminPostForm) actionForm;
if (form.getAction().equals("edit")) {
form.setAction("editdo");
form.setCachemaxlifetime(this.getSysInfo().getCachemaxlifetime());
form.setCachemaxsize(this.getSysInfo().getCachemaxsize());
form.setForumpernum(this.getSysInfo().getForumpernum());
form.setHtmledit(this.getSysInfo().getHtmledit());
form.setIndexall(this.getSysInfo().getIndexall());
form.setIndextime(this.getSysInfo().getIndextime());
form.setPosthtml(this.getSysInfo().getPosthtml());
form.setPostmaxsize(this.getSysInfo().getPostmaxsize());
form.setPostpernum(this.getSysInfo().getPostpernum());
form.setPostubb(this.getSysInfo().getPostubb());
form.setUpfile(this.getSysInfo().getUpfile());
form.setUpfilename(this.getSysInfo().getUpfilename());
form.setUpfilesize(this.getSysInfo().getUpfilesize());
form.setUpimghigh(this.getSysInfo().getUpimghigh());
form.setUpimgwith(this.getSysInfo().getUpimgwith());
form.setPostminsize(this.getSysInfo().getPostminsize());
form.setVoteexp(this.getSysInfo().getVoteexp());
form.setVotenum(this.getSysInfo().getVotenum());
form.setPosttitlemax(this.getSysInfo().getPosttitlemax());
httpServletRequest.setAttribute("adminPostForm", form);
return actionMapping.findForward("adminpost");
}
if (form.getAction().equals("editdo")) {
this.getSysInfo().setCachemaxlifetime(form.getCachemaxlifetime());
this.getSysInfo().setCachemaxsize(form.getCachemaxsize());
this.getSysInfo().setForumpernum(form.getForumpernum());
this.getSysInfo().setHtmledit(form.getHtmledit());
this.getSysInfo().setIndexall(form.getIndexall());
this.getSysInfo().setIndextime(form.getIndextime());
this.getSysInfo().setPosthtml(form.getPosthtml());
this.getSysInfo().setPostmaxsize(form.getPostmaxsize());
this.getSysInfo().setPostpernum(form.getPostpernum());
this.getSysInfo().setPostubb(form.getPostubb());
this.getSysInfo().setUpfile(form.getUpfile());
this.getSysInfo().setUpfilename(form.getUpfilename());
this.getSysInfo().setUpfilesize(form.getUpfilesize());
this.getSysInfo().setUpimghigh(form.getUpimghigh());
this.getSysInfo().setUpimgwith(form.getUpimgwith());
this.getSysInfo().setPostminsize(form.getPostminsize());
this.getSysInfo().setVoteexp(form.getVoteexp());
this.getSysInfo().setVotenum(form.getVotenum());
this.getSysInfo().setPosttitlemax(form.getPosttitlemax());
this.getSysInfo().changeConfig();
ActionForward f = new ActionForward("/adminPost" + Constant.FILEPREFIX, true);
return f;
}
return actionMapping.findForward("error");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -