<% dim plus set plus = new cls_plus plus.open("comment") plus.state plus.newtpl("plus_comment.html") ' ÆÀÂÛÏÔʾ Dim ID Dim Page ID = Request("id") Page = Request("p") If Len(ID) = 0 Or Not IsNumeric(ID) Then Response.WRite Plus.Lang("iderr") : Set plus = Nothing : Response.End If Len(Page) = 0 Or Not IsNumeric(Page) Then Page = 1 If Page < 1 Then Page = 1 else Page = int(Page) If Len(Session("Comment_User")) < 1 Then Session("Comment_User") = "Guest" Dim Ns Set Ns = DB("Select [ID],[Cid],[Title],[Diyname],[Createtime],[comments],[Viewpath] From [{pre}Content] Where [ID]=" & ID,1) If Ns.Eof Then Ns.CLose Conn.CLose Response.Write Plus.Lang("nocontent") Set Conn = Nothing Set Plus = Nothing Response.End End If Dim Url Url = BuildViewPath(Ns("ID"),Ns("Cid"),Ns("Diyname"),Ns("Createtime"),Ns("Viewpath")) Dim Rs Set Rs = DB("select [User],[IP],[Time],[Content],[ReComment] From [{pre}Comment] Where [Aid]=" & ID & " And [State]=1 Order by [ID] desc",2) Dim Comment,CommentPageList Dim Poster,Repost,UserIP Poster = Plus.Lang("js-poster") Repost = Plus.Lang("js-repost") If Not Rs.Eof Then Rs.Pagesize = Plus.Config("pagesize") Rs.absolutePage = Page Dim i For i = 1 to Rs.Pagesize If Rs.eof Then Exit For UserIP = Split(Rs(1),".") Comment = Comment & "
" & Vbcrlf if ubound(userip)>=2 then Comment = Comment & "
" & Rs(0) & "(" & UserIP(0) & "." & UserIP(1) & "." & UserIP(2) & ".*) " & Poster & "" & Rs(2) & "
" & VbCrlf else Comment = Comment & "
" & Rs(0) & " " & Poster & "" & Rs(2) & "
" & VbCrlf end if Comment = Comment & "
" & Replace(Replace(Rs(3),Vbcrlf,""),"""","\""") & "
" & VbCrlf If Len(Rs(4))>0 Then Comment = Comment & Repost & "" & Replace(Replace(Rs(4),Vbcrlf,""),"""","\""") & "" & VbCrlf End If Comment = Comment & "
" & VbCrlf Comment = Comment & "
" & VbCrlf Rs.MoveNext Next For i = 1 to Rs.Pagecount If Page = i Then CommentPageList = CommentPageList & "" & i & "" Else CommentPageList = CommentPageList & "" & i & "" End If Next End If call plus.settpl("{id}",ID) call plus.settpl("{url}",Url) call plus.settpl("{title}",Ns(2)) call plus.settpl("{comments}",Ns(5)) call plus.settpl("{pagelist}",CommentPageList) call plus.settpl("{contentmax}",Plus.Config("contentmax")) call plus.settpl("{comment}",Comment) Response.Write plus.gettpl Ns.CLose Rs.Close Conn.CLose Set Conn = Nothing Set Plus = Nothing %>