<!-- #include file="Setup.asp" -->
<%
top
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>论坛")

if Request("menu")="DelPostAttachment" then
for each ho in Request.form("ID")
ho=int(ho)

sql="select * from [BBSXP_UpFiles] where id="&ho&" and UserName='"&CookieUserName&"'"
Rs.Open sql,Conn,1,3

if Not Rs.Eof then
if DelFile(""&RS("FilePath")&"") then Rs.Delete
End if

Rs.close

next
error2("删除成功")
end if

sql="[BBSXP_UpFiles] where UserName='"&CookieUserName&"'"
rs.Open ""&sql&" order by id Desc",Conn,1
TotalCount=conn.Execute("Select count(ID) From "&sql&"")(0) '获取数据数量
PageSetup=20 '设定每页的显示数量
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = cint(Request.QueryString("PageIndex")) '获取当前页
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>1 then RS.Move (PageCount-1) * pagesetup
TotalUserPostAttachments=conn.execute("Select sum(ContentSize) from "&sql&"")(0)
if ""&TotalUserPostAttachments&""="" then TotalUserPostAttachments=0
BytesUsed=int(TotalUserPostAttachments/SiteSettings("MaxPostAttachmentsSize")*100)

%>

<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → 控制面板</td>
</tr>
</table>
<br>

<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
	<TR id=TableTitleLink class=a1 height="25">
		<Td align="center"><b><a href="UserCp.asp">控制面板</a></b></td>
		<TD align="center"><b><a href="EditProfile.asp">资料修改</a></b></td>
		<TD align="center"><b><a href="EditProfile.asp?menu=pass">密码修改</a></b></td>
		<TD align="center"><b><a href="MySettings.asp">个性设置</a></b></td>
		<TD align="center"><b><a href="MyUpFiles.asp">上传管理</a></b></td>
		<TD align="center"><b><a href="MyFavorites.asp">管理书签</a></b></td>
		<TD align="center"><b><a href="MyMessage.asp">短信服务</a></b></td>
		<TD align="center"><b><a href="MyFriend.asp">好友列表</a></b></td>
	</TR>
</TABLE>
<br>


<table cellspacing=1 cellpadding=5 border=0 width=100%>
	<tr>
		<td align="center">
<!-----附件分组设置----->
<%
if SiteSettings("Maxup")=1 then
Maxup=conn.execute("select Maxup from [BBSXP_Roles] where id="&UserRoleID&"")(0)
else
Maxup=SiteSettings("MaxPostAttachmentsSize")
end if
%>您的上传空间使用信息：已使用 <%=CheckSize(""&TotalUserPostAttachments&"")%>，剩余 <%=CheckSize(Maxup-TotalUserPostAttachments)%></td>
<!-----附件分组设置----->
	</tr>
	<tr>
		<td>
		<table cellSpacing="0" cellPadding="0" width="100%" border="0">
			<tr>
				<td width="30"><font color="#ff0000"><%=BytesUsed%>%</font></td>
				<td>
				<table cellSpacing="1" cellPadding="0" width="100%" border="0" class=a2>
					<tr>
						<td class=a3 style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid">
						<table cellSpacing="0" cellPadding="0" width=<%=BytesUsed%>% border="0" class=a1>
							<tr>
								<td>　</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
				<td align="middle" width="30"><font color="#ff0000">100%</font></td>
			</tr>
		</table>
		</td>
	</tr>
</table>


<table cellspacing=1 cellpadding=3 border=0 width=100% class=a2>
<form method=Post name=form action="?menu=DelPostAttachment">
<tr class=a1 id="TableTitleLink">
<td align="center" width=30><input type=checkbox name=chkall onclick=CheckAll(this.form) value="ON"></td>
<td align=center width="20%">文件名称</td>
<td align=center width="60">文件大小</td>
<td align="center">文件类型</td>
<td align="center">上传时间</td>
<td align="center" width="25%">描述</td>
<td align="center" width="50">来源</td>
</tr>
<%


i=0
Do While Not Rs.EOF and i<PageSetup
i=i+1
%>


<tr class=a3><td align="center"><input type=checkbox name=ID value="<%=RS("id")%>"></td>
	<td align="center">
	<a target="_blank" href="<%=RS("FilePath")%>"><%=RS("FileName")%></a></td>
	<td align=center><%=CheckSize(RS("ContentSize"))%></td>
	<td align=center><%=RS("ContentType")%></td>
	<td align=center><%=RS("Created")%></td>
	<td align=center><%=RS("Description")%></td>
	<td align=center><%=RS("Class")%></td>
</tr>

<%

Rs.MoveNext
loop
Rs.Close
%>
</table>
<table cellspacing=0 cellpadding=0 border=0 width=100%>
	<tr>
		<td><input type="submit" value="删 除"></form></td>
		<td align="right" valign="top"><%ShowPage()%></td>
	</tr>
</table>


<%
htmlend
%>