<%@ 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.formEngine2.*" %>
<%@ 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 moduleName = SzConvert.strWriteData(request.getParameter("moduleName"));
	String formName = SzConvert.strWriteData(request.getParameter("formName"));

    BdCollectControl collectControl = new BdCollectControl();
    Iterator iter = collectControl.getInfoFromXML(moduleName, formName).iterator();
    
    BdFormControl formControl = new BdFormControl();
		boolean isFormEngine = formControl.isFormEngine(moduleName);    
%>
<!-----上面的工具栏------>
<% if (isFormEngine) { %>
<%@ include file="title.jsp"%>
<% } else { %>
<%@ include file="simpleTitle.jsp"%>
<% } %>
<table width="100%">
  <tr>
    <td>
      <%=SzPageHelp.button("添加", "javascript:FormSubmit(formList, 'collect_update.jsp?OPERATOR=add&moduleName=" + moduleName + "&formName=" +formName + "');")%>
      <%=SzPageHelp.button("返回", "javascript:document.location.href='formIndex.jsp?module=" + moduleName + "'")%>      
    </td>
  </tr>
  </form>
</table>

<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post" >

  <tr class="trClassTitle">
    <td>名称</td>
    <td>汇总的字段</td>
    <td>默认条件</td>
    <td width="40">操作</td>
  </tr>
<%
    String id = ""; 
    String s[] = null;
    int i = 0;
    while (iter != null && iter.hasNext()) {
    	s = (String[])iter.next();
    	if (s == null) {
    		continue;
    	}
    	id = s[0];
    	i++;
%>
  <tr>
    <td><%=s[3]%>&nbsp;</td>
    <td><%=s[5]%>&nbsp;</td>
    <td><%=s[6]%>&nbsp;</td>
    <td>
      <a href="collect_update.jsp?OPERATOR=update&id=<%=id%>&moduleName=<%=moduleName %>&formName=<%=formName %>">修改</a>    
      <a href="collect_control.jsp?OPERATOR=delete&id=<%=id%>&moduleName=<%=moduleName %>&formName=<%=formName %>">删除</a>&nbsp;
    </td>
  </tr>
<%
    }
    out.println(SzPageHelp.outIndexTableTr(i, SzProperties.I_PageSize, 4));
%>
  </form>
</table>

<!-----下面的工具栏------>
<table width="100%" cellpadding="1" cellspacing="0">
  <form name="formPage" method="post">
  <tr>
    <td align="right">
      &nbsp;
    </td>
  </tr>
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
