<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>图片列表</title>
<link rel="stylesheet"  href="<%=CommonPath%>jquery/themes/lightness/all.css" >
<ali:Comment><link rel="stylesheet"  href="../../../S01/CHS/css/common.css" ></ali:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" >
<style >
.Block TBODY TD{text-align:center}
.Block TBody TD IMG{max-width:120px;width:expression(this.scrollWidth > 120 ? "120px" : true)}
</style>
<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>
<script >
var _page = 'skin_image_list',
    _lang = '<%=ContentLang%>',
    _webPath = '<%=WebPath%>',
    _imagePath = '<%=ImagePath%>',
    _skinPath = '<%=Request.QueryString["SkinPath"]%>',
    _lang_working = '正在操作...',
    _lang_operation_fail = '操作失败！',
    _lang_operation_success = '操作成功！',
    _lang_confirm_delete = '要删除此项吗？',
    _lang_deleted = '已删除',
    _lang_cant_delete_root = '根目录不能删除！';
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" ></div>
	<div class="Title"><a href="../../skin/list.aspx">皮肤列表</a> → <%=Request.QueryString["SkinPath"]%></div>
	<div class="Right"></div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/edit.aspx?Path=<%=Request.QueryString["SkinPath"]%>">编辑</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/picture.aspx?Path=<%=Request.QueryString["SkinPath"]%>">大图</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/thumbnail.aspx?Path=<%=Request.QueryString["SkinPath"]%>">小图</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/css/list.aspx?SkinPath=<%=Request.QueryString["SkinPath"]%>">样式列表</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/css/add.aspx?SkinPath=<%=Request.QueryString["SkinPath"]%>">添加样式</a></li>
		<li class="Right"></li>
		<li class="Left Selected"></li>
		<li class="Middle Selected">图片列表</li>
		<li class="Right Selected"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../../skin/image/add.aspx?SkinPath=<%=Request.QueryString["SkinPath"]%>">添加图片</a></li>
		<li class="Right"></li>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<table border="0" cellpadding="4" cellspacing="1">
		<thead>
			<tr>
				<th>
					文件夹：
					<select name="Folder" id="Folder" style="width:140px">
						<option value="">/</option>
						<ali:List Object="Skin.Image" Operation="ListFolder(Request.QueryString['SkinPath'])">
							<ali:Record>
								<option value="<%=FolderName%>"><%=FolderName%></option>
							</ali:Record>
						</ali:List>
					</select>
					<input type="button" id="DeleteFolder" disabled="disabled" value="删除" >
				</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td id="List">
					<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="">删除</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="">删除</a></div>
												<%EndIf%>
											</td>
										</ali:Record>
									</ali:Col>
								</tr>
							</ali:Row>
						</table>
					</ali:List>					
				</td>
			</tr>			
		</tbody>
	</table>
	<div class="Footer"></div>
</div>
<script src="<%=CommonPath%>jquery/core.js"></script>
<script src="<%=CommonPath%>jquery/ui.js"></script>
<script src="<%=CommonPath%>utility.js"></script>
<script src="<%=JsPath%>global.js"></script>
<script src="<%=ModuleJsPath%>module.js"></script>
</body>
</html>