<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.formCreate.*" %>
<%@ include file="/xml/formEngine2/sessionInfo2.jsp"%>
<%
    strLevel_SESSION = "../../../";
    strSkin_SESSION = "../../../images/skin1";
    
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
		String category = SzConvert.toSpaceStr(request.getParameter("category"));    		
%>
<form name="formHidden" method="post">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">
  <input type="hidden" name="category" value="<%=category%>">   
</form>
<%

    boolean flag = true;
    String sUrl = "index.jsp";
    BdCategoryOperator bdCategoryOperator = new BdCategoryOperator();
    
    if (sOPERATOR.equals("add") ) {
    	flag = bdCategoryOperator.add(request);
    } else if (sOPERATOR.equals("delete")) {
    	flag = bdCategoryOperator.delete(request);    	
    }
    
    String sMessage = SzOut.getMessage();
    if (flag) {    	
        out.println(SzPageHelp.jsAlert("²Ù×÷³É¹¦"));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>
