<% If Dvbbs.BoardID < 1 Then Response.Write "参数错误":Response.End If Request("page") <> "" And CStr(Dvbbs.CheckNumeric(Request("page"))) <> Request("page") Then Response.Write "参数错误" Response.End End If If Dvbbs.GroupSetting(2)="0" Then Dvbbs.AddErrcode(31):Dvbbs.ShowErr():response.End Dim PostUserid, G_TopicTitle, G_IsVote, G_Childs, G_PollID, G_LockTopic, G_Hits, G_Expression,FlashId Dim G_ItemList, G_ItemsPerPage, G_CurrentPage, G_Pages, G_Moved Dim G_UserList Dim G_UserItemQuery Dim G_Floor Dim G_CanReply Dim Dv_ubb Dim CanRead,TrueMaster,Skin '以下定义的变量在Dv_ubbcode.html页面会用到 Dim EmotPath Dim TotalUsetable Dim PostBuyUser Dim UserName Dim T_GetMoneyType Dim AnnounceID, ReplyID, Replyid_a, AnnounceID_a, RootID_a Dim IsThisBoardMaster '确定当前用户是否本版版主,防止下面的操作影响到 Dvbbs.BoardMaster导致出错 IsThisBoardMaster = Dvbbs.BoardMaster '浏览购买帖权限 CanRead=False TrueMaster=False Rem 为兼顾管理菜单显示,对有管理权限的暂时当版主等级处理,为的是显示管理菜单. If Not Dvbbs.BoardMaster Then If Dvbbs.UserID > 0 Then If Dvbbs.GroupSetting(18) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(19) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(20) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(21) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(22) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(23) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(24) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(25) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(26) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(27) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(28) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(29) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(30) = "1" Then Dvbbs.BoardMaster=True ElseIf Dvbbs.GroupSetting(31) = "1" Then Dvbbs.BoardMaster=True End If End If Else TrueMaster=True End If If Dvbbs.BoardMaster Then CanRead=True Dim authorid authorid = Dvbbs.CheckNumeric(Request("authorid")) '初始数据 AnnounceID = 0 '主题ID G_UserItemQuery = "userid,username,useremail,userpost,usertopic,usersign,usersex,userface,userwidth,userheight,joindate,lastlogin,userlogins,lockuser,userclass,userwealth,userep,usercp,userpower,userdel,userisbest,usertitle,userhidden,usermoney,userticket,titlepic,usergroupid,userim,useremail" '查询用户的字段列表 '0-userid,1-username,2-useremail,3-userpost,4-usertopic,5-usersign,6-usersex,7-userface,8-userwidth,9-userheight,10-joindate,11-lastlogin,12-userlogins,13-lockuser,14-userclass,15-userwealth,16-userep,17-usercp,18-userpower,19-userdel,20-userisbest,21-usertitle,22-userhidden,23-usermoney,24-userticket,25-titlepic,26-UserGroupID,27-userim Rem 增加勋章插件字段查询,Fish 2010-3-11 if Cint(dvbbs.Forum_Setting(104))=1 then G_UserItemQuery = G_UserItemQuery & ",UserMedal" if Cint(dvbbs.Forum_Setting(102))=1 then G_UserItemQuery = G_UserItemQuery & ",RLActTimeT" '--------------------荣誉勋章------------------------ Dim G_MedalData G_MedalData = GetMedalData Function GetMedalData() if Cint(dvbbs.Forum_Setting(104))=0 Then Exit Function Dim Rs,dTemp Dvbbs.Name = "Medal" If Dvbbs.ObjIsEmpty() Then Set Rs = Dvbbs.Execute("SELECT id,MedalName,MedalPic,MedalDesc FROM Dv_Medal") If Not Rs.Eof Then Dvbbs.Value = Rs.GetRows(-1) End If Rs.Close : Set Rs = Nothing End If GetMedalData = Dvbbs.Value End Function '----------------------End---------------------------- LoadTopicInfo LoadBBSListData LoadUserListData Dvbbs.LoadTemplates("dispbbs") Dvbbs.Nav() Dvbbs.Head_var 1,"","","" Response.Write GetForumTextAd(2) Dvbbs.ActiveOnline() EmotPath=Split(Dvbbs.Forum_emot,"|||")(0) 'em心情路径 Set Dv_ubb=new Dvbbs_UbbCode Dv_ubb.PostType=1 TPL_Scan Template.html(0)'Dvbbs.ReadTextFile("dispbbsnew.tpl")' TPL_Flush Set Dv_ubb=Nothing Sub LoadTopicInfo() AnnounceID = Dvbbs.CheckNumeric(Request("ID")) If 0=AnnounceID Then Dvbbs.AddErrCode(30):Dvbbs.Showerr() G_CurrentPage = Dvbbs.CheckNumeric(Request("star")) If 0=G_CurrentPage Then G_CurrentPage=1 Skin=Request("Skin") If Skin="" Or Not IsNumeric(Skin) Then Skin=Dvbbs.Board_setting(42) Dim Rs, SQL, iLockSet, iTopicMode, sMove sMove = request("move") iLockSet = Dvbbs.CheckNumeric(Dvbbs.Board_Setting(71)) SQL="Select top 1 TopicID,boardid,title,hits,isvote,child,pollid,LockTopic,PostTable,TopicMode,DateAndTime,Expression,GetMoneyType,PostUserid From Dv_topic where " If ""=sMove Then SQL = SQL & ("topicID=" & AnnounceID) Else SQL = SQL & "BoardID=" & Dvbbs.BoardID & " and topicID" If "next"=sMove Then SQL = SQL & ("<" & AnnounceID & " order by topicID desc") Else SQL = SQL & (">" & AnnounceID & " order by topicID") End If End If If Not IsObject(Conn) Then ConnectionDatabase Set Rs=Dvbbs.iCreateObject("Adodb.RecordSet") Rs.Open SQL,Conn,1,3 Dvbbs.SqlQueryNum=Dvbbs.SqlQueryNum+1 If Rs.eof Or Rs.bof Then If ""<>sMove Then Response.Write "" Rs.Close Set Rs=Nothing Dvbbs.PageEnd Response.End Else Dvbbs.AddErrcode(32) End If Else If CStr(Rs("BoardID"))<>CStr(Dvbbs.BoardID) Then Dvbbs.AddErrCode(29) G_Hits = Dvbbs.CheckNumeric(Rs("hits")) Rs("hits") = G_Hits+1 G_LockTopic = Rs("LockTopic") If 0=G_LockTopic And iLockSet<>0 And Datediff("d", Rs("DateAndTime"),Now())>iLockSet Then G_LockTopic = 1 Rs("LockTopic") = G_LockTopic End If On Error Resume Next Rs.Update If Err Then Err.Clear G_TopicTitle = Rs("title") G_IsVote = Rs("isvote") G_Childs = Rs("child") G_PollID = Rs("pollid") G_Expression = Rs("Expression") T_GetMoneyType = Rs("GetMoneyType") TotalUsetable = Rs("PostTable") iTopicMode = Rs("topicmode") AnnounceID = Rs("TopicID") PostUserid = Rs("PostUserid") End If Rs.Close Set Rs=Nothing If authorid>0 Then Dim Rs1 Set rs1=dvbbs.execute("select count(*) from "&TotalUsetable&" where boardid not in(444,777) and boardid="&dvbbs.boardid&" and postuserid="&authorid&" and rootid="&AnnounceID) G_Childs=Rs1(0):Rs1.Close:Set Rs=Nothing End If Dvbbs.Showerr() G_TopicTitle = Dvbbs.ChkBadWords(G_TopicTitle) ReplyID = Dvbbs.CheckNumeric(Request("ReplyID")) If 0=ReplyID Then ReplyID=AnnounceID If iTopicMode<>1 Then G_TopicTitle=replace(G_TopicTitle, "<", "<") Dvbbs.Stats = G_TopicTitle G_Childs = G_Childs+1 Select Case iTopicMode Case 2 G_TopicTitle = ""&G_TopicTitle&"" Case 3 G_TopicTitle = ""&G_TopicTitle&"" Case 4 G_TopicTitle = ""&G_TopicTitle&"" Case Else End Select End Sub Sub LoadBBSListData() On Error Resume next G_ItemsPerPage = Dvbbs.CheckNumeric(Dvbbs.Board_Setting(27)) G_Pages = G_Childs \ G_ItemsPerPage If (G_Childs Mod G_ItemsPerPage)<>0 Then G_Pages = G_Pages + 1 If G_Pages<=0 Then G_Pages = 1 If G_CurrentPage > G_Pages Then G_CurrentPage = G_Pages G_Moved = G_ItemsPerPage*(G_CurrentPage-1) Dim Rs, SQL, Cmd,sqlfields,sqlfieldswhere,authorwhere sqlfields="AnnounceID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,PostUserid,layer,isagree,GetMoneyType,IsUpload,Ubblist,LockTopic,GetMoney,UseTools,PostBuyUser,ParentID,FlashId" If authorid>0 Then authorwhere=" and postuserid="&authorid Else authorwhere="" End If If 1=Skin Then If ReplyID=AnnounceID Then sqlfieldswhere=" RootID="& AnnounceID &" and Boardid="& Dvbbs.Boardid&authorwhere SQL="Select Top 1 "&sqlfields&" From "& TotalUseTable & " where " &sqlfieldswhere Else sqlfieldswhere=" AnnounceID="&ReplyID&" and Boardid="& Dvbbs.Boardid&authorwhere SQL="Select "&sqlfields&" From "& TotalUseTable &" where "& sqlfieldswhere End If Else sqlfieldswhere=" RootID="& ReplyID &" and Boardid="& Dvbbs.Boardid&authorwhere SQL="Select "&sqlfields&" From "& TotalUsetable & " where "& sqlfieldswhere&" Order By Announceid" '0-AnnounceID,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-GetMoneyType,14-IsUpload,15-Ubblist,16-LockTopic,17-GetMoney,18-UseTools,19-PostBuyUser,20-ParentID End If 'response.Write sqlfieldswhere If IsSqlDataBase=1 And IsBuss=1 And Skin=0 Then Dim mypage Set mypage=new Pager 'If Not IsObject(Conn) Then ConnectionDatabase mypage.getconn=conn '得到数据库连接 mypage.pagesize=G_ItemsPerPage '定义分页每一页的记录数 mypage.TableName=TotalUsetable '要查询的表名 mypage.Tablezd=sqlfields mypage.KeyName="announceid" mypage.OrderType=0 mypage.PageWhere=sqlfieldswhere mypage.GetStyle =1 Set Rs=mypage.getrs() If Not Rs.EoF Then G_ItemList=Rs.GetRows(-1) Else Rs.close():Set Rs=Nothing:Dvbbs.AddErrCode(29) End If Rs.close():Set Rs=Nothing 'Set Cmd = Nothing Else Set Rs=Dvbbs.Execute(SQL) If Rs.eof Or Rs.bof Then Dvbbs.AddErrCode(29) Else On Error Resume Next If 1<>Skin Then Rs.Move(G_Moved) If Err Then Err.clear If Not Rs.eof Then G_ItemList = Rs.GetRows(G_ItemsPerPage) Else Dvbbs.AddErrCode(29) End If End If Rs.Close Set Rs=Nothing End If Dvbbs.Showerr() G_CanReply=False '是否允许回复 If Not Dvbbs.Board_Setting(0)="1" And Cint(G_LockTopic)=0 Then If Dvbbs.GroupSetting(5)="1" Then G_CanReply=True ElseIf Dvbbs.UserID = PostUserid and Dvbbs.GroupSetting(4)="1" Then G_CanReply=True ElseIf Dvbbs.master Or Dvbbs.superboardmaster Or Dvbbs.boardmaster Then G_CanReply=True End If End If End Sub Sub LoadUserListData() If IsArray(G_UserList) Or Not IsArray(G_ItemList) Then Exit Sub Dim Rs, i, j, iTempUserID, iUbd, sUserIDList iUbd = UBound(G_ItemList,2) sUserIDList = G_ItemList(10, 0) For i=0 To iUbd sUserIDList = sUserIDList & ("," & G_ItemList(10,i)) Next Set Rs = Dvbbs.Execute("Select " & G_UserItemQuery & " From dv_user Where UserID IN ("& sUserIDList &")") If Rs.Eof Or Rs.Bof Then '全部是客人 Else G_UserList = Rs.GetRows(-1) End If Rs.Close Set Rs = Nothing '处理用户资料 For i=0 To iUbd iTempUserID = G_ItemList(10, i) G_ItemList(10, i) = 0 '初始为游客 If IsArray(G_UserList) Then For j=UBound(G_UserList,2) To 0 Step -1 If G_UserList(0, j)=iTempUserID Then G_ItemList(10, i) = j+1 '这里加了1,实际用时要减1 Exit For End If Next End If Next End Sub Sub LoadAndParseVote(sTemplate) Dim Rs,aVote,s,a1,a2,u1,u2,i,j,t,sLoop Dim votetype,votchilds,votchilds_title,votchilds_ep Set Rs=Dvbbs.Execute("Select voteid,vote,votenum,votetype,lockvote,voters,timeout,uarticle,uwealth,uep,ucp,upower From Dv_Vote Where VoteID="&G_PollID) If Not Rs.eof Then aVote=Rs.GetRows(-1) Else Exit Sub End If Set Rs=Nothing s=sTemplate s=Replace(s,"{$showvote.voteid}",aVote(0,0)) votetype=aVote(3,0) s=Replace(s,"{$showvote.lockvote}",aVote(4,0)) s=Replace(s,"{$showvote.voters}",aVote(5,0)) s=Replace(s,"{$showvote.timeout}",aVote(6,0)) s=Replace(s,"{$showvote.uarticle}",aVote(7,0)) s=Replace(s,"{$showvote.uwealth}",aVote(8,0)) s=Replace(s,"{$showvote.uep}",aVote(9,0)) s=Replace(s,"{$showvote.ucp}",aVote(10,0)) s=Replace(s,"{$showvote.upower}",aVote(11,0)) If 0=Dvbbs.userid Then s=Replace(s,"{$showvote.input}","您还未登录,不能参与。") Else If datediff("d",aVote(6,0),Now()) > 0 Then s=Replace(s,"{$showvote.input}","已过期,不能参与。") Else If G_LockTopic Then s=Replace(s,"{$showvote.input}","相关主题已经锁定,不能参与。") Else If Not Dvbbs.Execute("Select * From Dv_voteuser Where voteid="& G_PollID &" And userid="& Dvbbs.userid).EOF Then s=Replace(s,"{$showvote.input}","您已经投过票了,看结果吧!") Else s=Replace(s,"{$showvote.input}","") End If End If End If End If a1=Split(Dvbbs.ChkBadWords(aVote(1,0)),"|") a2=Split(aVote(2,0),"|") u1=UBound(a1) t=0 For i=0 To u1 sLoop=sLoop&"" votchilds = Split(a1(i),"@@") If votetype = 2 and Ubound(votchilds)>=3 Then sLoop=sLoop&(""&(i+1)&". "&votchilds(0)&"") 'title votchilds_title = Split(votchilds(2),"$$") votchilds_ep = Split(votchilds(3),"$$") sLoop=sLoop&"" For j=0 To UBound(votchilds_title) If ""<>votchilds_title(j) Then Select Case votchilds(1) Case "1" sLoop=sLoop&" "&votchilds_title(j)&" " Case "2" sLoop=sLoop&" 回答: " Case Else sLoop=sLoop&" "&votchilds_title(j)&" " End Select End If Next sLoop=sLoop&"" Else sLoop=sLoop&"" If 0=aVote(3,0) Then sLoop=sLoop&"" Else sLoop=sLoop&"" End If sLoop=sLoop&(a1(i)&"") 'title sLoop=sLoop&"" sLoop=sLoop&("") t=t+a2(i) End If sLoop=sLoop&"" Next sLoop=Replace(sLoop,"{$total}",t) s=Replace(s,"{$showvote.list}",sLoop) TPL_Scan s End Sub Sub ParsePageNode(sToken) Dim a,i,s Select Case sToken Case "topicid" TPL_Echo AnnounceID Case "announceid" TPL_Echo G_ItemList(0,0) Case "topic" TPL_Echo G_TopicTitle Case "hits" TPL_Echo G_Hits Case "currentpage" TPL_Echo G_CurrentPage Case "boardpage" TPL_Echo Dvbbs.CheckNumeric(request("page")) Case "bbstable" TPL_Echo TotalUsetable Case "postfacelist" a=split(Dvbbs.Forum_PostFace,"|||") s=s&"
" For i=2 To UBound(a)-1 s=s&"
" If 1=(i-2) Mod 3 Then s=s&"
" Next TPL_Echo s Case "modelink" If 1=Skin Then TPL_Echo "平板" Else TPL_Echo "树形" End If Case "treemode" If 1=Skin Then TPL_Echo "
" Case "topicadminlist" s="" If Dvbbs.Boardmaster Then If 1=T_GetMoneyType Then s=s& " 结帖管理
" End If s=s& " 专题管理
" If 1=G_LockTopic Then s=s& " 解除锁定
" Else s=s& " 锁定帖子
" End If s=s& " 提升帖子
" s=s& " 沉底帖子
" s=s& " 跟帖管理
" s=s& " 删除帖子
" s=s& " 移动帖子
" s=s& " 设置固顶
" TPL_Echo "
主题管理" TPL_Echo "
" If ""<>s Then TPL_Echo s TPL_Echo "
" ElseIf IsSelfPost() Then If 1=T_GetMoneyType Then s=s& " 结帖管理
" End If If "1"=Dvbbs.GroupSetting(13) Then If 1=G_LockTopic Then s=s& " 解除锁定
" Else s=s& " 锁定帖子
" End If End If If "1"=Dvbbs.GroupSetting(11) Then s=s& "跟帖管理
" s=s& "删除帖子
" End If If "1"=Dvbbs.GroupSetting(12) Then s=s& "移动帖子
" End If If ""<>s Then TPL_Echo "
主题管理
" TPL_Echo s TPL_Echo "
" End If End If Case Else End Select End Sub Sub ParseUserNode(sToken) Dim i, p, s, s2, bShowAll i = G_ItemList(10, G_Floor) bShowAll = False If i>0 Then bShowAll = 2<>G_ItemList(8, G_Floor) Or Dvbbs.BoardMaster Or Dvbbs.UserID=G_UserList(0, G_ItemList(10, G_Floor)-1) ' 非客人帖 而且 (非匿名帖 或者 是管理员 或者 是自己) If bShowAll Then Select Case sToken Case "userid" TPL_Echo G_UserList(0, i-1) Case "username" TPL_Echo UserName Case "richname" s = G_UserList(26, i-1) Select Case s 'Case 0 s2= Dvbbs.mainsetting(9) Case 1 s2= Dvbbs.mainsetting(9) Case 2 s2= Dvbbs.mainsetting(7) Case 3 s2= Dvbbs.mainsetting(7) Case 4 s2= Dvbbs.mainsetting(5) Case 5 s2= "gray" Case 6 s2= "gray" Case 7 s2= Dvbbs.mainsetting(5) Case 8 s2= Dvbbs.mainsetting(11) Case Else s2= Dvbbs.mainsetting(5) End Select s=Split(Split(Application(Dvbbs.CacheName &"_groupsetting").documentElement.selectSingleNode("usergroup[@usergroupid='"& G_UserList(26, i-1) &"']/@groupsetting").text,",")(58),"§") TPL_Echo ""&(s(0)&replace(UserName,chr(255),"")&s(1)) If 2=G_ItemList(8, G_Floor) Then TPL_Echo "  [已匿名]" TPL_Echo "" Case "useremail" TPL_Echo G_UserList(2, i-1) Case "userpost" TPL_Echo G_UserList(3, i-1) Case "usertopic" TPL_Echo G_UserList(4, i-1) Case "usersign" s = G_UserList(5, i-1) p = G_UserList(26, i-1) If ""<>s And 1=G_ItemList(8, G_Floor) And Dvbbs.forum_setting(42)="1" Then Set s2 = Application(Dvbbs.CacheName &"_groupsetting") If Not s2 Is Nothing Then If Application(Dvbbs.CacheName &"_groupsetting").documentElement.selectSingleNode("usergroup[@usergroupid='"& p &"']/@groupsetting") Is Nothing Then p = 7 If Split(Application(Dvbbs.CacheName &"_groupsetting").documentElement.selectSingleNode("usergroup[@usergroupid='"& p &"']/@groupsetting").text,",")(55) Then TPL_Echo "
" & Dvbbs.ChkBadWords(Dv_ubb.Dv_SignUbbCode(s, p)) End If Set s2 = Nothing End If Case "usersex" s2=G_UserList(11, i-1) If "2"=G_UserList(22, i-1) Then If IsDate(s2) Then If DateDiff("s",s2,Now())>(cCur(dvbbs.Forum_Setting(8))*60) Then G_UserList(22, i-1)="1" End If Else G_UserList(22, i-1)="1" End If Else G_UserList(22, i-1)="1" End If s = G_UserList(6, i-1) If "1"=G_UserList(22, i-1) Then Select Case s Case "1" TPL_Echo "" Case Else TPL_Echo "" End Select Else Select Case s Case "1" TPL_Echo "" Case Else TPL_Echo "" End Select End If Case "userface" s2 = s2 & "0 Then s2 = s2 & Mid(s, p+1) s = Left(s, p-1) Else s2 = s2 & s s = "0" End If s2 = s2 & """ alt="""" />" If "0"<>s Then s2 = s2 & ("
查看魔法头像
") TPL_Echo s2 Case "joindate" TPL_Echo G_UserList(10, i-1) Case "lastlogin" TPL_Echo G_UserList(11, i-1) Case "userlogins" TPL_Echo G_UserList(12, i-1) Case "lockuser" TPL_Echo G_UserList(13, i-1) Case "userclass" TPL_Echo G_UserList(14, i-1) Case "userwealth" TPL_Echo G_UserList(15, i-1) Case "userep" TPL_Echo G_UserList(16, i-1) Case "usercp" TPL_Echo G_UserList(17, i-1) Case "userpower" s = G_UserList(18, i-1) If "0"<>s Then TPL_Echo "" & s & "" Else TPL_Echo s End If Case "userdel" TPL_Echo G_UserList(19, i-1) Case "userisbest" TPL_Echo G_UserList(20, i-1) Case "usertitle" TPL_Echo G_UserList(21, i-1) Case "usermoney" TPL_Echo G_UserList(23, i-1) Case "userticket" TPL_Echo G_UserList(24, i-1) Case "titlepic" s2 = s2 & "" TPL_Echo s2 Case "qq" If Not IsArray(G_UserList(27, i-1)) Then G_UserList(27, i-1)=Split(G_UserList(27, i-1), "|||") TPL_Echo G_UserList(27, i-1)(1) Case "link_qq" If Not IsArray(G_UserList(27, i-1)) Then G_UserList(27, i-1)=Split(G_UserList(27, i-1), "|||") If ""<>G_UserList(27, i-1)(1) Then TPL_Echo " | QQ" Case "email" TPL_Echo G_UserList(28, i-1) Case "homepage" If Not IsArray(G_UserList(27, i-1)) Then G_UserList(27, i-1)=Split(G_UserList(27, i-1), "|||") TPL_Echo G_UserList(27, i-1)(0) Case "uc" If Not IsArray(G_UserList(27, i-1)) Then G_UserList(27, i-1)=Split(G_UserList(27, i-1), "|||") TPL_Echo G_UserList(27, i-1)(6) Rem 以下为荣誉勋章标签,fish 2010-2-19 Case "medal" if Cint(dvbbs.Forum_Setting(104))=1 then Dim j If G_UserList(29, i-1) <> "" Then s = Split(G_UserList(29, i-1),",") For i = 0 To Ubound(s) For j = 0 To Ubound(G_MedalData,2) If Clng(s(i)) = G_MedalData(0,j) Then s2 = s2 & ""&G_MedalData(1,j)&" " Exit For End If Next Next End If TPL_Echo s2 End If End Select Else '游客 或 匿名帖 Select Case sToken Case "username" s = Split(G_ItemList(6, G_Floor), ".") If i>0 Then s2 = s2 & "匿名" Else s2 = s2 & "客人" End If s2 = s2 & ("(" & s(0) & "." & s(1) & ".*.*)") TPL_Echo s2 Case "richname" s = Split(G_ItemList(6, G_Floor), ".") If i>0 Then s2 = s2 & "匿名" Else s2 = s2 & "客人" End If s2 = s2 & ("(" & s(0) & "." & s(1) & ".*.*)") s=Split(Split(Application(Dvbbs.CacheName &"_groupsetting").documentElement.selectSingleNode("usergroup[@usergroupid='7']/@groupsetting").text,",")(58),"§") TPL_Echo ""&(s(0)&s2&s(1)&"") Case "userface" If i>0 Then TPL_Echo "" Else TPL_Echo "" End If Case Else End Select End If End Sub Function IsSelfPost() IsSelfPost=False If G_ItemList(10, G_Floor)>0 Then If G_UserList(0, G_ItemList(10, G_Floor)-1)=Dvbbs.UserID Then IsSelfPost=True End If End If End Function Function GetPostUserID() If G_ItemList(10, G_Floor)>0 Then GetPostUserID=G_UserList(0, G_ItemList(10, G_Floor)-1) Else GetPostUserID=0 End If End Function Sub ParseBBSListNode(sToken) Dim i, a, postbuyusers, postbuyinfo, j Select Case sToken Case "announceid" TPL_Echo G_ItemList(0, G_Floor) Case "title" TPL_Echo Dvbbs.Replacehtml(Dvbbs.ChkBadWords(G_ItemList(2, G_Floor))) Case "tyisbest" Rem 精华帖加盖章,小易 If 1=G_ItemList(9, G_Floor) Then TPL_Echo "" end If Case "url" If 0=G_Floor Then TPL_Echo "" Case "body" i = G_ItemList(10, G_Floor) If i>0 Then i = G_UserList(26, i-1) Else i = 7 '客人 End If If 0=G_Floor And 1=G_CurrentPage And CLng(G_ItemList(20, G_Floor))=0 Then '顶楼需要判断购买帖 If G_LockTopic Then TPL_Echo "
贴子已被锁定

" If 3=T_GetMoneyType Then TPL_Echo "
以下内容需要支付 "&G_ItemList(17, G_Floor)&" 个金币方可查看," If IsSelfPost() Then TPL_Echo "这是您发的帖子" ElseIf TrueMaster Then TPL_Echo "由于您是工作人员,你可以看到内容。" Else If Trim(PostBuyUser)="" Then PostBuyUser="0@@@-1@@@0@@@|||$PayMoney|||" postbuyusers=split(PostBuyUser,"|||") postbuyinfo=postbuyusers(0) postbuyinfo=Split(postbuyinfo,"@@@") 'Rem postbuyinfo(0) 收入money postbuyinfo(1) 购买限制maxbuy postbuyinfo(2) vip是否需要购买notvipbuy postbuyinfo(3) 允许购买用户列表buyuser If UBound(postbuyinfo)<=2 Then Exit Sub a=False For j=2 to UBound(postbuyusers) If postbuyusers(j)<>"" And postbuyusers(j)=Dvbbs.MemberName Then a=True End If Next If a Then TPL_Echo "您已经购买。" ElseIf Dvbbs.VipGroupUser And "1"=postbuyinfo(2) Then TPL_Echo "由于您是vip用户,并且因为设置了vip用户可免购买查看,您可以直接查看。" ElseIf (""=postbuyinfo(3) Or InStr(","&postbuyinfo(3)&",", ","&Dvbbs.MemberName&",")>0) And Dvbbs.userid>0 Then TPL_Echo "您需要购买方可看到内容。
" TPL_Echo "
" Exit Sub Else TPL_Echo "您需要购买方可看到内容。" If Dvbbs.userid>0 Then TPL_Echo "楼主设置了您不可以购买。" Else TPL_Echo "您还未登录,不能购买。" End If TPL_Echo "
" Exit Sub End If End If TPL_Echo "
" End If End If Ubblists=G_ItemList(15, G_Floor) '增加允许管理员发iframe功能 by 牛头 if Dvbbs.userID<>0 then If dvbbs.checknumeric(G_ItemList(10, G_Floor))>0 Then Dv_ubb.ismanager1= G_UserList(26, G_ItemList(10, G_Floor)-1) End If If InStr(Ubblists,",39,") > 0 Then TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,0) ) Else TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,1) ) End If Case "bodystyle" TPL_Echo ("font-size:"&Dvbbs.Board_setting(28)&"pt;text-indent:"&Dvbbs.Board_setting(69)&"px;") Case "floor" i = G_Moved+G_Floor TPL_Echo i+1 Case "dateandtime" TPL_Echo G_ItemList(3, G_Floor) Case "authorid" If authorid = 0 Then TPL_Echo "[只看该作者]" Else TPL_Echo "[显示全部帖子]" End If Case "showpage" TPL_ShowPage G_CurrentPage, G_Childs, Dvbbs.CheckNumeric(Dvbbs.Board_Setting(27)), 10, "dispbbs.html?boardid="&Dvbbs.BoardID&"&id="&AnnounceID&"&authorid="&authorid&"&page="&Dvbbs.CheckNumeric(request("page"))&"&star=" Case "bestinfo" If 1=G_ItemList(9, G_Floor) Then TPL_Echo "
[本帖被加为精华]
" End If Case "bestpic" If 1=G_ItemList(9, G_Floor) Then TPL_Echo "" End If Case "appraise" If IsNull(G_ItemList(12, G_Floor)) Then Exit Sub SplitIsAgree a = G_ItemList(12, G_Floor) If a(1)>0 Then TPL_Echo "
版主评定:好评,获得"&a(1)&"个金币奖励
" If ""<>a(3) Then TPL_Echo "(" & a(3) & ")" ElseIf a(0)>0 Then TPL_Echo "
版主评定:差评,扣除"&a(0)&"个金币
" If ""<>a(2) Then TPL_Echo "(" & a(2) & ")" End If Case "moneytype" 'modifty by reoaiq at 090922 i = T_GetMoneyType If 0=i Then Exit Sub If 0=G_Floor And G_CurrentPage=1 Then Select Case i Case 1 If Dvbbs.BoardMaster Then TPL_Echo "
悬赏金币帖,要悬赏 " & G_ItemList(17, G_Floor) & " 个金币
" TPL_Echo "
取消金币帖
" Else TPL_Echo "
悬赏金币帖,要悬赏 " & G_ItemList(17, G_Floor) & " 个金币
" End If Case 5 If Dvbbs.BoardMaster Then TPL_Echo "
悬赏金币帖,要悬赏 " & G_ItemList(17, G_Floor) & " 个金币[已结帖]
" TPL_Echo "
取消金币帖
" Else TPL_Echo "
悬赏金币帖,要悬赏 " & G_ItemList(17, G_Floor) & " 个金币[已结帖]
" End If Case 2 If Dvbbs.BoardMaster Then TPL_Echo "
获赠金币帖,共获得 " & G_ItemList(17, G_Floor) & " 个金币
" TPL_Echo "
取消金币帖
" Else TPL_Echo "
获赠金币帖,共获得 " & G_ItemList(17, G_Floor) & " 个金币
" End If Case 3 If Dvbbs.BoardMaster Then TPL_Echo "
取消金币帖
" End If Case Else End Select Else If (1=i Or 5=i) And G_ItemList(10, G_Floor)>0 Then If G_UserList(0, G_ItemList(10, G_Floor)-1)<>PostUserid Then TPL_Echo "
获得" & G_ItemList(17, G_Floor) & "个金币
" End If End If If 1=i And PostUserid=Dvbbs.UserID And G_ItemList(10, G_Floor)>0 Then If G_UserList(0, G_ItemList(10, G_Floor)-1)<>Dvbbs.UserID Then TPL_Echo "
悬赏金币
" End If End If If 2=i Then TPL_Echo "赠送楼主:" & G_ItemList(17, G_Floor) & "个金币" End If Case "usetools" If ""<>G_ItemList(18, G_Floor) Or (0" End If Case "topicface" TPL_Echo G_ItemList(5, G_Floor) Case "ip" If "1"=Dvbbs.GroupSetting(30) And (TrueMaster Or 3<>Dvbbs.UserGroupID) Then TPL_Echo "   Post IP:"&G_ItemList(6, G_Floor)&"" Case "magicface" If 0=G_Floor And G_CurrentPage=1 And Skin=0 Then i=InStr(G_Expression,"|") If i>0 Then a=Left(G_Expression, i-1) If "0"<>a Then TPL_Echo "


" End If End If End If Case "adminlist" i=GetPostUserID() TPL_Echo "单帖管理" TPL_Echo "
" TPL_Echo " 举报帖子
" If Dvbbs.Boardmaster Then If G_Floor>0 Or G_CurrentPage>1 Then TPL_Echo " 删除单帖
" End If TPL_Echo " 复制帖子
" If 0=G_ItemList(9,G_Floor) Then TPL_Echo "加为精华
" Else TPL_Echo "解除精华
" End If Select Case G_ItemList(16,G_Floor) Case 2 TPL_Echo "解除屏蔽
" Case 3 TPL_Echo "审核通过
" Case Else TPL_Echo "单帖屏蔽
" End Select TPL_Echo " 版主评定
" Else If ((G_Floor>0 Or G_CurrentPage>1) And IsSelfPost() And "1"=Dvbbs.GroupSetting(11)) Then TPL_Echo " 删除单帖
" End If End If If "1"=Dvbbs.Forum_Setting(90) Then TPL_Echo " 使用道具
" TPL_Echo "
" Case Else End Select End Sub Sub SplitIsAgree() Dim a : a = G_ItemList(12, G_Floor) If Not IsArray(a) Then a = Split(G_ItemList(12, G_Floor), "|") If UBound(a)<6 Then If UBound(a)<1 Then a = Split("0|0|||0|0|0","|") Else a = Split(G_ItemList(12, G_Floor)&"|||0|0|0","|") End If End If G_ItemList(12, G_Floor) = a End If End Sub Function Topic_Ads(n) Randomize Topic_Ads=Dvbbs.Forum_ads(n)(CInt(UBound(Dvbbs.Forum_ads(n))*Rnd)) End Function Sub ParseADNode(sToken) If 0=G_Floor And UBound(Dvbbs.Forum_ads)>23 Then Select Case sToken Case "first_body_top" If "1"=Dvbbs.Forum_ads(18) Then Dvbbs.Forum_ads(19)=Split(Dvbbs.Forum_ads(19), "#####") TPL_Echo "
"&Topic_Ads(19)&"
" End If Case "first_body_bottom" If "1"=Dvbbs.Forum_ads(20) Then Dvbbs.Forum_ads(21)=Split(Dvbbs.Forum_ads(21), "#####") TPL_Echo "
"&Topic_Ads(21)&"
" End If Case "first_body_left" If "1"=Dvbbs.Forum_ads(22) Then Dvbbs.Forum_ads(23)=Split(Dvbbs.Forum_ads(23), "#####") TPL_Echo "
"&Topic_Ads(23)&"
" End If Case "first_body_right" If "2"=Dvbbs.Forum_ads(22) Then Dvbbs.Forum_ads(23)=Split(Dvbbs.Forum_ads(23), "#####") TPL_Echo "
"&Topic_Ads(23)&"
" End If Case Else End Select End If Select Case sToken Case "bbslist_bottom" If "1"=Dvbbs.Forum_ads(7) Then TPL_Echo Topic_Ads(14) Case Else End Select End Sub Sub TPL_ParseNode(sTokenType, sTokenName) Select Case sTokenType Case "page" ParsePageNode sTokenName Case "user" ParseUserNode sTokenName Case "bbslist" ParseBBSListNode sTokenName Case "ad" ParseADNode sTokenName Case "qcomic_plus" DIM Qcomic_setting, codeStr Qcomic_setting = Split(Dvbbs.qcomic_plus_setting(), "||||") codeStr = "phid="&Trim(G_ItemList(21, G_Floor))&"&spassword="&Qcomic_setting(2)&"&ctime="&Now() Select Case sTokenName Case "qcomic_enable" : TPL_Echo "true" Case "qcomic_sid" : TPL_Echo Qcomic_setting(1) Case "qcomic_sid_phid" : TPL_Echo Qcomic_setting(1)&"_"&Trim(G_ItemList(21, G_Floor)) Case "qcomic_auto" : TPL_Echo "0" Case "qcomic_code" : TPL_Echo Server.UrlEncode(AuthCode(codeStr, "ENCODE",Qcomic_setting(3))) Case "qcomic_owidth" : TPL_Echo Qcomic_setting(4) Case "qcomic_oheight" : TPL_Echo Qcomic_setting(5) End Select End Select End Sub Sub TPL_ParseArea(sTokenName, sTemplate) Dim iUbd,sTemp Select Case sTokenName Case "bbslist" iUbd = UBound(G_ItemList, 2) If "1"=Dvbbs.Forum_ads(7) Then Dvbbs.Forum_ads(14)=Split(Dvbbs.Forum_ads(14),"#####") For G_Floor=0 To iUbd '下面几个赋值用在dv_ubbcode.html RootID_a = G_ItemList(7, G_Floor) AnnounceID_a= RootID_a ReplyID_a = G_ItemList(0, G_Floor) UserName = G_ItemList(1, G_Floor) PostBuyUser = G_ItemList(19, G_Floor) TPL_Scan sTemplate Next Case "userinfo" If G_ItemList(10, G_Floor)>0 Then If 2<>G_ItemList(8, G_Floor) Or Dvbbs.BoardMaster Or _ Dvbbs.UserID=G_UserList(0, G_ItemList(10, G_Floor)-1) Then TPL_Scan sTemplate End If Case "boke" If 1=Dvbbs.Forum_setting(99) Then TPL_Scan sTemplate Case "bbslimit" sTemp="" If 1=G_ItemList(9, G_Floor) Then If "1"<>Dvbbs.GroupSetting(41) Then sTemp="
您无权查看精华帖子
" Else Select Case G_ItemList(16, G_Floor) Case 2 sTemp="
内容被屏蔽
" Case 3 sTemp="
内容待审核
" Case Else If G_ItemList(10, G_Floor)>0 Then Select Case G_UserList(13, G_ItemList(10, G_Floor)-1) Case 1 sTemp="
用户已被锁定
" Case 2 sTemp="
用户已经被屏蔽
" Case Else End Select End If End Select End If If ""<>sTemp Then TPL_Echo sTemp End If If ""=sTemp Or TrueMaster Or (Dvbbs.Boardmaster And 3<>Dvbbs.UserGroupID) Then TPL_Scan sTemplate End If Case "qcomic_plus" If Dvbbs.qcomic_plus Then If Trim(G_ItemList(21, G_Floor))<>"" And Trim(G_ItemList(21, G_Floor))<>"0" Then TPL_Scan sTemplate End If End If Case "logined" If Dvbbs.userid>0 Then TPL_Scan sTemplate Case "showvote" If G_IsVote>0 And 1=G_CurrentPage Then LoadAndParseVote sTemplate Case "canreply" If G_CanReply Then TPL_Scan sTemplate Case "canedit" If (IsSelfPost() And Dvbbs.GroupSetting(10)="1") Or Dvbbs.boardmaster Then TPL_Scan sTemplate Case "tenpay" If Dvbbs.Board_Setting(67)=1 Then TPL_Scan sTemplate End Select End Sub Dvbbs.Footer Dvbbs.PageEnd %>