📄 wap_board.asp
字号:
Response.Write "<pagecounter>"&N&"</pagecounter>"
If IsSqlDatabase = 1 And IsBuss=1 And Dvbbs.BoardID > 0 Then
SQL=Rs.GetRows(-1)
Else
Rs.MoveFirst
'If page > n Then page = n
If page > n Then
page = n
DvbbsWap.ShowErr 0,"参数错误,请返回!"
Exit Sub
End If
If page < 1 Then page = 1
If page > 1 Then
Rs.Move (page-1) * DvbbsWap.Number
End if
If Rs.Eof Then Exit Sub
SQL=Rs.GetRows(DvbbsWap.Number)
End If
For ti=0 To Ubound(SQL,2)
LastPost = Split(SQL(9,ti),"$")
If Ubound(LastPost)>=3 Then
S_Content = "最后回复人:"& LastPost(0)
LastPostTime = LastPost(2)
Else
S_Content = ""
LastPostTime = SQL(7,ti)
End If
S_Content = DvbbsWap.Format_Content( 0 , DvbbsWap.ForMatHtml(S_Content) )
DvbbsWap.ShowCodes DvbbsWap.Self,4,SQL(0,ti) ,3 ,SQL(2,ti) ,S_Content ,"",SQL(3,ti) ,SQL(5,ti) ,LastPostTime
Next
Else
Response.Write "<pagecounter>0</pagecounter>"
End If
Rs.Close
Set Rs=Nothing
Set Cmd=Nothing
End Sub
'显示帖子内容
Sub ShowDispbbs()
If FoundErr Then Exit Sub
Dim Rs,Sql
SQL="B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.UserIM,U.UserMobile,U.Usersign,U.userclass,U.Usertitle,U.Userwidth,U.Userheight,U.UserPost,U.Userface,U.JoinDate,U.userWealth,U.userEP,U.userCP,U.Userbirthday,U.Usersex,U.UserGroup,U.LockUser,U.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser,U.UserHidden,U.IsChallenge,B.Ubblist,B.LockTopic,B.GetMoney,B.UseTools,U.UserMoney,U.UserTicket,B.GetMoneyType"
Dim AnnounceIDlists
AnnounceIDlists=AnnounceIDlist()
If FoundErr Then Exit Sub
SQL="Select "&SQL&" From "&TotalUseTable&" B Inner Join [dv_user] U On U.UserID=B.PostUserID Where B.RootID="&Announceid&" And B.BoardID="&Dvbbs.BoardID&" And B.AnnounceID in ("&AnnounceIDlists&") Order BY B.AnnounceID, B.DateAndTime"
Set Rs = Dvbbs.Execute(SQL)
If Rs.EOF And Rs.BOF Then
DvbbsWap.AddErrCode(33)
Exit Sub
End If
Dim Pcount,i
'Pcount = 0
If Not(Rs.EOF And Rs.BOF) Then
If TopicCount mod Cint(DvbbsWap.Number) = 0 Then
Pcount= TopicCount \ Cint(DvbbsWap.Number)
Else
Pcount= TopicCount \ Cint(DvbbsWap.Number)+1
End If
'Rs.MoveFirst
'If star > Pcount Then star = Pcount
Response.Write "<pagecounter>"&Pcount&"</pagecounter>"
If star > Pcount Then
star = Pcount
DvbbsWap.ShowErr 0,"参数错误,请返回!"
Exit Sub
End If
If star < 1 Then star = 1
SQL=Rs.GetRows(DvbbsWap.Number)
Set Rs=Nothing
'AnnounceID=0,BoardID=1,UserName=2,Topic=3,dateandtime=4,body=5,
'Expression=6,ip=7,RootID=8,signflag=9,isbest=10,PostUserid=11,
'layer=12,isagree=13,useremail=14,UserIM=15,UserMobile=16,sign=17,
'userclass=18,title=19,width=20,height=21,article=22,face=23,JoinDate=24,
'userWealth=25,userEP=26,userCP=27,birthday=28,sex=29,UserGroup=30,LockUser=31,
'userPower=32,titlepic=33,UserGroupID=34,LastLogin=35,PostBuyUser=36,UserHidden=37,IsChallenge=38,Ubblists=39,LockTopic=40,
'GetMoney=41,UseTools=42,UserMoney=43,UserTicket=44,GetMoneyType=45
For i=0 To Ubound(SQL,2)
'SQL(5,i) = SQL(5,i)&"[code][align=right][b]test[/b][fly]fly[/fly][move]move[/move][color=red]文字文字文字[/color][center]center[/center][/align][rm=500,60,true]http://218.64.81.237/b/i/0326/60534.rm[/rm]aspscript[/code][em10][MP=500,60,true]http://218.64.81.237/b/i/0326/60534.wma[/MP][img]http://218.64.81.237/b/i/0326/60534.gif[/img]"
SQL(5,i) = DvbbsWap.ForMatHtml(SQL(5,i))
DvbbsWap.ShowCodes DvbbsWap.Self,"",SQL(0,i) ,4 ,SQL(3,i) ,DvbbsWap.Format_Content(0,SQL(5,i)) ,DvbbsWap.OtherContent,SQL(2,i) ,SQL(4,i) ,SQL(4,i)
Next
End If
End Sub
Function Chk_Topic_Err
Announceid = DvbbsWap.Path(DvbbsWap.PathCount-1)
If AnnounceID="" Or Not IsNumeric(AnnounceID) Then
DvbbsWap.AddErrCode(30)
FoundErr = True
Exit Function
End If
Announceid = Clng(Announceid)
If AnnounceID = -2 Then
FoundTopTopic = True
Exit Function
End If
'ReplyID=Request("ReplyID")
'If ReplyID="" Or Not IsNumeric(ReplyID) Then ReplyID=AnnounceID
Dim Rs,Sql
Dvbbs.BoardID = DvbbsWap.Path(DvbbsWap.PathCount-2)
'Response.Write dvbbs.boardid
'response.end
If Dvbbs.BoardID<>"" And IsNumeric(Dvbbs.BoardID) Then
Dvbbs.BoardID = Clng(Dvbbs.BoardID)
Else
DvbbsWap.AddErrCode(29)
FoundErr = True
Exit Function
End If
Select Case Dvbbs.BoardID
Case -1
Case -2
'Exit Function
Case Else
DvbbsWap.LoadBoardPass
End Select
Dim MyCanReply,CanRead,CanReply
'浏览购买帖权限
CanRead=False
If Dvbbs.Master or Dvbbs.SuperBoardMaster or Dvbbs.BoardMaster Then CanRead=True
Set Rs=Server.CreateObject("Adodb.RecordSet")
SQL="Select title,istop,isbest,PostUserName,PostUserid,hits,isvote,child,pollid,LockTopic,PostTable,BoardID,TopicMode,GetMoney,UseTools,GetMoneyType, DateAndTime From DV_topic where TopicID="&Announceid
If Not IsObject(Conn) Then ConnectionDatabase
Rs.Open SQL,Conn,1,3
Dvbbs.SqlQueryNum=Dvbbs.SqlQueryNum+1
'Set Rs=Dvbbs.Execute(SQL)
Dim istop,isVote,pollid,Locktopic
Dim TopicMode,ViewNum,T_GetMoney,T_UseTools,T_GetMoneyType
If Not(Rs.BOF and Rs.EOF) then
If Dvbbs.BoardID = -1 Or Dvbbs.BoardID = -2 Then
Dvbbs.BoardID = Rs(11)
DvbbsWap.LoadBoardPass
ElseIf Rs(11)<>Dvbbs.BoardID Then
DvbbsWap.AddErrCode(29)
FoundErr = True
Exit Function
End If
Rs(5)=Rs(5)+1
Rs.Update
Topic=Rs(0)
istop=rs(1)
isVote=rs(6)
TopicCount=rs(7)+1
pollid=rs(8)
'锁定多少天前的帖子判断 2004-9-16 Dv.Yz
If Not Ubound(Dvbbs.Board_Setting) > 70 Then
Locktopic = Rs(9)
Else
If Not Clng(Dvbbs.Board_Setting(71)) = 0 And Datediff("d", Rs(16), Now()) > Clng(Dvbbs.Board_Setting(71)) Then
Locktopic = 1
Else
Locktopic = Rs(9)
End If
End If
TotalUseTable=rs(10)
TopicMode=rs(12)
ViewNum=Rs(5)
T_GetMoney = cCur(Rs(13))
T_UseTools = Rs(14)
T_GetMoneyType = Cint(Rs(15))
If Rs(4)=Dvbbs.UserID Then
MyCanReply=Dvbbs.GroupSetting(4)
CanRead=True
Else
MyCanReply=Dvbbs.GroupSetting(5)
If Cint(Dvbbs.GroupSetting(2))=0 Then
DvbbsWap.AddErrcode(31)
FoundErr = True
Exit Function
End If
End If
If Len(Topic) > Cint(Dvbbs.Board_Setting(25)) And Not TopicMode>0 Then
Topic=Left(Topic,Dvbbs.Board_Setting(25))&"..."
End If
Topic=Dvbbs.ChkBadWords(Topic)
Else
DvbbsWap.AddErrcode(32)
FoundErr = True
Exit Function
End If
Rs.Close
Set Rs=Nothing
End Function
Function AnnounceIDlist()
Dim Rs,SQL,i,starcount
If Star<1 Then Star=1
If DvbbsWap.Number = 0 Then DvbbsWap.Number = 10 '每页记录数
starcount=(Star-1)*DvbbsWap.Number
SQL="Select Announceid From "&TotalUseTable&" Where BoardID="&Dvbbs.BoardID&" And RootID="&Announceid&" Order By AnnounceID"
Set Rs=Dvbbs.Execute(SQL)
If Not Rs.Eof Then
Rs.Move Starcount
REM 修正最后页面出错信息 2004-5-22 Dv.Yz
If Rs.Eof Then
DvbbsWap.AddErrcode(33)
FoundErr = True
Exit Function
End If
AnnounceIDlist = Rs(0)
Rs.Movenext
For i = 1 To DvbbsWap.Number-1
If Rs.Eof Then Exit For
AnnounceIDlist = AnnounceIDlist & "," & Rs(0)
Rs.Movenext
Next
Else
DvbbsWap.AddErrcode(32)
FoundErr = True
End If
Set Rs=Nothing
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -