' 打开数据库 Set Con = Server.CreateObject("ADODB.Connection") Con.Open "asp" , application("ConASP_RuntimeUserName") , Application("ConASP_RuntimePassWord")
Set RecBBS = Server.CreateObject("ADODB.RecordSet") Set RecReply = Server.CreateObject("ADODB.RecordSet") Set RecMember = Server.CreateObject("ADODB.RecordSet")
If Request("Keyword") <> "" Then KeyWord = Request("Keyword") Else KeyWord = ""
If Request("Page") = "" Then If IsNumeric( session("BBS_Page") ) Then Page = Int(Session("BBS_Page")) Else Page = 1 End If Else Page = Int(Request("Page")) End If If Page < 1 Then Page = 1
RecBBS.PageSize = ListSize
SQL = "SELECT * FROM bbs " If KeyWord <> "" Then SQL = SQL + "WHERE [题目] LIKE '%" & KeyWord & "%' " End If SQL = SQL + "ORDER BY [序号] DESC" RecBBS.Open SQL , Con , 3