<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<%
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>
<ilghar:List Object="Skin.Image" Operation="ListFile(Request.QueryString['SkinPath'], Request.QueryString['Folder'])" Validate="True">
	<table>
		<ilghar:Row MaxCol="4">
			<tr>
				<ilghar:Col MaxRecord="1">
					<ilghar: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>
					</ilghar:Record>
				</ilghar:Col>
			</tr>
		</ilghar:Row>
	</table>
</ilghar:List>					
