<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_attach_list" %>
<%@ Register tagPrefix="Dvbbs" namespace="Dvbbs.Controls" assembly="Dvbbs.Web"%>
<%@ Register tagPrefix="bbs" namespace="Dvbbs.bbs.Controls" assembly="Dvbbs.bbs"%>
<%@ Register tagPrefix="bbs" tagName="AdminHeader" src="controls/admin_header.ascx"%>
<%@ Register tagPrefix="bbs" tagName="AdminFooter" src="controls/admin_footer.ascx"%>
<bbs:AdminHeader title="附件管理" runat="server" />
<script language="javascript">
function CheckAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
		if (e.name == 'attachid')
			e.checked = form.checkall.checked;
	}
}
</script>
<form name="search" method="get">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table3">
		<tr>
			<th>
				附件管理</th>
		</tr>
		<tr>
			<td class="nf2">
				<div class="underline">功能说明：</div>
				<span>删除附件后，引用此附件的帖子中可能使此图片无法显示或文件无法下载。<br />要搜索未使用于任何帖子的附件，只需在主题ID或帖子ID里里填写0。</span>
			</td>
		</tr>
		<tr>
			<td>搜索： 上传者 <input type="text" id="uploader" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" style="width:100px"
					maxlength="10" runat="server" /> &nbsp; 主题ID <input type="text" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)"
					onMouseOut="IEvent('mouseout',this)" id="topicid" style="width:80px" maxlength="8" runat="server" />
				&nbsp; 回帖ID <input type="text" id="replyid" style="width:80px" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" maxlength="8" runat="server" />
				&nbsp;
				<select id="inboards" name="inboards" style="width:100px">
					<option value="-1">所有版面</option>
					<% foreach (Dvbbs.bbs.Entity.BoardJumpList.BoardInfo bi in Dvbbs.bbs.Entity.ForumCaching.GetBoardJumpList()) { %>
					<option value="<%=bi.BoardId.ToString()%>"><%=bi.BoardType%></option>
					<% } %>
				</select>
				&nbsp;
				<select id="filter" runat="server" style="width:80px">
					<option value="">所有类型</option>
					<option value="image">图片类</option>
					<option value="nonimage">非图片类</option>
				</select>
				&nbsp; <input type="submit" class="button" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" value="搜 索"" />
			</td>
		</tr>
	</table>
</form>
<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table3">
	<tr>
		<th colspan="7">
			附件列表</th>
	</tr>
	<tr align="center">
		<td width="28" class="category">选择</td>
		<td width="120" class="category">附件名</td>
		<td class="category" nowrap="nowrap">所属主题(ID)</td>
		<td width="80" class="category">上传者</td>
		<td width="70" class="category">下载次数</td>
		<td width="70" class="category">附件大小</td>
		<td width="120" class="category">上传时间</td>
	</tr>
	<form id="operate" method="post" runat="server">
		<asp:Repeater enableViewState="false" id="list" runat="server">
			<ItemTemplate>
				<tr align="center" height="30">
					<td><Dvbbs:Span id="attachid" runat="server" /></td>
					<td align="left" style="padding-left:6px" nowrap="nowrap"><Dvbbs:Anchor id="attachname" target="_blank" runat="server" /></td>
					<td align="left"><Dvbbs:Anchor id="topictitle" target="_blank" runat="server" />
						<span>(<Dvbbs:Span id="topicid" runat="server" />)</span>
					</td>
					<td><Dvbbs:Anchor id="username" runat="server" /></td>
					<td><Dvbbs:Span id="downs" class="small" runat="server" /></td>
					<td><Dvbbs:Span id="attachsize" class="small" runat="server" /></td>
					<td align="left" style="padding-left:6px"><Dvbbs:Span id="uploadtime" class="small" runat="server" /></td>
				</tr>
			</ItemTemplate>
		</asp:Repeater>
		<tr>
			<td colspan="7" class="bottom">
				<input type="checkbox" class="checkbox" onclick="CheckAll(operate)" name="checkall" id="checkall">全选/取消 
				&nbsp;&nbsp;&nbsp; <input type="submit" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)"
					onMouseOut="IEvent('mouseout',this)" id="remove" class="button" value="删除选中的附件" onclick="return confirm('确定要彻底删除选中的记录吗?')" />
				&nbsp; &nbsp;
				<Dvbbs:Span id="result" runat="server" />
			</td>
		</tr>
	</form>
	<tr>
		<td colspan="7" class="title"><Dvbbs:Pager id="pager" per="30" runat="server" /></td>
	</tr>
</table>
<bbs:AdminFooter id="footer" runat="server" />
