⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminpost.java

📁 反ajax原代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   AdminPost.java

package com.laoer.bbscs.web.action;

import com.laoer.bbscs.sys.Constant;
import com.laoer.bbscs.sys.SysInfo;
import com.laoer.bbscs.web.form.AdminPostForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.*;

// Referenced classes of package com.laoer.bbscs.web.action:
//            AdminBaseAction

public class AdminPost extends AdminBaseAction
{

    public AdminPost()
    {
    }

    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(getSysInfo().getCachemaxlifetime());
            form.setCachemaxsize(getSysInfo().getCachemaxsize());
            form.setForumpernum(getSysInfo().getForumpernum());
            form.setHtmledit(getSysInfo().getHtmledit());
            form.setIndexall(getSysInfo().getIndexall());
            form.setIndextime(getSysInfo().getIndextime());
            form.setPosthtml(getSysInfo().getPosthtml());
            form.setPostmaxsize(getSysInfo().getPostmaxsize());
            form.setPostpernum(getSysInfo().getPostpernum());
            form.setPostubb(getSysInfo().getPostubb());
            form.setUpfile(getSysInfo().getUpfile());
            form.setUpfilename(getSysInfo().getUpfilename());
            form.setUpfilesize(getSysInfo().getUpfilesize());
            form.setUpimghigh(getSysInfo().getUpimghigh());
            form.setUpimgwith(getSysInfo().getUpimgwith());
            form.setPostminsize(getSysInfo().getPostminsize());
            form.setVoteexp(getSysInfo().getVoteexp());
            form.setVotenum(getSysInfo().getVotenum());
            form.setPosttitlemax(getSysInfo().getPosttitlemax());
            httpServletRequest.setAttribute("adminPostForm", form);
            return actionMapping.findForward("adminpost");
        }
        if(form.getAction().equals("editdo"))
        {
            getSysInfo().setCachemaxlifetime(form.getCachemaxlifetime());
            getSysInfo().setCachemaxsize(form.getCachemaxsize());
            getSysInfo().setForumpernum(form.getForumpernum());
            getSysInfo().setHtmledit(form.getHtmledit());
            getSysInfo().setIndexall(form.getIndexall());
            getSysInfo().setIndextime(form.getIndextime());
            getSysInfo().setPosthtml(form.getPosthtml());
            getSysInfo().setPostmaxsize(form.getPostmaxsize());
            getSysInfo().setPostpernum(form.getPostpernum());
            getSysInfo().setPostubb(form.getPostubb());
            getSysInfo().setUpfile(form.getUpfile());
            getSysInfo().setUpfilename(form.getUpfilename());
            getSysInfo().setUpfilesize(form.getUpfilesize());
            getSysInfo().setUpimghigh(form.getUpimghigh());
            getSysInfo().setUpimgwith(form.getUpimgwith());
            getSysInfo().setPostminsize(form.getPostminsize());
            getSysInfo().setVoteexp(form.getVoteexp());
            getSysInfo().setVotenum(form.getVotenum());
            getSysInfo().setPosttitlemax(form.getPosttitlemax());
            getSysInfo().changeConfig();
            ActionForward f = new ActionForward("/adminPost" + Constant.FILEPREFIX, true);
            return f;
        } else
        {
            return actionMapping.findForward("error");
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -