<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.system.SzOut" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.organize.SzModule" %>
<%@ page import="net.sz600.organize.SzModuleInfo" %>
<%@ include file="/sessionInfo.jsp"%>
<%
    //获取提交的参数
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
		String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String FirstMKBH = SzConvert.toZeroStr(request.getParameter("FirstMKBH"));  
    String SecondMKBH = SzConvert.toZeroStr(request.getParameter("SecondMKBH"));    
%>
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="type" value="<%=sType%>">  
  <input type="hidden" name="FirstMKBH" value="<%=FirstMKBH%>">   
  <input type="hidden" name="SecondMKBH" value="<%=SecondMKBH%>">   
</form>
<%
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));

    SzModule szModule = new SzModule();
    boolean flag = false;
    String sUrl = "index.jsp";
    String sMessage = "";
		
		flag = szModule.control(request, session);

    sMessage = SzOut.getMessage();

    //更新菜单数据
    SzModule.updateModuleMap();

    if (flag) {
        if (sOPERATOR.equals("export")) {
            out.println(SzPageHelp.jsFormSubmitBlank("formHidden", "../../down.jsp?tablename=export&filename=" + szModule.getExportFile(szDLID_SESSION)));
        } else {
        	//自动刷新左侧菜单
        	out.println("<script language='javascript'>");
        	//out.println("window.top.szMenuFrame.reload();");
        	//out.println("parent.frames('szMenuFrame').document.location='../../main/menu.jsp';");
        	//out.println("top.szMenuFrame.document.location='../../main/menu.jsp';");
        	out.println("</script>");
            out.println(SzPageHelp.jsAlert("操作成功"));
        }
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }    

%>
