📄 adminmail.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 AdminMail
extends AdminBaseAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
AdminMailForm form = (AdminMailForm) actionForm;
if (!isLogin(httpServletRequest)) {
errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("adminlogin");
}
if (form.getAction().equals("edit")) {
form.setAction("editdo");
form.setMailpasswd(this.getSysInfo().getMailpasswd());
form.setMailuser(this.getSysInfo().getMailuser());
form.setSmtp(this.getSysInfo().getSmtp());
form.setSmtpauth(this.getSysInfo().getSmtpauth());
form.setSmtpmail(this.getSysInfo().getSmtpmail());
httpServletRequest.setAttribute("adminMailForm", form);
return actionMapping.findForward("adminmail");
}
if (form.getAction().equals("editdo")) {
this.getSysInfo().setMailpasswd(form.getMailpasswd());
this.getSysInfo().setMailuser(form.getMailuser());
this.getSysInfo().setSmtp(form.getSmtp());
this.getSysInfo().setSmtpauth(form.getSmtpauth());
this.getSysInfo().setSmtpmail(form.getSmtpmail());
this.getSysInfo().changeConfig();
ActionForward f = new ActionForward("/adminMail" + Constant.FILEPREFIX, true);
return f;
}
return actionMapping.findForward("error");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -