<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<%
Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
Response.AddHeader("pragma", "no-cache");
Response.AddHeader("cache-control", "private");
Response.CacheControl = "no-cache";
%>
<script language="c#" runat="server">
protected bool IsImage(DataRow record)
{
	string name = record[Alias.Skin.Image.FileName].ToString().ToLower();
	if (name.EndsWith("gif") || name.EndsWith("jpg") || name.EndsWith("jpeg") || name.EndsWith("png") || name.EndsWith("bmp"))
		return true;
	else
		return false;
}
</script>
<ali:List Object="Skin.Image" Operation="ListFile(Request.QueryString['SkinPath'], Request.QueryString['Folder'])" Validate="True">
	<table>
		<ali:Row MaxCol="4">
			<tr>
				<ali:Col MaxRecord="1">
					<ali:Record>
						<td id="<%=FileName%>">
							<%If IsImage(Record)%>
								<a href="<%=Manager.GetImagePath(Request.QueryString["SkinPath"])%><%=Request.QueryString["Folder"]%>/<%=FileName%>" target="_blank"><img src="<%=Manager.GetImagePath(Request.QueryString["SkinPath"])%><%=Request.QueryString["Folder"]%>/<%=FileName%>" /></a>
								<div><%=FileName%>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:OnDeleteFile('<%=FileName%>')"><img src="<%=ImagePath%>delete.gif" style="vertical-align:middle" /></a></div>
							<%Else%>
								<a href="<%=Manager.GetImagePath(Request.QueryString["SkinPath"])%><%=Request.QueryString["Folder"]%>/<%=FileName%>" target="_blank">点击看原文件</a>
								<div><%=FileName%>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:OnDeleteFile('<%=FileName%>')"><img src="<%=ImagePath%>delete.gif" style="vertical-align:middle" /></a></div>
							<%EndIf%>
						</td>
					</ali:Record>
				</ali:Col>
			</tr>
		</ali:Row>
	</table>
</ali:List>					
