<%@ page contentType="text/html;charset=GBK" %>
<%@ 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.*" %>
<%@ page import="net.sz600.weboffice.*" %>
<%@ page import="com.jspsmart.upload.SmartUpload" %>
<%@ page import="com.jspsmart.upload.Request" %>
<%@ include file="/sessionInfo.jsp"%>
<%@ include file="/docEngine/docEngineSession.jsp"%>
<%
    SmartUpload smartUpload = new SmartUpload();
    smartUpload.initialize(pageContext);
    smartUpload.upload();
    Request requestSu = smartUpload.getRequest();

    //获取提交的参数
    String sType = SzConvert.toZeroStr(requestSu.getParameter("type"));
    String sPage = SzConvert.toZeroStr(requestSu.getParameter("page"));
    String sSearch = SzConvert.uploadWriteData(requestSu.getParameter("txtSearch"));
    String sPKEY = SzConvert.toZeroStr(requestSu.getParameter("PKEY"));
    String sKEY = SzConvert.toZeroStr(requestSu.getParameter("KEY"));
    String sOPERATOR = SzConvert.toSpaceStr(requestSu.getParameter("OPERATOR"));  
    String RecordID = SzConvert.toSpaceStr(requestSu.getParameter("RecordID"));
    String XXFL = SzConvert.toZeroStr(requestSu.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="OPERATOR" value="<%=sOPERATOR%>">
  <input type="hidden" name="KEY" value="<%=sKEY%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="XXFL" value="<%=XXFL%>">
</form>
<%
    WdyqDoc wdyqDoc = new WdyqDoc(moduleId);
    boolean flag = false;
    String sUrl = "list_index.jsp";
    String sMessage = "";
    if (sType.equals("1") || sType.equals("2")) {
    	sUrl = "index_m.jsp";
    }

    if (sOPERATOR.equals("delete")) {
    } else if (sOPERATOR.equals("feedback")) {
        sUrl = "feedback.jsp";
    } else if (sOPERATOR.equals("task")) {
    	sUrl = "list_index.jsp";
    } 
    flag = wdyqDoc.control(smartUpload, session);
    sMessage = SzOut.getMessage();
    //2012-06-13
    smartUpload.closeAll();
    
    if (flag) {
        out.println(SzPageHelp.jsAlert("操作成功"));
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>
