📄 index2.asp
字号:
Function BBSList() '论坛分类列表
dim speak
speak=1
AccessNum=AccessNum+1
Set rs=conn.execute("select top 1 id,分类名称 from 论坛分类 where id="&bbsid&" ")
if rs.bof and rs.eof then
speak="0"
else
rs.MoveFirst
End if
BT_Board():aRS=Application(BBSname&"BT_Board")
if aRS(0,0)=-1 or VarType(aRS)=0 then
speak="0"
end if
if speak<>"0" then
bbsfltable="<center><table width=743><tr><td height=30 class=light> <img src=../images/nav.gif> <a href=index.asp><font class=NavColor>论坛首页</a> >> "&rs("分类名称")&"</font></td></tr></table></center>"
bbsfltable=bbsfltable+"<table border=1 width=743 cellspacing=0 cellpadding=0 align=center class=table1><tr><td colspan=4 height=30 class=TBHead> <font class=HeadFont><b>"+rs("分类名称")+"</b></font></td></tr>"
for i=0 to UBound(aRS,2)
if aRS(2,i)=rs("分类名称") then
if Application(BBSname&aRS(3,i))="" then
if aRS(4,i)=1 then indexidimage="<img src=../images/indexid1.gif alt=正常开放论坛>" end if
if aRS(4,i)=2 then indexidimage="<img src=../images/indexid2.gif alt=锁定论坛>" end if
if aRS(4,i)=3 then indexidimage="<img src=../images/indexid3.gif alt=注册认证论坛>" end if
if aRS(4,i)=4 then indexidimage="<img src=../images/indexid4.gif alt=论坛被关闭>" end if
rs1id=aRS(0,i)
fileid=aRS(11,i)
AccessNum=AccessNum+1
Set rs2=conn.execute("select top 1 id,BoardID,FileName,Subject,PostTime,PostUser from BT_Topic where BoardID="&rs1id&" and id="&fileid&" ")
if aRS(10,i)<>"" and aRS(10,i)<>" " then titleinfo="<a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src="+aRS(10,i)+" align=left border=0></a><table border=0 cellspacing=3 cellpadding=0 width=380 ><tr><td><a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+">"+aRS(3,i)+"</a></td></tr>" else titleinfo="<table border=0 cellspacing=3 cellpadding=0 width=380><tr><td><a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+">"+aRS(3,i)+"</a></td></tr>" end if
if aRS(6,i)<>"" then titleinfo=titleinfo+"<tr><td>"+aRS(6,i)+"</td></tr>" else titleinfo=titleinfo+"<tr><td> </td></tr>" end if
if aRS(7,i)<>"" then
'---------------------------------
test=aRS(7,i)
wz=1
bz=""
while not wz=0
lens=Len(test)
wz=InStr(1,test,"|")
if wz<>0 then p=left(test,wz-1) else p=test end if
test=right(test,lens-wz)
if p=" " then bz=bz+"无" else bz=bz+"<a href=LookUserInfo.asp?username="+p+">"+p+"</a> " end if
wend
'---------------------------------
titleinfo=titleinfo+"<tr><td>论坛版主:"+bz+"</td></tr></table>"
else titleinfo=titleinfo+"<tr><td>论坛版主:</td></tr></table>"
end if
'---------------------------------------------------------------------
if rs2.bof and rs2.eof then
bbsfltable1=bbsfltable1+"<tr><td width=40 height=65 align=center class=light1>"+indexidimage+"</td><td class=light width=435>"+titleinfo+"</td><td width=30 align=center class=light><a href=newfile.asp?boardname="+aRS(7,i)+"&boardid="+cstr(aRS(0,i))+"><img src=../images/post.gif border=0 alt=在此论坛发表新帖></a><br><br><a href=dislist_jh.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src=../images/elist.gif border=0 alt=该论坛精华区></a></td><td class=light><table border=0 cellspacing=3 cellpadding=0><tr><td>主题:-------</td><tr><td>作者:-------</td><tr><td>主题总数:0 回帖总数:0</td></tr></table></td></tr>"
else
if rs2("Subject")<>"" then
titlename=rs2("Subject")
if len(titlename)>30 then
titlename=left(titlename,28)
titlename=titlename+"..."
titlename="<a href=bbs"+cstr(rs2("BoardID"))+"/"+rs2("FileName")+">"+titlename+"</a>"
else
titlename="<a href=bbs"+cstr(rs2("BoardID"))+"/"+rs2("FileName")+">"+titlename+"</a>"
end if
else
titlename="-------"
end if
if rs2("PostUser")<>"" then fmname="<a href=LookUserInfo.asp?username="+rs2("PostUser")+">"+rs2("PostUser")+"</a>" else fmname="-------" end if
if rs2("PostTime")<>"" then fmtime=cstr(rs2("PostTime")) else fmtime="" end if
Application.Lock
Application(BBSname&aRS(3,i))="<tr><td width=40 height=65 align=center class=light1>"+indexidimage+"</td><td class=light width=435>"+titleinfo+"</td><td width=30 align=center class=light><a href=newfile.asp?boardname="+aRS(3,i)+"&boardid="+cstr(aRS(0,i))+"><img src=../images/post.gif border=0 alt=在此论坛发表新帖></a><br><br><a href=dislist_jh.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src=../images/elist.gif border=0 alt=该论坛精华区></a></td><td class=light><table border=0 cellspacing=3 cellpadding=0><tr><td>主题:"+titlename+"<br></td><tr><td>作者:"+fmname+" "+fmtime+"<br></td><tr><td>主题总数:"+cstr(aRS(8,i))+" 回帖总数:"+cstr(aRS(9,i))+"</td></tr></table></td></tr>"
Application.UnLock
bbsfltable1=bbsfltable1&Application(BBSname&aRS(3,i))
end if
rs2.close
else
bbsfltable1=bbsfltable1&Application(BBSname&aRS(3,i))
end if
end if
Next
bbsfltable=bbsfltable+bbsfltable1+"</table><br>"
bbsfltable2=bbsfltable2+bbsfltable
bbsfltable1=""
else
Application(BBSname&"index")=""
Response.Write "没有任何版面"
end if
rs.Close
Response.Write bbsfltable2
Application.Lock
Application(BBSname&"index"&cstr(bbsid))=bbsfltable2
Application.UnLock
End Function
Function Link() '读取友情链接
if Application(BBSname&"link")="" then
AccessNum=AccessNum+1
Set rs=conn.execute("select 网站名称,网站介绍,链接地址,图片地址,图片宽度,图片高度 from 友情链接 ")
if not (rs.bof and rs.eof) then
link1="<table width=743><tr><td style='LEFT: 0px; WIDTH: 733; WORD-WRAP: break-word'>"
link2="<table width=743><tr><td style='table-layout:fixed;word-break:break-all'>"
while not rs.eof
if rs("图片地址")<>"" then
link1=link1+"<a href="&rs("链接地址")&" target=_blank><img src="&rs("图片地址")&" width="&cstr(rs("图片宽度"))&" height="&cstr(rs("图片高度"))&" border=0 alt="&rs("网站介绍")&"></a> "
else
link2=link2+"<a href="&rs("链接地址")&" title="&rs("网站介绍")&" target=_blank>"&rs("网站名称")&"</a> "
end if
rs.movenext
wend
link1=link1+"</td></tr></table>"+link2+"</td></tr></table>"
Application(BBSname&"link")=link1
Response.Write link1
else
Application(BBSname&"link")=" 还没有任何链接"
Response.Write " 还没有任何链接"
end if
rs.close
set rs=nothing
else
Response.Write Application(BBSname&"link")
end if
End Function
Function GetSBInfo(Str,Flag)
If inStr(Str,";")>0 then
Dim T
T = split(Str,";")
If Ubound(T) >= 2 then
T(2) = replace(T(2),")","")
T(2) = replace(T(2),"NT 5.2","2003")
T(2) = replace(T(2),"NT 5.1","XP")
T(2) = replace(T(2),"NT 5.0","2000")
T(2) = replace(T(2),"9x","Me")
T(1) = Trim(T(1))
T(2) = Trim(T(2))
If Flag = 1 then
GetSBInfo = T(1)
Else
GetSBInfo = T(2)
End If
Else
If Flag = 1 then
GetSBInfo = "未知"
Else
GetSBInfo = "未知"
End If
End If
Else
If Flag = 1 then
GetSBInfo = "未知"
Else
GetSBInfo = "未知"
End If
End If
End Function
%>
<!--#include file="../inc/tom1.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -