<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<card title="帖子管理"><p>
<%dim id,TP

id=request("id")
TP=request("TP")
if id="" or Isnumeric(id)=False then
  Call Error("论坛ID无效！")
  end if
'检查论坛是否存在
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM ydbbs where id="&id,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("论坛不存在！")
end if
  rs.close
  set rs=Nothing
  if TP<>"" then
dim num,elist,gettxt
num=request("num")
elist=request("elist")
if num="" or Isnumeric(num)=False then
  Call Error("天数无效！")
  end if
if elist="" or Isnumeric(elist)=False then
  Call Error("选择类型出错！")
elist=clng(elist)
  end if
if elist=0 then
gettxt="Where bbsid="&id&" and jj<>1 and tm <= '"&date()-num&"'"
else
gettxt="Where bbsid="&id&" and tm <= '"&date()-num&"'"
end if
 '删除n天前帖子
 conn.Execute"delete from sell "&gettxt&""
response.write"帖子清空成功！"
else
response.write"清空该论坛N天前的帖子:<br/>"

response.write"<input name='num"&tt&"' value='0' size='3'/>天前的帖子:<br/>"
response.write"精帖处理:<select name='elist"&tt&"' value='0'>"
response.write"<option value='0'>保留</option>"
response.write"<option value='1'>清空</option>"
response.write"</select><br/>"
response.write"<anchor>[确定清空]<go href='adminboard.asp?ID="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&"' method='post' accept-charset='utf-8'>"
response.write"<postfield name='num' value='$(num"&tt&")'/>"
response.write"<postfield name='elist' value='$(elist"&tt&")'/>"
response.write"<postfield name='TP' value='1'/>"
response.write"</go></anchor><br/>"
end if
response.write"<br/><a href='adminbbs.asp?id="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>功能设计</a>"%>
<!--#include file="fanhui.asp"-->
</p></card>
</wml>