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

dim id,zall,zjb
zall=trim(request.querystring("zall"))
prentIDD=trim(request.querystring("prentIDD"))
zjb=trim(request.querystring("zjb"))
id=trim(request.querystring("bbsid"))
if id="" or Isnumeric(id)=False then
  Call Error("ID无效！")
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where id="&id,conn,1,1
Call saycarda("+我的"&zonene&"+"&rs("name")&"")

rs.close
set rs=Nothing




'检查有几条新留言
dim newguest
newguest = 0
IF myid > 0 THEN
  newguest = ForNewGuest(myid)
END IF

dim zonejb,newzonenum,zoneyuejb
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select zonejb,zonenum,zoneyuejb from twapp where id=1",conn,1,1
if rs.eof then
  Call Error("系统没有配置！")
  end if
zonejb=rs("zonejb")
zoneyuejb=rs("zoneyuejb")
newzonenum=rs("zonenum")
rs.close
set rs=nothing
  
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where id="&id,conn,1,1
If Not rs.eof	Then
vice=rs("vice")
vicexs=rs("vicexs")
groupkf=rs("groupkf")
prentIDD1=rs("prentID")
If groupkf=1 Then
response.write ""&zonene&"已关门，如需进入请联系"&zonezz&"开通!!"
Call headsay()
response.End 
End If
If prentIDD1<>0 Then
response.write ""&zonene&"已被管理员封锁，如需进入请管理员开通!!"
Call headsay()
response.End 
End If
response.write ""&groupkf&""
If rs("logo")<>"" Then
Response.write "<img src='"&rs("logo")&"' alt='.' /><br/>"
  End if
set rs21=Server.CreateObject("ADODB.Recordset")
rs21.open"select * from users  where zoneid="&id,conn,1,1
If myid=rs21("id") then
 response.write ""&rs("name")&""&zonene&"欢迎["&myni&"]回家！<br/>"
   

else
  response.write "("&rs("name")&")"&zonene&"欢迎您！<br/>"
end If

rs21.close
set rs21=nothing



    dim username
 set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select name from users where id="&rs("adminusid"),conn,1,1
If rs1.eof Then
username=""
else
username=rs1("name")
end if
rs1.close
set rs1=Nothing






   response.write ""&left(rs("grouptxt"),30)

   
    dim zonenum
    zonenum=conn.execute("Select count(ID) from [users] where zoneid="&rs("id"))(0)
  
    response.write"<br/><a href=""zoneman.asp?id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">全部成员</a>"
response.write ".<a href=""zonetax.asp?bbsid="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">基金</a>"

response.write ".<a href=""/bbs/zonetax.asp?bbsid="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">捐款</a><br/>"
    if zonenum >= newzonenum then
    conn.execute("update ydbbs  Set yc = 0 where ID = "&rs("id"))
    end if
    
    
    if rs("yc")=0 then
    
dim charDays
charDays = DateDiff("d", rs("zonedate"), now())
if charDays >1 then


end if

    response.write"<a href=""zoneboard.asp?bbsid="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&zonene&"论坛</a>"

Response.write ".<a href=""/bbs/chaturl.asp?bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">聊室</a>"
    else
    Response.write ".聊室"
    end if
    
	Else
Response.write "无此"&zonene&"！<br/>"
end if
'================================

response.write".<a href=""zonefav.asp?action=out&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">退出</a>/"

response.write"<a href=""zonefav.asp?action=in&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">加入</a><br/>"



'============================



If vicexs=1 Then

response.write""&ubb3(vice)&"<br/>"

End if








response.write"【"&zonene&"最新话题】"


response.write"<a href=""/bbs/writetext.asp?bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">发话题</a><br/>"







dim rs22
set rs22=Server.CreateObject("ADODB.Recordset")
rs22.open"select * from sell where bbsid="&id,conn,1,1
If rs22.eof Then

response.write("暂无最新话题！<br/>")


else
rs22.Move(0)
dim a
a=1


do while ((not rs22.EOF) and a <=10)
if rs22("num")=1 then response.write("<b>[顶]</b>")
    if rs22("num")=20 then response.write("<b>[固]</b>")
    if rs22("jj")=1 then response.write("<b>[精]</b>")
    if rs22("st")=1 then response.write("<b>[锁]</b>")
    if rs22("lx")=2 then response.write("<b>[投]</b>")
    if rs22("lx")=4 then response.write("<b>[隐]</b>")
    if rs22("lx")=5 then response.write("<b>[币]</b>")
    if rs22("paycent")<>0 then response.write("<b>[卖]</b>")
    if rs22("x")=>10 then response.write"<img src='/bbs/jia/1.gif' alt='hot'/>"
  if rs22("tzdj")<>0 then
response.write"<img src="""&rs22("tzdj")&""" alt='.'/>"
end if

  response.write"<a href='/bbs/topic.asp?tid="&rs22("id")&"&amp;sid="&sid&"'>"&left(UBB(rs22("name")),14)&"</a><br/>"
rs22.MoveNext
a=a+1
loop

end if

rs22.close
set rs22=Nothing
    response.write "-------------------<br/>"
    response.write "族长:"
    response.write"<a href='uinfo.asp?id="&rs("adminusid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&username&"</a><br/>"







response.write"+"&zonene&"版主列表+<br/>"
dim rs991
set rs991=Server.CreateObject("ADODB.Recordset")
rs991.open"select * from Users where skey="&id,conn,1,1
If rs991.eof Then

response.write("暂无版主！<br/>")


else
rs991.Move(0)
dim j
j=1


do while ((not rs991.EOF) and j <=5)
 Response.write "<a href=""uinfo.asp?id="&rs991("id")&"&amp;sid="&sid&""">"&ubb(rs991("name"))&"(ID:"&usb(rs991("id"))&")</a><br/>"
rs991.MoveNext
j=j+1
loop

end if

rs991.close
set rs991=Nothing
set rs12=Server.CreateObject("ADODB.Recordset")
rs12.open"select * from ydbbs where id="&id,conn,1,1




Response.write "管理:"
Response.write "<a href=""zoneadminset.asp?bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">进入"&zonene&"后台</a>"

If keys=1 Or keys=2 Or keys=3 Then
If prentIDD="" THEN
Response.write "|<a href=""zoneall.asp?prentIDD=1&amp;bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">封锁该"&zonene&"</a>"

else
conn.execute("update ydbbs set prentID=1 where ID="&ID)
Response.write "<br/>操作提示:成功封锁该"&zonene&"!"
End if
End If


Response.write "<br/>"

 Response.write "http://"&Request.ServerVariables("SERVER_NAME")&"/bbs/jz.asp?bbsid="&id&"<br/>"
	response.write "-------------------<br/>"

rs12.close
set rs12=Nothing
Response.write "<a href=""zone.asp?saytk="&saytk&"&amp;sid="&sid&""">"&zonene&"主页</a>"




if myid<>0 then
mz="[url=uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"查看了(url=/bbs/zoneall.asp?bbsid="&rs("id")&"&amp;saytk="&saytk&"&sid=[sid])("&rs("name")&")"&zonene&"(/url)')")
rs.close
set rs=Nothing
conn.close
set conn=nothing
 




%>

<%
call headsay()
%>