📄 adminopen.java
字号:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.web.form.*;
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 AdminOpen
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");
}
AdminOpenForm form = (AdminOpenForm) actionForm;
if (form.getAction().equals("edit")) {
form.setAction("editdo");
form.setClosemsg(getSysInfo().getClosemsg());
form.setOpen(getSysInfo().getOpen());
httpServletRequest.setAttribute("adminOpenForm", form);
return actionMapping.findForward("adminopen");
}
if (form.getAction().equals("editdo")) {
this.getSysInfo().setClosemsg(form.getClosemsg());
this.getSysInfo().setOpen(form.getOpen());
this.getSysInfo().changeConfig();
return actionMapping.findForward("adminopen");
}
return actionMapping.findForward("error");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -