<%@ page contentType="text/html;charset=UTF-8" %>
<%@ 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=UTF-8">
<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 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();  
    	}
    }
    if (moduleName.equals("") || formName.equals("")) {
    	out.println("还没有设置相关表单信息！");
    	return;
    }
    
    String id  = SzConvert.toSpaceStr(request.getParameter("id"));      
    String sUrl = "index.jsp";
    if (iFrom == 2) {
    	sUrl = "index_manage.jsp";
    }
    
    BdStat bdStat = new BdStat();
    String s[] = bdStat.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(bdStat.printSearchInfo(s, request)); %>
      <% out.println(bdStat.exportExcelButton(s)); %>
      <%=SzPageHelp.button("返回统计","javascript:FormSubmit(formBar, 'stat.jsp');") %>    
      <%=SzPageHelp.button("返回列表","javascript:FormSubmit(formBar, '" + sUrl + "');") %> 
    </td>
  </tr>
  </form>
</table>
<!-----信息列表----->
<hr>
<table width="100%">
  <tr>
    <td align="center"><font size="3"><b><%=s[3] %></b></font>&nbsp;</td>
  </tr>
</table>  
<table width="750" align="center" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0" align="center">
  <form name="formList" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="id" value="<%=id%>">   
  <%=bdStat.printStatInfo(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%>">   
  </form>
</table>

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