<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ include file="/sessionInfo.jsp"%>
<%
  strSkin_SESSION = "../../images/skin2_blue2";
%>
<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>

<%
 
	ReadAnnexXml readAnnexXml = new ReadAnnexXml();
    Iterator iter = readAnnexXml.getAnnexXmlCollenction().iterator();
%>
<!-----上面的工具栏------>
<%@ include file="title.jsp"%>
<table width="100%">
  <tr>
    <td>
      <%=SzPageHelp.button("添加", "javascript:FormSubmit(formList, 'update.jsp?OPERATOR=add');")%>
    </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>附件类型</td>
    <td width="70">操作</td>
  </tr>
<%
    String tableName = ""; 
		String[] annexXml = null;
    int i = 0;
    String sTemp = "";
    int iM = 0;
  	String sM = "";
    while (iter != null && iter.hasNext()) {
    	//fileSize,allowFileExt,savePath,id,desc,tableName
    	annexXml = (String[])iter.next();
    	tableName = annexXml[5];
    	sTemp = "";
    	i++;
    	iM = 0;
    	sM = "";
      if (!annexXml[0].equals("")) {
				iM = SzConvert.toInt(annexXml[0]);
				if (iM > 1000 * 1000) {
					sM = (iM/1000/1000) + "M";
				} else if (iM >  1000) {
					sM = (iM/1000) + "K";
				} else {
					sM = (iM) + "B";
				}
    	}      	
%>
  <tr onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
    <td><%=i%>&nbsp;</td>
    <td><%=annexXml[4]%>&nbsp;</td>
    <td><%=annexXml[0]%>&nbsp;(<%=sM%>)</td>
    <td style="word-break:break-all;"><%=annexXml[1]%>&nbsp;</td>
    <td>
      <a href="update.jsp?OPERATOR=update&tableName=<%=tableName %>">修改</a>    
      <a href="control.jsp?OPERATOR=delete&tableName=<%=tableName %>" onclick="return confirm('删除后无法恢复,确定要删除吗?')">删除</a>
    </td>
  </tr>
<%
    }
    out.println(SzPageHelp.outIndexTableTr(i, SzProperties.I_PageSize,5));
%>
  </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>
