%
dim rs,sql
dim boardid,boardtype,announceid_1
dim username,rootid,topic,topic_1
dim star,totalrec,p
dim strAllowForumCode,strAllowHTML,strIMGInPosts
dim strIcons,strflash
dim bgcolor,abgcolor,namestyle
dim istop,isvote
dim guestlist,onlineUserList
dim arrrow,view
dim boardskin
dim boardstat
boardskin=1
foundErr = false
ErrMsg = ""
if boardmaster or master then
guestlist=""
else
guestlist=" lockboard=0 and "
end if
stats="浏览帖子"
if foundErr then
call nav()
call headline(2)
call error()
else
call chkInput()
if founderr then
call nav()
call headline(2)
call error()
else
call boardtop()
if founderr then
call nav()
call headline(2)
call error()
else
call nav()
call headline(2)
call subOnline()
call announceinfo()
call listpage()
if founderr then call error()
end if
end if
end if
call endline()
sub boardtop()
call boardinfo(boardid)
if cint(boardskin)=6 then
if membername="" then
response.write ""
response.end
end if
elseif cint(boardskin)=5 then
if membername="" then
founderr=true
Errmsg=Errmsg+" "+"
本论坛为认证论坛,请登陆并确认您的用户名已经得到管理员的认证后进入。"
exit sub
else
if chkboardlogin(boardid,membername)=false then
founderr=true
Errmsg=Errmsg+" "+"
本论坛为认证论坛,请确认您的用户名已经得到管理员的认证后进入。"
exit sub
end if
end if
end if
conn.execute("update bbs1 set hits=hits+1 where announceID="&AnnounceID_1&"")
sql="select topic,istop,isbest,username,hits from bbs1 where announceID="&rootID&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
arrRow=rs.getrows
rs.close : set rs=nothing
topic_1=arrRow(0,0)
istop=arrRow(1,0)
isbest=arrRow(2,0)
username=arrRow(3,0)
view=arrRow(4,0)
stats=""&boardtype&"浏览:"&topic_1&""
if username=membername and membername<>"" then call readRe()
else
foundErr = true
ErrMsg=ErrMsg+" "+"
您指定的贴子不存在
"
end if
end sub
sub announceinfo()
response.write "
"
if boardskin=2 then
sql="Select AnnounceID,boardID,UserName,Topic,dateandtime,body,Expression,ip,rootid,signflag,isbest,isvote from bbs1 where boardid="&boardid&" and rootid="&rootid&" order by announceid"
else
sql="Select B.AnnounceID,B.boardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.rootid,B.signflag,B.isbest,B.isvote,U.username,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP from bbs1 B inner join [user] U on U.username=B.username where B.boardid="&boardid&" and B.rootid="&rootid&" order by announceid"
end if
'response.write sql
'response.end
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
totalrec=rs.recordcount
if star<1 then
star=1
end if
Maxtitlelist=cint(Maxtitlelist)
if (star-1)*Maxtitlelist>totalrec then
if (totalrec mod Maxtitlelist)=0 then
star= totalrec \ Maxtitlelist
else
star= totalrec \ Maxtitlelist + 1
end if
end if
if star=1 then
call showannounce()
else
if (star-1)*Maxtitlelist"+"
您指定的贴子不存在
"
end if
end sub
sub showannounce()
arrRow=rs.getrows
rs.close : set rs=nothing
dim i
i=0
for k=0 to Ubound(arrRow,2)
Announceid=arrRow(0,i)
boardid=arrRow(1,i)
username=arrRow(2,i)
topic=arrRow(3,i)
dateandtime=arrRow(4,i)
body=arrRow(5,i)
Expression=arrRow(6,i)
ip=arrRow(7,i)
rootid=arrRow(8,i)
signflag=arrRow(9,i)
isbest=arrRow(10,i)
isvote=arrRow(11,i)
if boardskin=2 then
useremail="club@aspsky.net"
homepage="http://www.aspsky.net/"
oicq="10000"
sign=""
userclass=1
title=""
width=32
uheight=32
article=1
face="pic/image1.gif"
addtime=now()
userWealth=1
userEP=1
userCP=1
else
useremail=arrRow(13,i)
homepage=arrRow(14,i)
oicq=arrRow(15,i)
sign=arrRow(16,i)
userclass=arrRow(17,i)
title=arrRow(18,i)
width=arrRow(19,i)
uheight=arrRow(20,i)
article=arrRow(21,i)
face=arrRow(22,i)
addtime=arrRow(23,i)
userWealth=arrRow(24,i)
userEP=arrRow(25,i)
userCP=arrRow(26,i)
end if
if isnumeric(userclass) then
if userclass=18 then
namestyle="filter:glow(color=green,strength=2)"
elseif userclass=19 then
namestyle="filter:glow(color=#660099,strength=2)"
elseif userclass=20 then
namestyle="filter:glow(color=#FF3333,strength=2)"
else
namestyle="filter:glow(color=#798AB7,strength=2)"
end if
end if
if isbgcolor(i)=false then
bgcolor=TableBodyColor
abgcolor=aTableBodyColor
else
bgcolor=aTableBodyColor
abgcolor=TableBodyColor
end if
'response.write height
response.write "
"
if TitleFlag and title<>"" then response.write " 头衔:"&htmlencode(title)&" "
response.write " "
if isnumeric(userclass) then
select case userclass
case 1 response.write " "
case 2 response.write " "
case 3 response.write " "
case 4 response.write " "
case 5 response.write " "
case 6 response.write " "
case 7 response.write " "
case 8 response.write " "
case 9 response.write " "
case 10 response.write " "
case 11 response.write " "
case 12 response.write " "
case 13 response.write " "
case 14 response.write " "
case 15 response.write " "
case 16 response.write " "
case 17 response.write " "
case 18 response.write " "
case 19 response.write " "
case 20 response.write " "
end select
response.write " 等级:"& grade(userclass) &" "
end if
if FromFlag=0 then
if boardmaster or master then
comefrom=address(ip)
else
comefrom="保密"
end if
else
comefrom=address(ip)
end if
response.write " 财产: "&_
" 经验: "&_
" 魅力: "
response.write " 注册:"& year(addtime) &"-"& month(addtime) &"-"& day(addtime)
response.write " 文章:"&article&" 鉴定:"&comefrom&" "&_
"
"&_
"
"&_
"
"&_
"
"&_
" "&_
" "&_
""&_
" "&_
" "
if useremail<>"" then
response.write " "
end if
if oicq<>"" then
response.write "OICQ "
end if
if homepage<>"" then
response.write " "
end if
response.write ""&_
" "&_
" "&_
"
"&_
"
"
if instr(Expression,"face")>0 then
response.write ""
end if
response.write "
"&_
""
response.write ""& htmlencode(topic) &" "& ubbcode(body)
if not isnull(isvote) and cint(isvote)=1 and announceid=rootid then
set vrs=conn.execute("select vote,votenum,votetype,voteuser from vote where announceid="&announceid&"")
vote=split(vrs("vote"),"|")
votenum=split(vrs("votenum"),"|")
response.write "
"
response.write "
以下为投票内容:
"
response.write "
"
set vrs=nothing
end if
if signflag=1 then
if sign<>"" then
response.write "
"
if membername<>"" then
if username=membername or boardmaster or master then
response.write " "
end if
end if
response.write "
发贴时间: "&dateandtime&"
"&_
"
"
if IpFlag=0 then
if boardmaster or master then
response.write arrRow(7,i)
else
response.write getip(arrRow(7,i))
end if
else
response.write arrRow(7,i)
end if
response.write "
"
if boardmaster or master then
if announceid<>rootid then
response.write " "
end if
response.write " "
if isbest=0 then
response.write ""
else
response.write ""
end if
end if
response.write "
"&_
"
"&_
"
"
response.write "
"&_
"
"
i=i+1
if k>=Maxtitlelist then exit for
next
arrRow=null
end sub
sub listpage()
dim n
if totalrec mod Maxtitlelist=0 then
n= totalrec \ Maxtitlelist
else
n= totalrec \ Maxtitlelist+1
end if
response.write "
"
if err.number<>0 then err.clear
end if
response.write "
"
if boardmaster or master then
response.write "
"&_
"
"&_
"锁定 "&_
" | 解锁"&_
" | 删除"&_
" | 移动 | "
if istop=0 then
response.write "固顶"
else
response.write "解固"
end if
response.write " | 发布公告 | 批量删除"
response.write "
"
end if
end sub
sub chkInput
'on error resume next
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+" "+"
请指定论坛版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+" "+"
非法的版面参数。"
else
boardid=request("boardid")
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+" "+"
请指定相关贴子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+" "+"
非法的贴子参数。"
else
AnnounceID_1=request("id")
end if
if request("RootID")="" then
founderr=true
Errmsg=Errmsg+" "+"
请指定相关贴子。"
elseif not isInteger(request("RootID")) then
founderr=true
Errmsg=Errmsg+" "+"
非法的贴子参数。"
else
RootID=request("RootID")
end if
if request("star")="" then
star=1
elseif not isInteger(request("star")) then
star=1
else
star=request("star")
end if
end sub
function isbgcolor(num)
n=num mod 2
if n=1 then
isbgcolor=true
else
isbgcolor=false
end if
end function
set rs=nothing
sub readRe()
dim rs1,ID
set rs1=conn.execute("select reAnn from [user] where username='"&membername&"' and reAnn is not null")
if not (rs1.eof and rs1.bof) then
ID=split(rs1("reAnn"),"|")(1)
if ID=rootID then
conn.execute ("update [user] set reAnn=null where username='"&membername&"'")
end if
end if
rs1.close
set rs1=nothing
end sub
sub subOnline
sql="select username from online"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
onlineUserList=rs.getstring(2,,,chr(13))
onlineUserList=chr(13)&onlineUserList
rs.close
set rs=nothing
end sub
function isOnline(username)
if instr(onlineUserList,chr(13)&username&chr(13))>0 then
isonline=""
else
isonline=""
end if
end function
Function GetIp(IP)
ips=Split(ip,".")
GetIp=ips(0)&"."&ips(1)&".*.*"
end Function
%>