<%@ 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.flow.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ 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 sPFORM = SzConvert.toZeroStr(request.getParameter("PFORM")); 
    String sType2  = SzConvert.toZeroStr(request.getParameter("type2"));	//关联的ID
    String sPKEY2  = SzConvert.toZeroStr(request.getParameter("PKEY2"));	//主表单信息ID
    String sPFORM2 = SzConvert.toZeroStr(request.getParameter("PFORM2"));	//主表单ID
	
    int iFormID = SzConvert.toInt(request.getParameter("FormID"));
%>

<%
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
	
    boolean flag = false;
    String sUrl = "relate_index.jsp";
    String sMessage = "";
    if (sOPERATOR.equals("delete")) {
      	BdRelateForm relateForm = new BdRelateForm();
      	relateForm.deleteRelateFormInfo(request,session);
      	flag = true;
    }
    sMessage = SzOut.getMessage();
    
%>
<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="PFORM" value="<%=sPFORM%>">  
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="FormID" value="<%=iFormID%>">   
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">
  <input type="hidden" name="type2" value="<%=sType2%>">
  <input type="hidden" name="PKEY2" value="<%=sPKEY2%>">  
  <input type="hidden" name="PFORM2" value="<%=sPFORM2%>">   
</form>
<%    
    if (flag) {
        out.println(SzPageHelp.jsAlert("操作成功"));
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>
