opendatabase
dim rs,getdata,boardnum
set rs = server.createobject("adodb.recordset")
rs.open "select boardid,boardassort,boardname,leadbbs_assort.assortname from leadbbs_boards inner join leadbbs_assort on leadbbs_assort.assortid=leadbbs_boards.boardassort where leadbbs_boards.hiddenflag = 0 order by leadbbs_assort.assortid,leadbbs_boards.orderid asc",con,1,1
gbl_dbnum = gbl_dbnum + 1
if not rs.eof then
getdata = rs.getrows(-1)
boardnum = ubound(getdata,2)
else
boardnum = -1
end if
rs.close
set rs = nothing
if boardnum = -1 then
else
dim currentassosrt,n
currentassosrt = -1183
dim lastassosrt,writestr
lastassosrt = ccur(getdata(1,boardnum))
dim lastflag
for n = 0 to boardnum
if currentassosrt<>ccur(getdata(1,n)) then
currentassosrt = ccur(getdata(1,n))
if lastassosrt = currentassosrt then
response.write "</div>"
else
response.write "</div>"
end if
%>
<img class=level1 id=out<%=n+1%>i height=9 src="images/<%=gbl_defineimage%>frame/plus.gif" width=9 border=0> <a href=boards.asp?assort=<%=getdata(1,n)%> target="b"><%=writestr & getdata(3,n)%></a>
<br>
<%
end if
%>
<%
next
response.write "</div>"
end if
closedatabase
end function%>
<!---------------------------------------qu.asp完---------------------------->
opendatabase
dim rs,getdata,boardnum
set rs = server.createobject("adodb.recordset")
rs.open "select boardid,boardassort,boardname,leadbbs_assort.assortname from leadbbs_boards inner join leadbbs_assort on leadbbs_assort.assortid=leadbbs_boards.boardassort where leadbbs_boards.hiddenflag = 0 order by leadbbs_assort.assortid,leadbbs_boards.orderid asc",con,1,1
gbl_dbnum = gbl_dbnum + 1
if not rs.eof then
getdata = rs.getrows(-1)
boardnum = ubound(getdata,2)
else
boardnum = -1
end if
rs.close
set rs = nothing
if boardnum = -1 then
else
dim currentassosrt,n
currentassosrt = -1183
dim lastassosrt,writestr
lastassosrt = ccur(getdata(1,boardnum))
dim lastflag
for n = 0 to boardnum
if currentassosrt<>ccur(getdata(1,n)) then
currentassosrt = ccur(getdata(1,n))
if lastassosrt = currentassosrt then
else
end if
end if
%>
<img src=images/9p_1.gif border=0 width=5 height=20 align=absmiddle><a href="board/board.asp?boardid=<%=getdata(0,n)%>" onclick="parent.leftb.location.href='board/_board.asp?boardid=<%=getdata(0,n)%>'" target="right"><font color=#ffffff><%=writestr & getdata(2,n)%></font></a>
<%
'注意以上这段,我采用了一个链接同时打开俩个frame窗口,frame窗口的name值分别为leftb和right。
next
end if
closedatabase
end function%>
<!---------------------------------------ban.asp完---------------------------->
dim gbl_onlineusernum,gbl_usercount,gbl_maxonline,gbl_onlinetime,gbl_maxoltime,gbl_pagecount,gbl_uploadnum
dim gbl_maxannounce,gbl_maxanctime,gbl_yesterdayanc
dim blist,boardnum
blist = application(def_mastercookies & "blist")
function checkassort
gbl_req_assort = left(request.querystring("assort"),14)
if isnumeric(gbl_req_assort)=0 then gbl_req_assort=0
gbl_req_assort = fix(ccur(gbl_req_assort))
dim boardnum,n,temparray
gbl_startboard = 0
if gbl_req_assort > 0 and isarray(blist) = true then
boardnum = ubound(blist,2)
for n = 0 to boardnum
if gbl_req_assort = ccur(blist(1,n)) then
temparray = application(def_mastercookies & "boardinfo" & blist(0,n))
if isarray(temparray) = true then
gbl_board_boardassort = ccur(temparray(1,0))
gbl_board_assortname = temparray(14,0)
gbl_startboard = n
exit for
else
gbl_req_assort = 0
gbl_board_boardassort = 0
gbl_board_assortname = ""
exit for
end if
end if
next
if n > boardnum then gbl_req_assort = 0
else
gbl_req_assort = 0
gbl_board_boardassort = 0
gbl_board_assortname = ""
end if
if ccur(gbl_showbottomsure) = 0 and gbl_req_assort > 0 then gbl_sitebottomstring = ""
end function
function displayboard
dim temp,flag
flag = 0
dim getdata
if isarray(blist) = true then
boardnum = ubound(blist,2)
else
reloadboardlistdata
blist = application(def_mastercookies & "blist")
if isarray(blist) = true then
boardnum = ubound(blist,2)
else
boardnum = -1
end if
end if
if boardnum = -1 then
else%>
<script language=javascript>
var num=0,currentassosrt = 0,flag=0;
var gbl_tablebottomstring = "<%=replace(replace(replace(gbl_tablebottomstring,"\","\\"),"""","\"""),vbcrlf,"\n")%>";
var gbl_tableheadstring = "<%=replace(replace(replace(gbl_tableheadstring,"\","\\"),"""","\"""),vbcrlf,"\n")%>";
var def_bbs_screenwidth = "<%=def_bbs_screenwidth%>";
var gbl_defineimage = "<%=gbl_defineimage%>";
<%
'模板屏蔽 代码修改提供:wensui
if getbinarybit(gbl_templetflag,1) = 1 and 1=2 then
else
if getbinarybit(gbl_templetflag,2) = 1 then
else%>
/******************************************************************
仅使用以下模板 这里您可以修改为任意模板方式,
但始终所有页面都以这里的模板为识别方式 这里也是模板的最基础简单样式
*******************************************************************/
function displayboard(boardid,boardassort,boardname,boardintro)
{
document.write("<table width=100% border=0 cellspacing=0 cellpadding=2 align=center bgcolor=#cccccc class=tbone><tr bgcolor=#666699><td colspan=2 class=tbhead><img src=images/blank.gif width=2 height=3><br>");
document.write("<img src=images/ban.gif border=0 align=absmiddle> ");
document.write("<a href=board/board.asp?boardid=" + boardid + ">" + boardname + "</a>");
//版块名称
document.write(" <font color=#333333>");
document.write(boardintro);//版块说明
document.write("</font></td></tr>");
document.write("<tr><td background=images/sq1_25.gif border=0 align=absmiddle height=1 class=tbhead>");//各版名称后分隔线
document.write("</td></tr></table>");
}
<%
end if
end if
dim boardid,forumpass
dim n
gbl_topicnum = 0
gbl_announcenum = 0
gbl_goodnum = 0
gbl_todayannounce = 0
for n = gbl_startboard to boardnum
boardid = blist(0,n)
getdata = application(def_mastercookies & "boardinfo" & blist(0,n))
if isarray(getdata) = false then
reloadboardinfo(boardid)
getdata = application(def_mastercookies & "boardinfo" & blist(0,n))
end if
if gbl_req_assort = 0 or (gbl_req_assort > 0 and gbl_req_assort = ccur(blist(1,n))) then
forumpass = getdata(7,0)
if forumpass <> "" then forumpass = "leadbbs"
getdata(9,0) = ccur(getdata(9,0))
response.write vbcrlf & "displayboard(" & boardid & "," & getdata(1,0) & ",""" & replace(replace(getdata(0,0),"\","\\"),"""","\""") & """,""" & replace(replace(replace(getdata(2,0),"\","\\"),"""","\"""),vbcrlf,"\n") & """,""" & replace(replace(getdata(3,0),"\","\\"),"""","\""") & """,""" & getdata(4,0) & """," & getdata(29,0) & "," & getdata(30,0) & ",""" & forumpass & """," & getdata(19,0) & ",""" & replace(replace(replace(getdata(20,0),"\","\\"),"""","\"""),"<","<") & """,""" & replace(replace(getdata(10,0),"\","\\"),"""","\""") & """," & getdata(9,0) & ",""" & replace(replace(getdata(14,0),"\","\\"),"""","\""") & """," & getdata(31,0) & "," & getdata(32,0) & ",""" & replace(replace(getdata(21,0),"\","\\"),"""","\""") & """,""" & getdata(22,0) & """,""" & getdata(23,0) & """,0,""" & getdata(27,0) & """);"
'以上有多余,但建议不要修改,因为在上面的基础模板中增强的话,就需要这里了
end if
gbl_topicnum = gbl_topicnum + ccur(getdata(29,0))
gbl_announcenum = gbl_announcenum + ccur(getdata(30,0))
gbl_goodnum = gbl_goodnum + ccur(getdata(32,0))
gbl_todayannounce = gbl_todayannounce + ccur(getdata(31,0))
next
%>
</script>
<%
end if
end function
sub main
opendatabase
checkuseronline
if gbl_checkpassdoneflag <> 1 then checkpass
getactiveusernumber
gbl_chk_tempstr = ""
checkassort
if gbl_chk_user = "" then displaytopinfo
displayboard
closedatabase
end sub
function getactiveusernumber
if isnumeric(application(def_mastercookies & "activeusers")) = false then
application.lock
application(def_mastercookies & "activeusers") = 0
application.unlock
end if
gbl_onlineusernum = ccur(application(def_mastercookies & "activeusers"))
dim tmpdata
if isarray(application(def_mastercookies & "statisticdata")) = false then reloadstatisticdata
tmpdata = application(def_mastercookies & "statisticdata")
gbl_onlinetime = ccur(tmpdata(0,0))
gbl_usercount = ccur(tmpdata(1,0))
gbl_maxonline = ccur(tmpdata(2,0))
gbl_maxoltime = ccur(tmpdata(3,0))
gbl_pagecount = ccur(tmpdata(4,0))
gbl_uploadnum = ccur(tmpdata(5,0))
gbl_maxannounce = ccur(tmpdata(6,0))
gbl_maxanctime = ccur(tmpdata(7,0))
gbl_yesterdayanc = ccur(tmpdata(8,0))
if gbl_onlineusernum > gbl_maxonline then
con.execute("update leadbbs_siteinfo set maxonline=" & gbl_onlineusernum & ",maxoltime=" & gettimevalue(def_now))
updatestatisticdatainfo gbl_onlineusernum,2,0
updatestatisticdatainfo gettimevalue(def_now),3,0
end if