📄 powereasy.guestbook.asp
字号:
TransformTime = dayshow
Exit Function
ElseIf dnt = 0 Then
dayshow = XmlText("Guest", "TransformTime/d1", "今天 ")
ElseIf dnt = 1 Then
dayshow = XmlText("Guest", "TransformTime/d2", "昨天 ")
ElseIf dnt = 2 Then
dayshow = XmlText("Guest", "TransformTime/d3", "前天 ")
End If
TransformTime = dayshow & pshow & thour & ":" & tminute
End Function
'=================================================
'函数名:TransformIP()
'作 用:格式化IP
'参 数:IP
'=================================================
Private Function TransformIP(GuestIP)
Dim arrIp
arrIp = Split(GuestIP, ".")
If UBound(arrIp) > 0 Then
TransformIP = arrIp(0) & "." & arrIp(1) & ".*"
Else
TransformIP = "*"
End If
End Function
'=================================================
'函数名:ShowTip()
'作 用:鼠标经过显示提示
'参 数:无
'=================================================
Private Function ShowTip()
Dim strTip
strTip = "<div id=toolTipLayer style='position: absolute; visibility: hidden'></div>" & vbCrLf
strTip = strTip & "<SCRIPT language=JavaScript>" & vbCrLf
strTip = strTip & "var ns4 = document.layers;" & vbCrLf
strTip = strTip & "var ns6 = document.getElementById && !document.all;" & vbCrLf
strTip = strTip & "var ie4 = document.all;" & vbCrLf
strTip = strTip & "offsetX = 0;" & vbCrLf
strTip = strTip & "offsetY = 20;" & vbCrLf
strTip = strTip & "var toolTipSTYLE='';" & vbCrLf
strTip = strTip & "function initToolTips()" & vbCrLf
strTip = strTip & "{" & vbCrLf
strTip = strTip & " if(ns4||ns6||ie4)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " if(ns4) toolTipSTYLE = document.toolTipLayer;" & vbCrLf
strTip = strTip & " else if(ns6) toolTipSTYLE = document.getElementById('toolTipLayer').style;" & vbCrLf
strTip = strTip & " else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;" & vbCrLf
strTip = strTip & " if(ns4) document.captureEvents(Event.MOUSEMOVE);" & vbCrLf
strTip = strTip & " else" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " toolTipSTYLE.visibility = 'visible';" & vbCrLf
strTip = strTip & " toolTipSTYLE.display = 'none';" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " document.onmousemove = moveToMouseLoc;" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & "}" & vbCrLf
strTip = strTip & "function toolTip(msg, fg, bg)" & vbCrLf
strTip = strTip & "{" & vbCrLf
strTip = strTip & " if(toolTip.arguments.length < 1)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " if(ns4) toolTipSTYLE.visibility = 'hidden';" & vbCrLf
strTip = strTip & " else toolTipSTYLE.display = 'none';" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " else" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " if(!fg) fg = '#333333';" & vbCrLf
strTip = strTip & " if(!bg) bg = '#FFFFFF';" & vbCrLf
strTip = strTip & " var content = '<table border=""0"" cellspacing=""0"" cellpadding=""1"" bgcolor=""' + fg + '""><td>' + '<table border=""0"" cellspacing=""0"" cellpadding=""1"" bgcolor=""' + bg + '""><td align=""left"" nowrap style=""line-height: 120%""><font color=""' + fg + '"">' + msg + ' \;</font></td></table></td></table>';" & vbCrLf
strTip = strTip & " if(ns4)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " toolTipSTYLE.document.write(content);" & vbCrLf
strTip = strTip & " toolTipSTYLE.document.close();" & vbCrLf
strTip = strTip & " toolTipSTYLE.visibility = 'visible';" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " if(ns6)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " document.getElementById('toolTipLayer').innerHTML = content;" & vbCrLf
strTip = strTip & " toolTipSTYLE.display='block'" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " if(ie4)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " document.all('toolTipLayer').innerHTML=content;" & vbCrLf
strTip = strTip & " toolTipSTYLE.display='block'" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & "}" & vbCrLf
strTip = strTip & "function moveToMouseLoc(e)" & vbCrLf
strTip = strTip & "{" & vbCrLf
strTip = strTip & " if(ns4||ns6)" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " x = e.pageX;" & vbCrLf
strTip = strTip & " y = e.pageY;" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " else" & vbCrLf
strTip = strTip & " {" & vbCrLf
strTip = strTip & " x = event.x + document.body.scrollLeft;" & vbCrLf
strTip = strTip & " y = event.y + document.body.scrollTop;" & vbCrLf
strTip = strTip & " }" & vbCrLf
strTip = strTip & " toolTipSTYLE.left = x + offsetX;" & vbCrLf
strTip = strTip & " toolTipSTYLE.top = y + offsetY;" & vbCrLf
strTip = strTip & " return true;" & vbCrLf
strTip = strTip & "}" & vbCrLf
strTip = strTip & "initToolTips();" & vbCrLf
strTip = strTip & "</SCRIPT>" & vbCrLf
ShowTip = strTip
End Function
'=================================================
'函数名:GetRepeatGuestBook()
'作 用:留言本方式时替换要循环的标签
'参 数:要替换的值
'=================================================
Private Function GetRepeatGuestBook(strParameter, strList)
Dim strTemp, arrTemp
Dim strSoftPic, strPicTemp, arrPicTemp
If strParameter = "" Then
GetRepeatGuestBook = ""
Exit Function
End If
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
Call ShowAllGuest(1)
Else
Call ShowAllGuest(2)
End If
End Select
ElseIf arrTemp = 1 Then
Call ShowAllGuest(5)
ElseIf arrTemp = 2 Then
Call ShowAllGuest(6)
ElseIf arrTemp = 3 Then
If UserLogined = True Then
ShowAllGuest (1)
Else
ShowAllGuest (2)
End If
End If
If FoundErr = True Then
GetRepeatGuestBook = Guest_info(ErrMsg)
Exit Function
End If
Dim UserGuestName, UserType, UserSex, UserEmail, UserHomepage, UserOicq, UserIcq, UserMsn
Dim GuestNum, GuestTip, TipName, TipSex, TipEmail, TipOicq, TipHomepage
Dim GtbDel, GtbNoEnter, GtbMan, GtbGirl, GtbTip1, GtbTip2, Gtbp1, Gtbp2, Gtbp3, Gtbp4, Gtbp5, Gtbp6, GtbGuestImages, GtbUser, GtbGuest
Dim GtbHide1, GtbHide2, GtbHide3, GtbReply4, GtbReply5, GtbReply6, GtbReply7, GtbReply8, GtbReply9, GtbReply10, GtbReply11
GtbDel = XmlText("Guest", "GuestBookShow/Del", "(已删除)")
GtbNoEnter = XmlText("BaseText", "NoEnter", "未填")
GtbMan = XmlText("BaseText", "Man", "男")
GtbGirl = XmlText("BaseText", "Girl", "女")
GtbTip1 = XmlText("Guest", "GuestBookShow/Tip1", " 姓名:{$Name} {$Sex}<br> 主页:{$Homepage}<br> OICQ:{$Oicq}<br> 信箱:{$Email}<br> 地址:{$GuestIP}<br> 时间:{$Time}")
GtbTip2 = XmlText("Guest", "GuestBookShow/Tip2", "用户相关资料保密。")
Gtbp1 = XmlText("Guest", "GuestBookShow/p1", "固顶留言")
Gtbp2 = XmlText("Guest", "GuestBookShow/p2", "精华留言")
Gtbp3 = XmlText("Guest", "GuestBookShow/p3", "有回复")
Gtbp4 = XmlText("Guest", "GuestBookShow/p4", "无回复")
Gtbp5 = XmlText("Guest", "GuestBookShow/p5", "回复:")
Gtbp6 = XmlText("Guest", "GuestBookShow/p6", "主题:")
GtbGuestImages = XmlText("Guest", "GuestBookShow/GuestImages", "<img src='{$GuestImages}.gif' width='80' height='90' onMouseOut=toolTip() onMouseOver=""toolTip('{$GuestTip}')"">")
GtbUser = XmlText("Guest", "GuestBookShow/User", "用户")
GtbGuest = XmlText("Guest", "GuestBookShow/Guest", "游客")
GtbHide1 = XmlText("Guest", "GuestBookShow/Hide1", " **************************************<br> * 隐藏留言,管理员和留言用户可以看到 *<br> **************************************")
GtbHide2 = XmlText("Guest", "GuestBookShow/Hide2", "[隐藏]")
GtbHide3 = XmlText("Guest", "GuestBookShow/Hide3", " *********************************************<br> * 隐藏管理员回复,管理员和留言用户可以看到 *<br> *********************************************")
GtbReply4 = XmlText("Guest", "GuestBookShow/Reply4", "回复这条留言")
GtbReply5 = XmlText("Guest", "GuestBookShow/Reply5", "编辑这条留言")
GtbReply6 = XmlText("Guest", "GuestBookShow/Reply6", "确定要删除此留言吗?")
GtbReply7 = XmlText("Guest", "GuestBookShow/Reply7", "删除这条留言")
GtbReply8 = XmlText("Guest", "GuestBookShow/Reply8", "查看全部回复")
GtbReply9 = XmlText("Guest", "GuestBookShow/Reply9", "共有回复{$ReplyNum}条")
GtbReply10 = XmlText("Guest", "GuestBookShow/Reply10", "回复这条留言")
GtbReply11 = XmlText("Guest", "GuestBookShow/Reply11", "返回列表")
GuestNum = 0
Do While Not rsGuest.EOF
UserGuestName = rsGuest("GuestName")
UserSex = rsGuest("GuestSex")
UserEmail = rsGuest("GuestEmail")
UserOicq = rsGuest("GuestOicq")
UserIcq = rsGuest("GuestIcq")
UserMsn = rsGuest("GuestMsn")
UserHomepage = rsGuest("GuestHomepage")
TipName = UserGuestName
If UserEmail = "" Or IsNull(UserEmail) Then
TipEmail = GtbNoEnter
Else
TipEmail = UserEmail
End If
If UserOicq = "" Or IsNull(UserOicq) Then
TipOicq = GtbNoEnter
Else
TipOicq = UserOicq
End If
If UserHomepage = "" Or IsNull(UserHomepage) Then
TipHomepage = GtbNoEnter
Else
TipHomepage = UserHomepage
End If
If UserIcq = "" Or IsNull(UserIcq) Then UserIcq = GtbNoEnter
If UserMsn = "" Or IsNull(UserMsn) Then UserMsn = GtbNoEnter
If UserSex = "1" Then
TipSex = "(" & GtbMan & ")"
ElseIf UserSex = "0" Then
TipSex = "(" & GtbGirl & ")"
Else
TipSex = ""
End If
If GuestBook_ShowIP = True Then
GuestTip = Replace(Replace(Replace(Replace(Replace(Replace(Replace(GtbTip1, "{$Name}", TipName), "{$Sex}", TipSex), "{$Homepage}", TipHomepage), "{$Oicq}", TipOicq), "{$Email}", TipEmail), "{$GuestIP}", rsGuest("GuestIP")), "{$Time}", rsGuest("GuestDatetime"))
Else
GuestTip = Replace(Replace(Replace(Replace(Replace(Replace(Replace(GtbTip1, "{$Name}", TipName), "{$Sex}", TipSex), "{$Homepage}", TipHomepage), "{$Oicq}", TipOicq), "{$Email}", TipEmail), "{$GuestIP}", TransformIP(rsGuest("GuestIP"))), "{$Time}", rsGuest("GuestDatetime"))
End If
strTemp = strList
If rsGuest("OnTop") = 1 Then
strTemp = Replace(strTemp, "{$IsTitlePic}", "<img border='0' src='" & GImagePath & "ontop.gif' title=" & Gtbp1 & ">")
ElseIf rsGuest("Quintessence") = 1 Then
strTemp = Replace(strTemp, "{$IsTitlePic}", "<img border='0' src='" & GImagePath & "pith.gif' title=" & Gtbp2 & ">")
ElseIf rsGuest("ReplyNum") > 0 Then
strTemp = Replace(strTemp, "{$IsTitlePic}", "<img border='0' src='" & GImagePath & "yes.gif' title=" & Gtbp3 & ">")
Else
strTemp = Replace(strTemp, "{$IsTitlePic}", "<img border='0' src='" & GImagePath & "no.gif' title=" & Gtbp4 & ">")
End If
If ReplyId = "" Then
If strField <> "" And rsGuest("GuestID") <> rsGuest("TopicID") Then
strTemp = Replace(strTemp, "{$GuestType}", Gtbp5)
strTemp = Replace(strTemp, "{$GuestTitle}", "<a class='Guest' href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & ">" & KeywordReplace(rsGuest("GuestTitle")) & "</a>")
Else
If Action = "edit" And rsGuest("GuestID") <> rsGuest("TopicID") Then
strTemp = Replace(strTemp, "{$GuestType}", Gtbp5)
strTemp = Replace(strTemp, "{$GuestTitle}", "<a class='Guest' href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & ">" & KeywordReplace(rsGuest("GuestTitle")) & "</a>")
Else
strTemp = Replace(strTemp, "{$GuestType}", Gtbp6)
strTemp = Replace(strTemp, "{$GuestTitle}", "<a class='Guest' href=Guest_Reply.asp?TopicID=" & rsGuest("TopicID") & ">" & KeywordReplace(rsGuest("GuestTitle")) & "</a>")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -