<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.docEngine.*" %>
<%@ include file="/sessionInfo.jsp"%>
<%@ include file="/docEngine/docEngineSession.jsp"%>
<%
    //获取提交的参数
    String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
    String sPKEY = SzConvert.toZeroStr(request.getParameter("PKEY"));
    
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
		String toFLID = SzConvert.toZeroStr(request.getParameter("toFLID"));
    String XXFL = SzConvert.toZeroStr(request.getParameter("XXFL"));
    
%>
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="PKEY" value="<%=sPKEY%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="toFLID" value="<%=toFLID%>">
  <input type="hidden" name="XXFL" value="<%=XXFL%>">
</form>
<%
    
    WdyqDoc wdyqDoc = new WdyqDoc(moduleId);
    boolean flag = false;
    String sUrl = "list_index.jsp";
    if (sType.equals("1") || sType.equals("2")) {
    	sUrl = "index_m.jsp";
    }    
    String sMessage = "";
    String id_str[] = request.getParameterValues("chkId");
    //2014-12：为了增加操作日志，增加session参数
    if (sOPERATOR.equals("delete")) {
        flag = wdyqDoc.delete(id_str, session);
        sMessage = SzOut.getMessage();
    }else if(sOPERATOR.equals("move")){
    		flag = wdyqDoc.move(id_str,toFLID, session);
        sMessage = SzOut.getMessage();
    }
    if (flag) {
        out.println(SzPageHelp.jsAlert("操作成功"));
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>
