<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<%call head()

dim TP,ids,Action,tid,bbsid,tzname,id
Action=Request.QueryString("Action")

ids=usb(request("ids"))
TP=usb(request("TP"))
IF  Action="key" Then
	call keydel
elseif Action="log" Then

	call logdel
else
	call sellacok
end if

sub keydel

if TP<>"" then
if clng(ids)=myid then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""出错了""><p>你不能撤除自己！")
  end if
end if
if ids="" or Isnumeric(ids)=False then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""出错了""><p>ID无效！")
  end if
end if
'检查ID是否存在
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM users where id="&ids,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("ID不存在！")
end if
  rs.close
  set rs=Nothing

  conn.Execute("update users set keys=0,skey=0 where id=" & ids)
call saycardd("撤销职务")

 Response.Write "撤销成功"
Response.write "<br/><a href=""adminbbsboss.asp?sid="&sid&"&amp;saytk="&saytk&""">[版主管理]</a><br/>"
Response.write "<a href=""adminbbsvice.asp?sid="&sid&"&amp;saytk="&saytk&""">[论坛管理]</a><br/>"
else
call saycardd("撤销职务")
 Response.Write "确认撤销该会员的职务？<br/>"
 Response.Write "<a href='adminget.asp?Action=key&amp;ids="&ids&"&amp;sid="&sid&"&amp;TP=1&amp;saytk="&saytk&"'>是的</a><br/>"
 Response.Write "<anchor>取消<prev/></anchor>"
end if
 call headsay()
end Sub


Sub logdel
if TP<>"" then

  conn.Execute("delete from board")
call saycardd("清空日志")
 Response.Write "清空成功"

Response.write "<br/><a href=""adminlog.asp?sid="&sid&"&amp;saytk="&saytk&""">[日志管理]</a><br/>"



else
call saycardd("清空日志")
 Response.Write "确认清空所有的日志？<br/>"
 Response.Write "<a href='adminget.asp?Action=log&amp;sid="&sid&"&amp;TP=1&amp;saytk="&saytk&"'>是的</a><br/>"
 Response.Write "<anchor>取消<prev/></anchor>"
end if
 call headsay()
end Sub
sub sellacok
if TP<>"" then
if ids="" or Isnumeric(ids)=False then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""出错了""><p>ID无效！")
  end if
end if
'检查帖子是否存在
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM sell where id="&ids,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("帖子不存在！")
end if
  rs.close
  set rs=Nothing
  conn.Execute("update sell set yc=0 where id=" & ids)
  call saycardd("恢复帖子")

 Response.Write "恢复帖子成功"

Response.write "<br/><a href=""adminsell.asp?sid="&sid&"&amp;saytk="&saytk&""">[帖子回收]</a><br/>"



else
  call saycardd("恢复帖子")
 Response.Write "确认恢复该帖子？<br/>"
 Response.Write "<a href='adminget.asp?Action=acok&amp;ids="&ids&"&amp;sid="&sid&"&amp;TP=1&amp;saytk="&saytk&"'>是的</a><br/>"
 Response.Write "<anchor>取消<prev/></anchor>"
end if
call headsay()
end Sub

%>

