⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 powereasy.guestbook.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
                End If
            End If
        Else
            If rsGuest("GuestID") = rsGuest("TopicID") Then
                strTemp = Replace(strTemp, "{$GuestType}", Gtbp6)
                strTemp = Replace(strTemp, "{$GuestTitle}", "<a class='Guest' href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & ">" & KeywordReplace(rsGuest("GuestTitle")) & "</a>")
            Else
                strTemp = Replace(strTemp, "{$GuestType}", Gtbp5)
                strTemp = Replace(strTemp, "{$GuestTitle}", "<a class='Guest' href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & ">" & KeywordReplace(rsGuest("GuestTitle")) & "</a>")
            End If
        End If

    
        strTemp = Replace(strTemp, "{$GuestTime}", rsGuest("GuestDatetime"))

        strTemp = Replace(strTemp, "{$GuestHead}", Replace(Replace(GtbGuestImages, "{$GuestImages}", GFacePath & rsGuest("GuestImages")), "{$GuestTip}", GuestTip))
        'strTemp = Replace(strTemp, "{$GuestHead}", "                        <img src='" & GFacePath & rsGuest("GuestImages") & ".gif' width='80' height='90' onMouseOut=toolTip() onMouseOver=""toolTip('" & GuestTip & "')"">")
        If rsGuest("GuestType") = 1 Then
            strTemp = Replace(strTemp, "{$GuestNameType}", GtbUser)
        Else
            strTemp = Replace(strTemp, "{$GuestNameType}", GtbGuest)
        End If
        strTemp = Replace(strTemp, "{$GuestName}", KeywordReplace(UserGuestName))

        strTemp = Replace(strTemp, "{$GuestFaceShow}", "<img src='" & GImagePath & "face" & rsGuest("GuestFace") & ".gif' width='19' height='19'>")
        
        Dim ContentShow, AdminReplyShow, LastReplyShow
        '替换留言内容
        regEx.Pattern = "【ContentShow】([\s\S]*?)【\/ContentShow】"
        Set Matches = regEx.Execute(strTemp)
        For Each Match In Matches
            ContentShow = Match.value
        Next
        If rsGuest("GuestIsPrivate") = True And rsGuest("GuestName") <> UserName And rsGuest("ReplyIsPrivate") = True Then
            strTemp = Replace(strTemp, ContentShow, "<br><br><font class=Guest_font>" & GtbHide1 & "</font>")
        End If
        strTemp = Replace(strTemp, "【ContentShow】", "")
        strTemp = Replace(strTemp, "【/ContentShow】", "")

        If rsGuest("GuestIsPrivate") = True And rsGuest("GuestName") <> UserName Then
            strTemp = Replace(strTemp, "{$IsHiddenShow}", "                        <font class=Guest_font>" & GtbHide2 & "</font>&nbsp;")
            strTemp = Replace(strTemp, "{$GuestContentShow}", "")
        Else
            strTemp = Replace(strTemp, "{$IsHiddenShow}", "")
        End If
        strTemp = Replace(strTemp, "{$GuestContentShow}", KeywordReplace(FilterJS(rsGuest("GuestContent"))))
        
   
        '替换用户最后回复
        regEx.Pattern = "【LastReplyShow】([\s\S]*?)【\/LastReplyShow】"
        Set Matches = regEx.Execute(strTemp)
        For Each Match In Matches
            LastReplyShow = Match.value
        Next

        If rsGuest("LastReplyGuest") = "" Or IsNull(rsGuest("LastReplyGuest")) Or ReplyId <> "" Then
            strTemp = Replace(strTemp, LastReplyShow, "")
        End If

        strTemp = Replace(strTemp, "【LastReplyShow】", "")
        strTemp = Replace(strTemp, "【/LastReplyShow】", "")
        strTemp = Replace(strTemp, "{$LastReplyContent}", KeywordReplace(rsGuest("LastReplyContent")))
        strTemp = Replace(strTemp, "{$LastReplyGuest}", KeywordReplace(rsGuest("LastReplyGuest")))
        strTemp = Replace(strTemp, "{$LastReplyTitle}", KeywordReplace(rsGuest("LastReplyTitle")))
        strTemp = Replace(strTemp, "{$LastReplyTime}", KeywordReplace(rsGuest("LastReplyTime")))
        '替换用户最后回复完毕
        
        '替换管理员回复

        regEx.Pattern = "【AdminReplyShow】([\s\S]*?)【\/AdminReplyShow】"
        Set Matches = regEx.Execute(strTemp)
        For Each Match In Matches
            AdminReplyShow = Match.value
        Next
        
        If rsGuest("GuestReply") = "" Or IsNull(rsGuest("GuestReply")) Then
            strTemp = Replace(strTemp, AdminReplyShow, "")
        ElseIf rsGuest("ReplyIsPrivate") = True And rsGuest("GuestName") <> UserName Then
            strTemp = Replace(strTemp, AdminReplyShow, "<font class=Guest_font>" & GtbHide3 & "</font>")
        Else
                        strTemp = Replace(strTemp, "【AdminReplyShow】", "")
                        strTemp = Replace(strTemp, "【/AdminReplyShow】", "")
                        strTemp = Replace(strTemp, "{$ReplyAdmin}", KeywordReplace(rsGuest("GuestReplyAdmin")))
                        strTemp = Replace(strTemp, "{$AdminReplyTime}", KeywordReplace(rsGuest("GuestReplyDatetime")))
                        strTemp = Replace(strTemp, "{$AdminReplyContent}", KeywordReplace(rsGuest("GuestReply")))
        End If
        '替换管理员回复完毕
        
        '替换留言内容完毕


        If UserHomepage = "" Or IsNull(UserHomepage) Then
            strTemp = Replace(strTemp, "{$HomePagePic}", "<img src=" & GImagePath & "nourl.gif width=45 height=16 border=0>")
        Else
            strTemp = Replace(strTemp, "{$HomePagePic}", "<a href=" & UserHomepage & " target=""_blank""><img src=" & GImagePath & "url.gif width=45 height=16 alt=" & UserHomepage & " border=0></a>")
        End If
        If UserOicq = "" Or IsNull(UserOicq) Then
            strTemp = Replace(strTemp, "{$OicqPic}", "<img src=" & GImagePath & "nooicq.gif width=45 height=16 border=0>")
        Else
            strTemp = Replace(strTemp, "{$OicqPic}", "<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=" & UserOicq & " target='_blank'><img src=" & GImagePath & "oicq.gif width=45 height=16 alt=" & UserOicq & " border=0 ></a>")
        End If
        If UserEmail = "" Or IsNull(UserEmail) Then
            strTemp = Replace(strTemp, "{$EmailPic}", "<img src=" & GImagePath & "noemail.gif width=45 height=16 border=0>")
        Else
            strTemp = Replace(strTemp, "{$EmailPic}", "<a href=mailto:" & UserEmail & "><img src=" & GImagePath & "email.gif width=45 height=16 border=0 alt=" & UserEmail & "></a>")
        End If
        If GuestBook_ShowIP = True Then
            strTemp = Replace(strTemp, "{$OtherPic}", "<img src=" & GImagePath & "other.gif width=45 height=16 border=0 onMouseOut=toolTip() onMouseOver=""toolTip('&nbsp;Icq:" & UserIcq & "<br>&nbsp;Msn:" & UserMsn & "<br>&nbsp;I P:" & rsGuest("GuestIP") & "')"">")
        Else
            strTemp = Replace(strTemp, "{$OtherPic}", "<img src=" & GImagePath & "other.gif width=45 height=16 border=0 onMouseOut=toolTip() onMouseOver=""toolTip('&nbsp;Icq:" & UserIcq & "<br>&nbsp;Msn:" & UserMsn & "<br>&nbsp;I P:" & TransformIP(rsGuest("GuestIP")) & "')"">")
        End If
        If rsGuest("GuestIsPassed") = False Then
             strTemp = Replace(strTemp, "{$ReplyPic}", "")
        End If
        If ReplyId = "" And rsGuest("GuestID") = rsGuest("TopicID") Then

            strTemp = Replace(strTemp, "{$ReplyPic}", "<a href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & "><img src=" & GImagePath & "reply.gif width=45 height=16 border=0 alt=" & GtbReply4 & "></a>")
        Else
            strTemp = Replace(strTemp, "{$ReplyPic}", "")
        End If
        
        If rsGuest("GuestName") = UserName And rsGuest("GuestIsPassed") = False Then

            strTemp = Replace(strTemp, "{$EditPic}", "<a href=Guest_Write.asp?action=edit&guestid=" & rsGuest("guestid") & "><img src=" & GImagePath & "edit.gif width=45 height=16 border=0 alt=" & GtbReply5 & "></a>")

            strTemp = Replace(strTemp, "{$DelPic}", "<a href=" & FileName & "?action=del&guestid=" & rsGuest("guestid") & " onClick=""return confirm('" & GtbReply6 & "');""><img src=" & GImagePath & "del.gif width=45 height=16  alt=" & GtbReply7 & " border=0></a></td>")
        Else
            strTemp = Replace(strTemp, "{$EditPic}", "")
            strTemp = Replace(strTemp, "{$DelPic}", "")
        End If

        If rsGuest("GuestIsPassed") = False Then
            strTemp = Replace(strTemp, "{$InfoShow}", "")
        ElseIf rsGuest("ReplyNum") > 0 Then
            If ReplyId = "" Then
                strTemp = Replace(strTemp, "{$InfoShow}", "<a href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & "><img src=" & GImagePath & "reply0.gif width=15 height=16 border=0>&nbsp;" & GtbReply8 & "</a>(共" & rsGuest("ReplyNum") & "条)")
            Else
                strTemp = Replace(strTemp, "{$InfoShow}", Replace(GtbReply9, "{$ReplyNum}", rsGuest("ReplyNum")))
            End If
        Else
            If ReplyId = "" Then
                If rsGuest("GuestID") = rsGuest("TopicID") Then
                    strTemp = Replace(strTemp, "{$InfoShow}", "<a href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & "><img src=" & GImagePath & "reply0.gif width=15 height=16 border=0>&nbsp;" & GtbReply10 & "</a>")
                Else
                    strTemp = Replace(strTemp, "{$InfoShow}", "")
                End If
            Else
                strTemp = Replace(strTemp, "{$InfoShow}", "<a href='" & FileName & "'><img src=" & GImagePath & "home.gif width=15 height=16 border=0>&nbsp;" & GtbReply11 & "</a>")
            End If
        End If

                testHTML = testHTML & strTemp

        rsGuest.MoveNext
        GuestNum = GuestNum + 1
        If GuestNum >= MaxPerPage Then Exit Do
        
    Loop

    testHTML = testHTML & ShowTip()
    
    rsGuest.Close
    Set rsGuest = Nothing
    
    GetRepeatGuestBook = testHTML
End Function
'=================================================
'函数名:GetRepeatDiscussion()
'作  用:讨论区方式时替换要循环的标签
'参  数:要替换的值
'=================================================
Private Function GetRepeatDiscussion(strParameter, strList)
    Dim strTemp, arrTemp, strBeg, strEnd, strSource
    Dim strSoftPic, strPicTemp, arrPicTemp

    If strParameter = "" Or IsNull(strParameter) Then
		GetRepeatDiscussion = ""
        Exit Function
    End If
	strSource = strList

    '替换讨论区方式列表头部
    regEx.Pattern = "【GuestList2_Beg】([\s\S]*?)【\/GuestList2_Beg】"
    Set Matches = regEx.Execute(strSource)
    For Each Match In Matches
        strBeg = Match.SubMatches(0)
        strSource = Replace(strSource, Match.value, "")
    Next

    '替换讨论区方式列表尾部
    regEx.Pattern = "【GuestList2_End】([\s\S]*?)【\/GuestList2_End】"
    Set Matches = regEx.Execute(strSource)
    For Each Match In Matches
        strEnd = Match.SubMatches(0)
        strSource = Replace(strSource, Match.value, "")
    Next
    
    arrTemp = PE_CLng(strParameter)
    
    If arrTemp = 0 Then
        Select Case Action
		Case "user"
			Call ShowAllGuest(3)
		Case "Quintessence"
			Call ShowAllGuest(4)
		Case Else
			If UserLogined = True Then
				ShowAllGuest (1)
			Else
				ShowAllGuest (2)
			End If
        End Select
    ElseIf arrTemp = 1 Then
        If UserLogined = True Then
            ShowAllGuest (1)
        Else
            ShowAllGuest (2)
        End If
    End If
    
    If FoundErr = True Then
        GetRepeatDiscussion = Guest_info(ErrMsg)
        Exit Function
    End If

    Dim strHTM, strXml
    strXml = Split(XmlText("Guest", "discussionShow/Text", "发言主题|||所有主题|||留言人|||回复|||阅读|||最后回复|||固顶留言|||精华留言|||展开主题回复的列表|||无回复|||点击查看记录具体信息"), "|||")

    Dim i, GtbUser, GtbGuest
    GtbUser = XmlText("Guest", "GuestBookShow/User", "用户")
    GtbGuest = XmlText("Guest", "GuestBookShow/Guest", "游客")
    i = 0
    Do While Not rsGuest.EOF
        strTemp = strSource
        If rsGuest("OnTop") = 1 Then
            strTemp = Replace(strTemp, "{$GuestFaceShow}", "<img border='0' src='" & GImagePath & "ontop.gif' title=" & strXml(6) & ">")
        ElseIf rsGuest("Quintessence") = 1 Then
            strTemp = Replace(strTemp, "{$GuestFaceShow}", "<img border='0' src='" & GImagePath & "pith.gif' title=" & strXml(7) & ">")
        Else
            strTemp = Replace(strTemp, "{$GuestFaceShow}", "  <img src='" & GImagePath & "face" & rsGuest("GuestFace") & ".gif' width='19' height='19'>")
        End If

        If rsGuest("ReplyNum") > 0 Then
            strTemp = Replace(strTemp, "{$IsTitlePic}", "<span id='FollowImg" & rsGuest("GuestID") & "'><a href='ListingTree.asp?TopicID=" & rsGuest("GuestID") & "&Action=show' target='hiddeniframe' title='" & strXml(8) & "'><img border='0' src='" & GImagePath & "yes.gif'></a></span>")
        Else
            strTemp = Replace(strTemp, "{$IsTitlePic}", "<img border='0' src='" & GImagePath & "no.gif' title=" & strXml(9) & ">")
        End If

        If rsGuest("GuestType") = 1 Then
            strTemp = Replace(strTemp, "{$GuestNameType}", GtbUser)
        Else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -