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

📄 commactive.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:   CommActive.java

package com.laoer.bbscs.web.action;

import com.laoer.bbscs.sys.Constant;
import com.laoer.bbscs.sys.SysUtil;
import com.laoer.bbscs.web.form.CommActiveForm;
import com.laoer.bbscs.web.servlet.UserCheck;
import com.laoer.comm.util.FileIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.*;

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

public class CommActive extends BaseAction
{

    public CommActive()
    {
    }

    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
    {
        ActionErrors errors = new ActionErrors();
        CommActiveForm form = (CommActiveForm)actionForm;
        UserCheck uc = getUserCheck(httpServletRequest, httpServletResponse);
        if(uc.isGuest())
        {
            errors.add("error.pleaselogin", new ActionError("error.pleaselogin"));
            saveErrors(httpServletRequest, errors);
            return SysUtil.getPassLogin(actionMapping);
        }
        if(!uc.isSuperAdmin() && !uc.isBulletin())
        {
            errors.add("error.purviewerror", new ActionError("error.purviewerror"));
            saveErrors(httpServletRequest, errors);
            return actionMapping.findForward("error");
        }
        if(form.getAction().equals("edit"))
        {
            form.setAction("editdo");
            String content = FileIO.readFile(SysUtil.getIncludeFilePath() + Constant.ACTIVEFILE, Constant.CHARSET);
            form.setContent(content);
            httpServletRequest.setAttribute("commActiveForm", form);
            return actionMapping.findForward("active");
        }
        if(form.getAction().equals("editdo"))
        {
            FileIO.writeFile(form.getContent(), SysUtil.getIncludeFilePath() + Constant.ACTIVEFILE, Constant.CHARSET);
            ActionForward f = new ActionForward("/commActive" + Constant.FILEPREFIX, true);
            return f;
        } else
        {
            return actionMapping.findForward("error");
        }
    }
}

⌨️ 快捷键说明

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