📄 powereasy.common.front.asp
字号:
<!--#include file="../Include/PowerEasy.Common.Content.asp"-->
<!--#include file="../Include/PowerEasy.XmlHttp.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Dim KindType, LinkType, ShowType, KindID
Dim iMod
Dim HtmlDir, strHtml, PageTitle, strNavPath, strPageTitle, strTemplate, arrTemplate
Dim PrevChannelID, strTempContent, strContentPageTitleArr
Dim strNavLink
Dim strYear, strMonth, strDay, strListStr_Font
Dim strGirl, strMan, Secrit, NoEnter
'从语言包中读取的相应变量
Dim strTop, strElite, strCommon, strNew, strHot
Dim strTop2, strElite2, strHot2
Dim Character_Author, Character_Date, Character_Hits, Character_Class
Dim SearchResult_Content_NoPurview, SearchResult_ContentLenth
Dim strList_Content_Div
Dim strList_Title, strComment
XmlDoc.Load (Server.MapPath(InstallDir & "Language/Gb2312.xml"))
strYear = XmlText("BaseText", "Year", "年")
strMonth = XmlText("BaseText", "Month", "月")
strDay = XmlText("BaseText", "Day", "日")
strNavLink = XmlText("BaseText", "NavLink", ">>")
strNavPath = XmlText("BaseText", "Nav", "您现在的位置:") & " <a class='LinkPath' href='" & SiteUrl & "'>" & SiteName & "</a>"
strGirl = XmlText("BaseText", "Girl", "女")
strMan = XmlText("BaseText", "Man", "男")
Secrit = XmlText("BaseText", "Secrit", "保密")
NoEnter = XmlText("BaseText", "NoEnter", "未填")
FileExt_SiteSpecial = arrFileExt(FileExt_SiteSpecial)
'=================================================
'函数名:UrlPrefix
'作 用:如果使用绝对路径,并且频道地址不包括域名,则链接地址前缀为域名
'参 数:iUrlType ---- 链接地址类型,0为相对路径,1为绝对路径
' strChannelUrl ---- 频道地址
'=================================================
Function UrlPrefix(iUrlType, strChannelUrl)
Dim strUrlPrefix
strUrlPrefix = ""
If iUrlType = 1 And Left(strChannelUrl, 1) = "/" Then
strUrlPrefix = "http://" & Trim(Request.ServerVariables("HTTP_HOST"))
End If
UrlPrefix = strUrlPrefix
End Function
Function GetInfoList_StrNoItem(arrClassID, iSpecialID, IsHot, IsElite, strHot, strElite)
Dim strNoItem, strThis
strThis = ""
If arrClassID <> "0" Then
strThis = "此栏目下"
End If
If iSpecialID > 0 Then
strThis = "此专题下"
End If
If IsHot = False And IsElite = False Then
strNoItem = "<li>" & strThis & "没有" & ChannelShortName & "</li>"
ElseIf IsHot = True And IsElite = False Then
strNoItem = "<li>" & strThis & "没有" & strHot & ChannelShortName & "</li>"
ElseIf IsHot = False And IsElite = True Then
strNoItem = "<li>" & strThis & "没有" & strElite & ChannelShortName & "</li>"
Else
strNoItem = "<li>" & strThis & "没有" & strHot & strElite & ChannelShortName & "</li>"
End If
GetInfoList_StrNoItem = strNoItem
End Function
Function GetInfoList_GetStrTitle(Title, TitleLen, TitleFontType, TitleFontColor)
Dim strTitle
If TitleLen > 0 Then
strTitle = ReplaceText(GetSubStr(Title, TitleLen, ShowSuspensionPoints), 2)
Else
strTitle = ReplaceText(Title, 2)
End If
Select Case TitleFontType
Case 1
strTitle = "<b>" & strTitle & "</b>"
Case 2
strTitle = "<em>" & strTitle & "</em>"
Case 3
strTitle = "<b><em>" & strTitle & "</em></b>"
End Select
If TitleFontColor <> "" Then
strTitle = "<font color=""" & TitleFontColor & """>" & strTitle & "</font>"
End If
GetInfoList_GetStrTitle = strTitle
End Function
Function GetInfoList_GetStrProperty(ShowPropertyType, OnTop, Elite, iNumber, strCommon, strTop, strElite)
Dim strProperty
Select Case ShowPropertyType
Case 0
strProperty = ""
Case 1
If OnTop = True Then
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_ontop.gif"" alt=""" & strTop & ChannelShortName & """>"
ElseIf Elite = True Then
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_elite.gif"" alt=""" & strElite & ChannelShortName & """>"
Else
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_common.gif"" alt=""" & strCommon & ChannelShortName & """>"
End If
Case 2
strProperty = "·"
Case 11
strProperty = iNumber
Case Else
If OnTop = True Then
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_ontop" & ShowPropertyType - 1 & ".gif"" alt=""" & strTop & ChannelShortName & """>"
ElseIf Elite = True Then
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_elite" & ShowPropertyType - 1 & ".gif"" alt=""" & strElite & ChannelShortName & """>"
Else
strProperty = "<img src=""" & ChannelUrl & "/images/" & ModuleName & "_common" & ShowPropertyType - 1 & ".gif"" alt=""" & strCommon & ChannelShortName & """>"
End If
End Select
GetInfoList_GetStrProperty = strProperty
End Function
Function GetInfoList_GetStrClassLink(Character_Class, Css_ListItem, ClassID_ListItem, ClassName_ListItem, ClassUrl_ListItem)
Dim strClassName
If ClassID_ListItem <> -1 Then
strClassName = Replace(Character_Class, "{$Text}", "<a class=""" & Css_ListItem & """ href=""" & ClassUrl_ListItem & """>" & ClassName_ListItem & "</a>")
Else
strClassName = ""
End If
GetInfoList_GetStrClassLink = strClassName
End Function
Function GetInfoList_GetStrInfoLink(strList_Title, ShowTips, OpenType, Css_ListItem, Title_ListItem, InfoUrl, LinkTips_ListItem, Author_ListItem, UpdateTime_ListItem)
Dim strInfoLink, strTemp
strInfoLink = "<a class=""" & Css_ListItem & """ href=""" & InfoUrl & """"
If ShowTips = True Then
strTemp = Replace(strList_Title, "{$Title}", LinkTips_ListItem)
strTemp = Replace(strTemp, "{$PhotoName}", LinkTips_ListItem)
strTemp = Replace(strTemp, "{$SoftName}", LinkTips_ListItem)
strTemp = Replace(strTemp, "{$Author}", Author_ListItem)
strTemp = Replace(strTemp, "{$UpdateTime}", UpdateTime_ListItem)
strTemp = Replace(strTemp, "{$br}", vbCrLf)
strInfoLink = strInfoLink & " title=""" & strTemp & """"
Else
strInfoLink = strInfoLink & " title=""" & LinkTips_ListItem & """"
End If
If OpenType = 0 Then
strInfoLink = strInfoLink & " target=""_self"">"
Else
strInfoLink = strInfoLink & " target=""_blank"">"
End If
strInfoLink = strInfoLink & Title_ListItem & "</a>"
GetInfoList_GetStrInfoLink = strInfoLink
End Function
Function GetInfoList_GetStrUpdateTime(UpdateTime, ShowDateType)
Dim strUpdateTime
If Not IsDate(UpdateTime) Then
GetInfoList_GetStrUpdateTime = ""
Exit Function
End If
Select Case ShowDateType
Case 1
strUpdateTime = Year(UpdateTime) & "-" & Right("0" & Month(UpdateTime), 2) & "-" & Right("0" & Day(UpdateTime), 2)
Case 2
strUpdateTime = Month(UpdateTime) & strMonth & Day(UpdateTime) & strDay
Case 3
strUpdateTime = Right("0" & Month(UpdateTime), 2) & "-" & Right("0" & Day(UpdateTime), 2)
Case 4
strUpdateTime = Year(UpdateTime) & strYear & Month(UpdateTime) & strMonth & Day(UpdateTime) & strDay
Case 5
strUpdateTime = UpdateTime
Case 6
strUpdateTime = UpdateTime
End Select
If DateDiff("D", UpdateTime, Now()) < DaysOfNew Then
strUpdateTime = "<font " & strListStr_Font & ">" & strUpdateTime & "</font>"
End If
GetInfoList_GetStrUpdateTime = strUpdateTime
End Function
Function GetInfoList_GetStrAuthorDateHits(ShowAuthor, ShowDateType, ShowHits, Author_ListItem, UpdateTime_ListItem, Hits_ListItem, iChannelID)
Dim strAuthorDateHits
strAuthorDateHits = ""
If ShowAuthor = True Or ShowDateType > 0 Or ShowHits = True Then
strAuthorDateHits = strAuthorDateHits & " ("
If ShowAuthor = True Then
strAuthorDateHits = strAuthorDateHits & Author_ListItem
End If
If ShowDateType > 0 Then
If ShowAuthor = True Then
strAuthorDateHits = strAuthorDateHits & ","
End If
strAuthorDateHits = strAuthorDateHits & UpdateTime_ListItem
End If
If ShowHits = True Then
If ShowAuthor = True Or ShowDateType > 0 Then
strAuthorDateHits = strAuthorDateHits & ","
End If
strAuthorDateHits = strAuthorDateHits & Hits_ListItem
End If
strAuthorDateHits = strAuthorDateHits & ")"
End If
GetInfoList_GetStrAuthorDateHits = strAuthorDateHits
End Function
Function GetInfoList_GetStrHotSign(ShowHotSign, Hits_ListItem, strHot)
If ShowHotSign = True And Hits_ListItem >= HitsOfHot Then
GetInfoList_GetStrHotSign = "<img src=""" & strInstallDir & "images/hot.gif"" alt=""" & strHot & ChannelShortName & """>"
Else
GetInfoList_GetStrHotSign = ""
End If
End Function
Function GetInfoList_GetStrNewSign(ShowNewSign, UpdateTime_ListItem, strNew)
If ShowNewSign = True And DateDiff("D", UpdateTime_ListItem, Now()) < DaysOfNew Then
GetInfoList_GetStrNewSign = "<img src=""" & strInstallDir & "images/new.gif"" alt=""" & strNew & ChannelShortName & """>"
Else
GetInfoList_GetStrNewSign = ""
End If
End Function
Function GetInfoList_GetStrContent(ContentLen, Content_ListItem, Intro_ListItem)
If Trim(Intro_ListItem & "") = "" Then
GetInfoList_GetStrContent = Left(Replace(Replace(Replace(nohtml(Content_ListItem), "[NextPage]", ""), ">", ">"), "<", "<"), ContentLen) & "……"
Else
GetInfoList_GetStrContent = Left(nohtml(Intro_ListItem), ContentLen)
End If
End Function
Function GetInfoList_GetStrAuthor_Xml(ShowAuthor, strAuthor)
If ShowAuthor = True Then
GetInfoList_GetStrAuthor_Xml = Replace(Character_Author, "{$Text}", strAuthor)
Else
GetInfoList_GetStrAuthor_Xml = ""
End If
End Function
Function GetInfoList_GetStrUpdateTime_Xml(ShowDateType, strUpdateTime)
If ShowDateType > 0 Then
GetInfoList_GetStrUpdateTime_Xml = Replace(Character_Date, "{$Text}", strUpdateTime)
Else
GetInfoList_GetStrUpdateTime_Xml = ""
End If
End Function
Function GetInfoList_GetStrHits_Xml(ShowHits, strHits)
If ShowHits = True Then
GetInfoList_GetStrHits_Xml = Replace(Character_Hits, "{$Text}", strHits)
Else
GetInfoList_GetStrHits_Xml = ""
End If
End Function
Function GetInfoList_GetStrAuthor_RSS(Author)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -