<%@ 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.SzLogin" %>
<%@ page import="net.sz600.organize.SzLoginInfo" %>
<%@ page import="net.sz600.organize.SzUser" %>
<%@ page import="net.sz600.organize.SzUserInfo" %>
<%@ page import="net.sz600.organize.SzUserHelp" %>
<%@ page import="net.sz600.basicdata.*" %>
<%
    //获取提交的参数
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
%>
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
</form>
<%
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));

    SzLogin szLogin = new SzLogin();
    boolean flag = false;
    String sUrl = "index.jsp";
    String sMessage = "";
		//flag = szLogin.control(request, session);
		//SzUserHelp.updateAllStatic();
    String filename = "";
    if (sOPERATOR.equals("export")) {        
    	ExportXml exportXml = new ExportXml();
    	filename = exportXml.export(request, session); 
    	if (!filename.equals("")) {
    		flag = true;	
    	}
    	  
    } else {
    	flag = szLogin.control(request, session);
      SzUserHelp.updateAllStatic();
      //2015-12-27更新权限
      net.sz600.organize.SzPopedom.updatePopodomStatic();      	
    } 
    
    sMessage = SzOut.getMessage();
	

    if (flag) {
        if (sOPERATOR.equals("export")) {
            out.println(SzPageHelp.jsFormSubmitBlank("formHidden", "../../down.jsp?tablename=export&filename=" + filename));
        } else {
        		out.println(SzPageHelp.jsAlert("操作成功"));
        }
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }

%>
