<% 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 ""&_ ""&_ ""&_ "
      "&_ "发表一个新主题  "&_ "发表一个新投票 "&_ "回复主题  您是本帖的第 "&view&" 个阅读者
    " response.write ""&_ "
    " response.write ""&_ "
    " response.write " "&_ ""&_ ""&_ "
    "&_ ""&_ ""&_ "
    "&_ " * 贴子主题: "&htmlencode(topic_1)&" "&_ " 保存该页为文件 报告本帖给版主 "&_ "显示可打印的版本  "&_ " "&_ "把本贴打包邮递  "&_ " "&_ "把本贴加入论坛收藏夹  "&_ " "&_ "发送本页面给朋友 "&_ " 把本贴加入IE收藏夹"&_ " 
    "&_ ""&_ "
    " 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 ""&_ ""&_ ""&_ "
    "&_ ""&_ ""&_ ""&_ "

    "&_ " "&isOnline(username)&"  "&htmlencode(username)&"
    " 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 " 财产:&userWealth&
    "&_ " 经验:&userEP&
    "&_ " 魅力:&userCP&
    " response.write "  注册:"& year(addtime) &"-"& month(addtime) &"-"& day(addtime) response.write "
      文章:"&article&"
      鉴定:"&comefrom&"
    "&_ "
    "&_ ""&_ "

    "&_ "  "&_ "给"&HTMLEncode(username)&"发送一个短消息 "&_ ""&_ "查看"&HTMLEncode(username)&"的个人资料 "&_ "搜索"&HTMLEncode(username)&"在"&boardtype&"的所有贴子  " if useremail<>"" then response.write "点击这里发送电邮给"& HTMLEncode(username) &" " end if if oicq<>"" then response.write "OICQ " end if if homepage<>"" then response.write "访问"& HTMLEncode(username) &"的主页  " 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 "" for m = 0 to ubound(vote) if cint(vrs("votetype"))=0 then vote_1=""&vote_1&""&m+1&". "&vote(m)&"
    " else vote_1=""&vote_1&""&m+1&". "&vote(m)&"
    " end if next response.write "" vote_1="" for m = 0 to ubound(votenum) votenum_1=""&votenum_1&"票数:"&votenum(m)&"
    " next response.write "" votenum_1="" if membername="" then response.write "" else if instr(vrs("voteuser"),membername)>0 then response.write "" else response.write "" end if end if response.write "" response.write "
    以下为投票内容:
    "&vote_1&""&votenum_1&"

    您还没有登陆,不能进行投票。

    您已经投过票了,请看结果吧。

    " set vrs=nothing end if if signflag=1 then if sign<>"" then response.write "

    ----------------------------------------------
    "&ubbcode(sign)&"
    " end if end if 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 ""&_ ""&_ "
    "&_ "页次:"&star&"/"&n&"页"&_ "每页"&Maxtitlelist&" 本主题贴数"&totalrec&"

    分页: " for p=1 to n if p=int(star) then response.write "["+Cstr(p)+"] " else response.write "["+Cstr(p)+"] " end if next response.write "

    " if boardskin<>4 then response.write ""&_ ""&_ "
     *快速回复:"&htmlencode(topic_1)&" 顶端 
    " response.write ""&_ "
    "&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "
    你的用户名:"&_ "   还没注册? 密码:"&_ ""&_ "   忘记密码?
    内容
    "&_ "
  • HTML标签: " if strAllowHTML=0 then response.write "不可用 " else response.write "允许 " end if response.write "
  • UBB标签: " if strAllowForumCode=0 then response.write "不可用 " else response.write "允许" end if response.write "
  • 贴图标签: " if strIcons=0 then response.write "不可用" else response.write "允许" end if response.write "
  • Flash标签:" if strflash=0 then response.write "不可用" else response.write "允许" end if response.write "
  • 表情字符转换:" if strIMGInPosts=0 then response.write "不可用" else response.write "允许" end if response.write "
  • 上传图片:" if Uploadpic=0 then response.write "不可用" else response.write "允许" end if response.write "
  • 最多"&AnnounceMaxBytes\1024&"KB
  • "&_ ""&_ "
    "&_ ""&_ "邮件回复 "&_ "显示签名 "&_ ""&_ " "&_ "[Ctrl+Enter直接提交贴子]
    " 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 %>