<%@ 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.flow.*" %>
<%@ include file="/sessionInfo.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"));  
    int iFormID = SzConvert.toInt(request.getParameter("FormID"));
    int iInfoID = SzConvert.toInt(request.getParameter("InfoID"));    
    
    String MailAlert = SzConvert.toZeroStr(request.getParameter("MailAlert"));
    
%>
<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="OPERATOR" value="<%=sOPERATOR%>">  
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">
</form>
<%
    LcPass lcPass = new LcPass();
    boolean flag = false;
    String sUrl = "index.jsp";
    String sMessage = "";
    if (sOPERATOR.equals("delete")) {        
        flag = lcPass.delete(request);
    	sUrl = "index_manage.jsp";
    } else {
        if (sOPERATOR.equals("add")) {
            flag = lcPass.add(request);
        } else if (sOPERATOR.equals("update")) {
            flag = lcPass.update(request);
        } else if (sOPERATOR.equals("pass")) {
        	flag = lcPass.pass(request);
        	sUrl = "index_manage.jsp";
        }
    }
    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));
    }
%>
