<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>文件管理</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<style type="text/css">
IMG{vertical-align:middle;margin:0 2px}
</style>
<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>
<script type="text/javascript">
var _page = "file_manager_list";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_confirm_delete = "要删除此项吗？";
var _lang_start_slash = "文件夹必须以斜杠开头！";
var _lang_folder_name = "请输入新建文件夹名称？";
var _lang_select_file = "请选择文件！";
var _lang_start_upload = "开始上传文件...";
var _lang_uploading = "正在上传文件...";
var _lang_input_name = "请输入新名称？";
var _lang_target_folder = "请输入目标文件夹？";
var _lang_target_name = "请输入目标？";
var _lang_target_file = "请输入目标文件？";
var _lang_must_be_zip = "目标文件扩展名应是.zip！";
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title">文件管理</div>
	<div class="Right"></div>
</div>
<div class="Block">
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle">文件管理</li>
		<li class="Right"></li>
	</ul>
	<div class="ToolBar">
		地址：
		<input type="text" id="Folder" value="/" class="Text" />
		<input type="button" id="Open" value="打开" />
		<input type="button" id="Up" value="上层" />
		<input type="button" id="CreateFolder" value="新建文件夹" />
		文件：
		<form style="display:inline">
			<input id="FileTextbox" type="text" name="File" disabled="disabled" class="Text" />
			<input id="FileBrowse" type="button" value="浏览..." />
			<input type="submit" value="上传" />
			<input type="checkbox" id="AddWaterMark"><label for="AddWaterMark">水印</label>
		</form>
	</div>
	<div id="List">
		<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" 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="<%=WebPath%><%=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>
	</div>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=CommonPath%>uploader.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=JsPath%>system.js"></script>
</body>
</html>