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

<%call head()
Call saycarda("管理会员")
if keys=0 and skey=0 then
  Call Error("你没有这个权限！")
end if

dim ID,rf
ID = Trim(Request.QueryString("ID"))

if ID = "" or IsNumeric(ID) = False then
  Call Error("ID无效！")
end if

if Clng(id)=myid then
  Call Error("不能管理自己！")
end if

dim hmduser,adminuser
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT keys,name,hmd from Users where ID = " & ID,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("没有这个会员！")
end if

if keys <> 1 then
 if rs("keys") > 0 then
  rs.close
  set rs=Nothing
  Call Error("同等级会员不能管理！")
 end if
end if
hmduser=rs("hmd")
adminuser=rs("name")
rs.close
set rs=nothing

dim adminbbs
IF skey>0 or keys<>1 or keys<>2 then
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT name from ydbbs where ID = "&skey,conn,1,1

adminbbs=rs("name")
else
adminbbs="整个社区"
end if
Response.write "管理区域："

  Response.write adminbbs&"<br/>"

Response.write "管理会员："

  Response.write adminuser

Response.write "<br/>ID号："&ID&"<br/>"



set rs=server.createobject("adodb.recordset")
if keys<>1 or keys<>2 then
rs.open "select bbsid,strsell,strrel,strmsg,strall from hmd where bbsid="&skey&" and fl=1 And guliid="&ID,conn,1,1
else
rs.open "select bbsid,strsell,strrel,strmsg,strChat,strall from hmd where fl=1 And guliid="&ID,conn,1,1

end if
if rs.eof then
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nof&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止发帖</a><br/>"
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=noh&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止回帖</a><br/>"

Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=noj&amp;saytk="&saytk&"&amp;sid="&sid&"'>加黑用户</a><br/>"
if keys=1 then
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nox&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止信箱</a><br/>"
Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nol&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止聊天</a><br/>"
end if
else

  if rs("strsell") > 0 then
    Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=f&amp;saytk="&saytk&"&amp;sid="&sid&"'>允许发帖</a><br/>"

  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nof&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止发帖</a><br/>"
  end if

  if rs("strrel") > 0 then

    Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=h&amp;saytk="&saytk&"&amp;sid="&sid&"'>允许回帖</a><br/>"

  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=noh&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止回帖</a><br/>"
  end if



  if rs("strall") > 0 then

    Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=j&amp;saytk="&saytk&"&amp;sid="&sid&"'>解黑用户</a><br/>"

  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=noj&amp;saytk="&saytk&"&amp;sid="&sid&"'>加黑用户</a><br/>"
  end if

if keys=1 then
  if rs("strmsg") > 0 then
    Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=x&amp;saytk="&saytk&"&amp;sid="&sid&"'>允许信箱</a><br/>"
  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nox&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止信箱</a><br/>"
  end if
  if rs("strChat") > 0 then
    Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=l&amp;saytk="&saytk&"&amp;sid="&sid&"'>允许聊天</a><br/>"
  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nol&amp;saytk="&saytk&"&amp;sid="&sid&"'>禁止聊天</a><br/>"
  end if
end if

end if
'-------社区管理员权限-------
if keys = 1 then

  if hmduser=0 then
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=lock&amp;saytk="&saytk&"&amp;sid="&sid&"'>永久加黑</a><br/>"
  else
  Response.write "<a href='adminuserno.asp?ID="&ID&"&amp;ation=nolock&amp;saytk="&saytk&"&amp;sid="&sid&"'>解除加黑</a><br/>"
  end if
end if


rs.close
set rs=nothing
conn.close
set conn=Nothing

Response.write "<br/><a href=""uinfo.asp?ID="&ID&"&amp;saytk="&saytk&"&amp;sid="&sid&""">[会员资料]</a>" & chr(13)%>
<!--#include file="fanhui.asp"-->
<%Call headsay()%>