?? board_config.asp
字號:
<%
Function All_Board
threadcount=0
replycount =0
if Application(JBBMasterCookies&"BoardAll")="" or Application(JBBMasterCookies&"ClassNum")<1 or Not(IsArray(Application(JBBMasterCookies&"postcount"))) then
Board_Menu = "論壇跳轉(zhuǎn):"
Board_Menu = Board_Menu & "<select name=""select"" onchange=""if(this.options[this.selectedIndex].value != '') {window.location=('Board.asp?BoardID='+this.options[this.selectedIndex].value+'') }"">"
set rs1 = server.CreateObject("adodb.recordset")
set rs = server.CreateObject("adodb.recordset")
sql = "select Class_name,Class_ID from JBB_Class order By Class_order asc"
rs.open sql,conn,1,1
if Not(rs.Bof and rs.Eof) then
ClassNum = 0
for ClassList = 1 to rs.recordCount
Class_name = rs("Class_name")
ClassNum = ClassNum+1
Board_Menu = Board_Menu &"<option value="""">"&Class_name&"</option>"
sql1 = "select BoardID,title,threadcount,replycount From JBB_Board where ClassID="&rs("Class_ID")&" order BY Boardorder asc"
rs1.open sql1,conn,1,1
if not(rs1.eof and rs1.bof) then
for BoardList = 1 to rs1.recordCount
Board_Menu = Board_Menu &"<option value="""& trim(rs1("BoardID")) &"""> "&rtrim(rs1("title"))&"</option>"
BoardValues = BoardValues&rs1("BoardID")&","
threadcount = threadcount + rs1("threadcount")
replycount = replycount + rs1("replycount")
rs1.MoveNext
Next'BoardList
BoardValues = left(BoardValues, len(BoardValues) - 1)
'response.write BoardValues&"||"
Application.Lock
Application(JBBMasterCookies&"Class"&ClassNum) = array(Class_name,BoardValues)
Application(JBBMasterCookies&"postcount") = array(threadcount,replycount)
Application.UnLock
BoardValues=""
End if
rs1.close
rs.MoveNext
Next'ClassList
Application.Lock
Application(JBBMasterCookies&"ClassNum") = ClassNum
Application.UnLock
End if
set rs = Nothing
set rs1 = Nothing
Board_Menu = Board_Menu & "</select>"
Application.Lock
Application(JBBMasterCookies&"BoardAll") = Board_Menu
Application.UnLock
End if
End Function
All_Board_Menu = Application(JBBMasterCookies&"BoardAll")
'-----------------------------
Function Board_info(BID)
'response.write BID
If Not(IsNumeric(Bid)) then
response.Write("版塊ID參數(shù)錯誤.")
response.end
End if
If Not(IsArray(Application(JBBMasterCookies&"Board_Config"&BID))) then
set rsb=conn.ExeCute("select Top 1 BoardID,ClassID,title,description,Boardorder,styleid,bestrowUserStyle,threadcount,replycount,lastposter,lastuserid,lasttime,lastpost,lastpostid,threadCent,replyCent,bestCent,Reads,hide,UploadFileType,UploadFileSize,EditPostShow,post_interval,post_byte,Mod_clueon,clueon_color From JBB_Board where BoardID="&BID)
if rsb.eof or rsb.bof then
set rsb = nothing
response.end
else
set rsmod = server.CreateObject("adodb.recordset")
rsmod.open "select JBB_Mod.Mod_BoardID,JBB_user.userID,JBB_user.username from JBB_Mod left Join JBB_user on (JBB_Mod.Mod_nameID=JBB_user.userid) where JBB_Mod.Mod_BoardID = "&BID,conn,1,1
if Not rsmod.eof then
for m = 1 to rsmod.recordCount
modlist = modlist&"<a href=""user.asp?userid="& rsmod("userID") &""">"& rtrim(rsMod("username")) &"</a>,"
rsMod.MoveNext
Next'm
modlist = left(modlist, len(modlist) - 1)
else
modlist="暫無版主"
End if
rsMod.close
set rsMod = Nothing
'-----------------------------------------------------
dim Board_Config_Array()
Redim Board_Config_Array(26)
Board_Config_Array(0) = rsb(0)
Board_Config_Array(1) = rsb(1)
Board_Config_Array(2) = rsb(2)
Board_Config_Array(3) = rsb(3)
Board_Config_Array(4) = rsb(4)
Board_Config_Array(5) = rsb(5)
Board_Config_Array(6) = rsb(6)
Board_Config_Array(7) = rsb(7)
Board_Config_Array(8) = rsb(8)
Board_Config_Array(9) = rsb(9)
Board_Config_Array(10) = rsb(10)
Board_Config_Array(11) = rsb(11)
Board_Config_Array(12) = rsb(12)
Board_Config_Array(13) = rsb(13)
Board_Config_Array(14) = rsb(14)
Board_Config_Array(15) = rsb(15)
Board_Config_Array(16) = rsb(16)
Board_Config_Array(17) = rsb(17)
Board_Config_Array(18) = rsb(18)
Board_Config_Array(19) = rsb(19)
Board_Config_Array(20) = rsb(20)
Board_Config_Array(21) = rsb(21)
Board_Config_Array(22) = rsb(22)
Board_Config_Array(23) = rsb(23)
Board_Config_Array(24) = rsb(24)
Board_Config_Array(25) = rsb(25)
Board_Config_Array(26) = modlist
Application.Lock
Application(JBBMasterCookies&"Board_Config"&BID) = Board_Config_Array
Application.UnLock
Set reb = Nothing
End if
End If
End Function
'--------------------------------------------------------------
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -