<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzLevelNumber" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ include file="/sessionInfo.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>
<%
    int iFormID = SzConvert.toInt(request.getParameter("FormID"));
		int iFrom = SzConvert.toInt(request.getParameter("From"));
    String flowType = SzConvert.toSpaceStr(request.getParameter("flowType"));
		if (flowType.equals("")) {
			flowType = "-1";
		}	
    //取得表单的信息
    String moduleName = "";
    String formName = "";
		//根据表单取得moduleName, formName
		LcForm lcForm = new LcForm();
		LcFormInfo lcFormInfo = null;    
    if (iFormID == 0) {
    	moduleName = SzConvert.toSpaceStr(request.getParameter("moduleName"));
    	formName = SzConvert.toSpaceStr(request.getParameter("formName")); 
    	//
    	iFormID = lcForm.getKeyByCond(moduleName, formName); 
    } else {
    	lcFormInfo = (LcFormInfo)lcForm.getInfoByKey(iFormID);    
    	if (lcFormInfo != null) {
    		moduleName = lcFormInfo.getBDLJ();
    		formName = lcFormInfo.getBDBY1();  
    	}
    }
    //System.out.println("moduleName=" + moduleName);
    //System.out.println("formName=" + formName);
    if (moduleName.equals("") || formName.equals("")) {
    	out.println("还没有设置相关表单信息！");
    	return;
    }
    
    String id     = SzConvert.toSpaceStr(request.getParameter("id"));          
    Iterator iter = null;
    String sUrl = "index.jsp";
    if (iFrom == 2) {
    	sUrl = "index_manage.jsp";
    }    

    
    BdCollect bdCollect = new BdCollect();
    String s[] = bdCollect.getInfo(id);
    
%>
<!-----上面的工具栏------>
<%@ include file="title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="id" value="<%=id%>">   
  <input type="hidden" name="From" value="<%=iFrom%>"> 
  <tr>
    <td>  
      <% out.println(bdCollect.printSearchInfo(s, request)); %>
      <% out.println(bdCollect.exportExcelButton(s)); %>
      <%=SzPageHelp.button("返回统计","javascript:FormSubmit(formBar, 'stat.jsp');") %>    
      <%=SzPageHelp.button("返回列表","javascript:FormSubmit(formBar, '" + sUrl + "');") %> 
      
    </td>
  </tr>
  </form>
</table>
<!-----信息列表----->
<table width="100%">
  <tr>
    <td align="center"><font size="3"><b><%=s[3] %></b></font>&nbsp;</td>
  </tr>
</table>    
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="id" value="<%=id%>">   
  <input type="hidden" name="From" value="<%=iFrom%>">   
  <input type="hidden" name="flowType" value="<%=flowType%>">    
  <%=bdCollect.printCollectInfo(s, request)%>
  </form>  
</table>  

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="id" value="<%=id%>">  
  <input type="hidden" name="From" value="<%=iFrom%>">   
  <input type="hidden" name="flowType" value="<%=flowType%>">     
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="id" value="<%=id%>">    
  <input type="hidden" name="From" value="<%=iFrom%>">   
  <input type="hidden" name="flowType" value="<%=flowType%>">    
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>

