<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<script language="c#" runat="server">
protected string GetSize(object size)
{
	string unit = " B";
	Single result = Convert.ToSingle(size);
	if (result > 1024)
	{
		result = result / 1024;
		unit = " K";
	}
	if (result > 1024)
	{
		result = result / 1024;
		unit = " M";
	}
	if (result > 1024)
	{
		result = result / 1024;
		unit = " G";
	}
	
	return result.ToString("0.00") + unit;
}
</script>
<table border="0" cellpadding="4" cellspacing="1" class="ListTable">
	<thead>
		<tr>
			<th>名称</th>
			<th width="50">扩展名</th>
			<th>大小</th>
			<th width="120">创建时间</th>
			<th width="120">更新时间</th>
			<th width="40">属性</th>
			<th width="40">重名</th>
			<th width="40">移动</th>
			<th width="40">复制</th>
			<th width="40">压解</th>
			<th width="40">删除</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="2" style="text-align:right">占用空间：</td>
			<td colspan="9" style="text-align:left"></td>
		</tr>
	</tfoot>
	<tbody>
		<ilghar:List ID="List" Object="FileManager" Condition="Folder=Request.QueryString['Folder']" Validate="True">
			<ilghar:Record>
				<tr id="<%=Name%>">
					<th>
						<%If Convert.ToBoolean(IsFolder)%>
							<img src="<%=ImagePath%>tree/folder.gif" /><a href=""><%=Name%></a>
						<%Else%>
							<img src="<%=ImagePath%>tree/file.gif" /><a href="<%=Request.QueryString["Folder"]%><%=Name%>" target="_blank"><%=Name%></a>
						<%EndIf%>
					</th>
					<td><%=Extension%></td>
					<td><%=GetSize(Size)%></td>
					<td><%=CreateTime%></td>
					<td><%=UpdateTime%></td>
					<td><%=Attribute%></td>
					<td><a href="">重名</a></td>
					<td><a href="">移动</a></td>
					<td><a href="">复制</a></td>
					<td>
						<%If Convert.ToString(Extension) == ".zip"%>
							<a href="">解压</a>
						<%Else%>
							<a href="">压缩</a>
						<%EndIf%>
					</td>
					<td><a href="">删除</a></td>
				</tr>
			</ilghar:Record>
		</ilghar:List>
	</tbody>
</table>
