src/com/office/action/PcardAction.java

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.office.action;

import java.util.ArrayList;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.office.actionform.LogonForm;
import com.office.actionform.PcardForm;
import com.office.dao.Content;
import com.office.dao.DB;
import com.office.tools.Change;
import com.office.tools.CheckUserAble;

public class PcardAction extends Action {
	public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response){
		HttpSession session=request.getSession();
		LogonForm logonuser=(LogonForm)session.getAttribute("logonuser");
		 if(logonuser==null){
			 ActionErrors errors=new ActionErrors();
			 errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("office.logon.notallow"));
			 saveErrors(request,errors);
			 return mapping.findForward("notallowlogon");
		 }
		String mark=mapping.getParameter();
		ActionForward forward=new ActionForward();
		if(mark.equals("pcard_look"))
			forward=executePcardLook(mapping,form,request,response);
		if(mark.equals("pcard_sigle_look"))
			forward=executePcardSigleLook(mapping,form,request,response);
		if(mark.equals("pcard_del"))
			forward=executePcardDel(mapping,form,request,response);
		if(mark.equals("pcard_add"))
			forward=executePcardAdd(mapping,form,request,response);
		if(mark.equals("pcard_update"))
			forward=executePcardUpdate(mapping,form,request,response);
		return forward;
	}
	
	public ActionForward executePcardLook(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response){
		HttpSession session=request.getSession();
		session.setAttribute("selectmenu1", "pcard");
		session.setAttribute("selectmenu2", "pcard_look");
	    String sql="select * from "+Content.TB_PCARD+" order by "+Content.PCARDTIME+" desc";
	    
	    String str_currentpage=request.getParameter("page");
        if(str_currentpage==null||str_currentpage.equals(""))
			 str_currentpage="0";
		int currentpage=Change.strtoint(str_currentpage);
		if(currentpage<=0)
			currentpage=1;

	    DB db=new DB();
	    ArrayList pcardlist=db.getallpcardlist(sql,currentpage);
后面还有 188 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。