<%@ 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.formEngine2.*" %>
<%@ page import="net.sz600.formCreate.*" %>
<%@ include file="sessionInfo2.jsp"%>
<head>
<title>数飞表单引擎</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
    String moduleName = SzConvert.strWriteData(request.getParameter("moduleName"));
    String formName = SzConvert.strWriteData(request.getParameter("formName"));
%>
<%
   //获得脚本，并且显示，最终提交到formControl.jsp里执行（或本页面执行）
   BdFormGenerator formGenerator = new BdFormGenerator(moduleName, formName);
   String sSql = formGenerator.genCheckSql(sOPERATOR);

   BdFormControl formControl = new BdFormControl();
	 boolean isFormEngine = formControl.isFormEngine(moduleName);    
%>
<!-----上面的工具栏------>
<% if (isFormEngine) { %>
<%@ include file="title.jsp"%>
<% } else { %>
<%@ include file="simpleTitle.jsp"%>
<% } %>

<div align="left">
  <%=SzPageHelp.button("执行","javascript:formHidden.submit();") %>
  <%=SzPageHelp.button("返回","javascript:document.location.href='formIndex.jsp?module=" + moduleName + "';") %>
</div>
<form name="formHidden" method="post" action="formControl.jsp">
  <input type="hidden" name="moduleName" value="<%=moduleName%>">  
  <input type="hidden" name="formName" value="<%=formName%>"> 
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">
  <textarea class="areaClass2" name="ReSQL" style="width:700px;height:500px;"><%=sSql %></textarea>
</form>
<div align="center">
  <%=SzPageHelp.button("执行","javascript:formHidden.submit();") %>
  <%=SzPageHelp.button("返回","javascript:document.location.href='formIndex.jsp?module=" + moduleName + "';") %>
</div>