<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->

<%
call head()
dim Action
Action=Request.QueryString("Action")
IF  Action="bbs" Then
	call smallblack
else

	call allblack
end if

sub smallblack()
dim bbsid

Call saycarda("本版黑名单")
bbsid=request.querystring("bbsid")
if bbsid="" or IsNumeric(bbsid)=False then
  Call Error("ID无效！")
  end if
dim ydbbsn,rs1
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open"select name from ydbbs where id=" & bbsid,conn,1,1 
if not rs1.eof then
ydbbsn=rs1("name")
end if
rs1.close
set rs1=nothing

response.write"论坛["&ydbbsn&"]黑名单"
response.write"<br/>----------<br/>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open"select * from hmd where bbsid=" & bbsid & " and fl=1 order by gulitime desc",conn,1,1 
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=5						
	Dim Count,page,pagecount,gopage			
	gopage="blacklist.asp?Action=bbs&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize     						
	If rs.eof Then Exit For	
if keys=1 or skey=abs(bbsid) or keys=2 then
response.write"<a href=""adminuser.asp?id="&rs("guliid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">管理</a>"
end if
response.write""&i+(page-1)*PageSize&".<a href=""uinfo.asp?id="&rs("guliid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">ID:" & ubb1(rs("guliid")) & "</a>"
response.write"被版主<a href=""uinfo.asp?id="&rs("adminid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">ID:" & ubb1(rs("adminname")) & "</a>"
if rs("strsell")>0 then
response.write"禁发帖"
elseif rs("strrel")>0 then
response.write"禁回复"
elseif rs("strall")>0 then
response.write"加黑"
END IF
if rs("fl")<>2 then
IF rs("locktian")<>"" then
if rs("locktian")="0" then
response.write("<br/>期限: 1 小时") 
ELSE
response.write("<br/>期限:" & ubb1(rs("locktian")) & "天") 
END IF
end if
end if
response.write("<br/>理由:" & ubb1(rs("liyou")) & "") 
response.write("<br/>[" & ubb2(rs("gulitime")) & "]<br/>")   
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"

Else
response.write"暂时没有黑名单！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"----------<br/>"
Response.write "<a href=""bbs_vip.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回论坛版务</a>"
response.write"<br/><a href='board.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>返回本版</a><br/>"
end Sub






Sub allblack
Call saycarda("社区监狱")

Set rs = Server.CreateObject("ADODB.Recordset")
rs.open"select * from hmd where fl<>0 order by gulitime desc",conn,1,1 
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=5					
	Dim Count,page,pagecount,gopage			
	gopage="blacklist.asp?Action=all&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize     						
	If rs.eof Then Exit For	
if keys=1 or keys=2 then
response.write"<a href=""adminuser.asp?id="&rs("guliid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">管理</a>"
end if
response.write""&i+(page-1)*PageSize&".<a href=""uinfo.asp?id="&rs("guliid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">ID:" & ubb1(rs("guliid")) & "</a>"
response.write"被<a href=""uinfo.asp?id="&rs("adminid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;bbsid="&bbsid&""">ID:" & ubb1(rs("adminname")) & "</a><br/>"
if rs("bbsid")>0 then
dim ydbbsname
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open"select name from ydbbs where id=" & rs("bbsid"),conn,1,1 
if not rs1.eof then
ydbbsname=rs1("name")
end if
rs1.close
set rs1=nothing
if rs("strsell")>0 then
response.write"禁发帖(范围:"&ydbbsname&"论坛)"
elseif rs("strrel")>0 then
response.write"禁回复(范围:"&ydbbsname&"论坛)"
elseif rs("strall")>0 then
response.write"加黑(范围:"&ydbbsname&"论坛)"
END IF
else
if rs("strsell")>0 then
response.write"禁发帖(范围:全区版块)"
elseif rs("strrel")>0 then
response.write"禁回复(范围:全区版块)"
elseif rs("strmsg")>0 then
response.write"禁信箱(范围:全区)"
elseif rs("strchat")>0 then
response.write"禁聊天(范围:全区)"
elseif rs("strall")>0 then
response.write"加黑(范围:全区版块)"
elseif rs("FL")=2 then
response.write"永久加黑(范围:全区)"
end if
end if
if rs("fl")<>2 then
IF rs("locktian")<>"" then
if rs("locktian")="0" then
response.write("<br/>期限: 1 小时") 
ELSE
response.write("<br/>期限:" & ubb1(rs("locktian")) & "天") 
END IF
end if
end if
if rs("FL")=2 then
response.write("<br/>理由:严重违反社区制度！") 
else
response.write("<br/>理由:" & ubb1(rs("liyou")) & "") 
end if
response.write("<br/>[" & ubb2(rs("gulitime")) & "]<br/>")   
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"

Else
response.write"暂时没有犯人！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end Sub

   Response.write "<a href=""bbslist.asp?saytk="&saytk&"&amp;sid="&sid&""">返回社区排行榜</a><br/>"
   Response.write "<a href=""/bbs/show.asp?saytk="&saytk&"&amp;sid="&sid&""">空间</a>>>"
   Response.write "<a href=""/bbs/index.asp?saytk="&saytk&"&amp;sid="&sid&""">社区</a>"
   Response.write ">><a href=""/index.asp?saytk="&saytk&"&amp;sid="&sid&""">首页</a><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"

%>
<%call headsay()%>