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

<%
dim rs1,sql1,id
id=request.QueryString("id")
if id="" or IsNumeric(id)=False then
  Call Error("<card title='出错了'><p>ID无效！")
  end if
dim ydbbsname
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="Select * from ydbbs where id="&id
rs1.open sql1,conn,1,1 
if rs1.eof then
  Call Error("<card title='出错了'><p>页面不存在！")
  end if
ydbbsname=rs1("name")
oopp=rs1("oopp")
rs1.close
set rs1=nothing
Response.Write"<card title='"&ydbbsname&"'><p>"
if oopp=2 then
browsers=Lcase(Left(Request.ServerVariables("HTTP_USER_AGENT"),4))
if browsers="oper"  or  browsers="winw"  or  browsers="wapi" or browsers="mc21" or browsers="up.b" or browsers="upg1" or browsers="upsi" or browsers="qwap" or browsers="jigs" or browsers="java" or browsers="alca" or browsers="wapj" or browsers="cdr/" or browsers="nec-" or browsers="fetc" or browsers="r380" or browsers="winw" or browsers="mozi" or browsers="mozi" or browsers="m3ga" then 
Call Error("请用手机访问！")
end if
end if

if myid=0 then
Response.write "欢迎您:<a href='login.asp?url="&Replace(Replace(R_url(),"sid=","sidoo="),"sid=","sidoo=")&"'>登陆/注册</a><br/>----------<br/>"& chr(13)
else

'检查有几条新留言
dim newguest
newguest = 0
IF myid > 0 THEN
  newguest = ForNewGuest(myid)
END IF
if newguest > 0 then
Response.write "<br/><img src='/bbs/xi.gif' alt='.' /><a href='/bbs/msgview.asp?url=" & Replace(Replace(R_url(), "sid=", "o="), "sid=", "o=") & "&amp;sid=" & sid & "'>您有(" & newguest & ")条新消息</a><br/>" & Chr(13)
end if
end if
Dim i,p
set rs = server.createobject("adodb.recordset")
rs.open"select * from ydbbs where prentID="&id&" and yc=0 and city=1 order by pid asc",conn,1,1
if rs.eof then 
response.write("页面建设中..<br/>")
else
rs.Move(0)
dim j
j=1
do while not rs.EOF 
if rs("lx")=1 then
    Response.write "<a href='board.asp?bbsid="&rs("id")&"&amp;sid="&sid&"'>"&ubb(rs("name"))&"</a>"&chr(13)

elseif rs("lx")=2 then
    Response.write "<a href='"&ubb(rs("test"))&"'>"&ubb(rs("name"))&"</a>"

elseif rs("lx")=4 then
    Response.write usb(rs("test"))

elseif rs("lx")=0 then
    Response.write ubb2(rs("test"))

elseif rs("lx")="10" then call newsell(rs("ydnum"),rs("did"))

elseif rs("lx")="20" then call relsell(rs("ydnum"),rs("did"))

elseif rs("lx")="30" then call jjsell(rs("ydnum"),rs("did"))

elseif rs("lx")="40" then call photosell(rs("ydnum"),rs("did"))

end if
if rs("brr")=1 then Response.write "<br/>"&chr(13)
rs.MoveNext
j=j+1
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
Call headsay()
%>