📄 powereasy.articlelist.asp
字号:
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Function ShowArticleList(ByVal str1, UseType)
Dim strtmp, rsArticle, sqlArticle, i, j
Dim strTemp, arrTemp
Dim iType, iDate, iLink, iNum, iorder, iCol, iHeight, iWidth
If str1 = "" Then
ShowArticleList = ""
Exit Function
End If
arrTemp = Split(str1, ",")
If UBound(arrTemp) < 10 Then
ShowArticleList = "函数式标签:{$AuthorArticleList()}的参数个数不对。请检查模板中的此标签。"
Exit Function
Else
If UBound(arrTemp) = 12 Then
iWidth = PE_CLng(arrTemp(11))
iHeight = PE_CLng(arrTemp(12))
Else
iWidth = 130
iHeight = 90
End If
End If
If arrTemp(1) = 0 Then
Exit Function
End If
iType = PE_CLng(arrTemp(5))
iNum = PE_CLng(arrTemp(8))
iorder = PE_CLng(arrTemp(9))
If arrTemp(10) = "" Or arrTemp(10) < 1 Then
iCol = 1
Else
iCol = arrTemp(10)
End If
strtmp = strtmp & "<Table width='100%'><tr><td>"
sqlArticle = "select * from PE_" & arrTemp(2) & " where"
If UseType = 1 Then
sqlArticle = sqlArticle & " Author='" & arrTemp(0) & "'"
Else
sqlArticle = sqlArticle & " CopyFrom='" & arrTemp(0) & "'"
End If
sqlArticle = sqlArticle & (" and ChannelID=" & arrTemp(1) & " and Status=3 and Deleted=" & PE_False)
If TimeData <> "0" Then
sqlArticle = sqlArticle & " and DateDiff(" & PE_DatePart_D & ",UpdateTime,'" & TimeData & "')=0"
End If
Select Case iorder
Case 0
sqlArticle = sqlArticle & " order by UpdateTime desc"
Case 1
sqlArticle = sqlArticle & " order by UpdateTime"
Case 2
sqlArticle = sqlArticle & " order by Hits desc,UpdateTime desc"
End Select
Set rsArticle = Server.CreateObject("ADODB.Recordset")
rsArticle.Open sqlArticle, Conn, 1, 1
If rsArticle.BOF And rsArticle.EOF Then
totalPut = 0
If TimeData <> "0" Then
strtmp = strtmp & Replace(XmlText("ShowSource", "ShowAuthorList/NoDay", " <h3>{$AuthorName}本日未发表任何作品</h3>"), "{$AuthorName}", arrTemp(0))
Else
strtmp = strtmp & Replace(XmlText("ShowSource", "ShowAuthorList/NoArticle", " <h3>{$AuthorName}在本频道还未收录任何作品</h3>"), "{$AuthorName}", arrTemp(0))
End If
Else
totalPut = rsArticle.RecordCount
If CurrentPage > 1 Then
If (CurrentPage - 1) * MaxPerPage < totalPut Then
rsArticle.Move (CurrentPage - 1) * MaxPerPage
Else
CurrentPage = 1
End If
End If
i = 0
Dim strShowDetal
strShowDetal = XmlText("ShowSource", "ShowAuthorList/ShowDetal", "点击这里浏览具体内容>>>")
Select Case iType
Case 1
Do While Not rsArticle.EOF
If PE_CBool(arrTemp(6)) Then strtmp = strtmp & ("<p>" & Year(rsArticle("UpdateTime")) & strYear & Month(rsArticle("UpdateTime")) & strMonth & Day(rsArticle("UpdateTime")) & strDay & "</p>")
Select Case arrTemp(2)
Case "Article"
strtmp = strtmp & "<table width='100%'><tr>"
If rsArticle("DefaultPicUrl") <> "" And Not IsNull(rsArticle("DefaultPicUrl")) Then
If Left(rsArticle("DefaultPicUrl"), 4) = "http" Or Left(rsArticle("DefaultPicUrl"), 1) = "/" Then
strtmp = strtmp & "<td width=150 align=center><img src='" & rsArticle("DefaultPicUrl") & "' width='" & iWidth & "' height='" & iHeight & "' border='0'></td>"
Else
strtmp = strtmp & "<td width=150 align=center><img src='" & strInstallDir & arrTemp(3) & "/" & arrTemp(4) & "/" & rsArticle("DefaultPicUrl") & "' width='" & iWidth & "' height='" & iHeight & "' border='0'></td>"
End If
End If
strtmp = strtmp & "<td>"
strtmp = strtmp & ("<h4>" & ReplaceText(rsArticle("Title"), 2) & "</h4> ")
strtmp = strtmp & GetSubStr(ReplaceText(nohtml(rsArticle("Content")), 1), iNum, True)
If PE_CBool(arrTemp(7)) Then
strtmp = strtmp & ("<div align='right'><a href='")
strtmp = strtmp & GetArticleUrl(GetClassFild(rsArticle("ClassID"), 4), GetClassFild(rsArticle("ClassID"), 3), rsArticle("UpdateTime"), rsArticle("ArticleID"), GetClassFild(rsArticle("ClassID"), 2), rsArticle("InfoPurview"), rsArticle("InfoPoint"))
strtmp = strtmp & ("'>" & strShowDetal & "</a></div>")
End If
strtmp = strtmp & "</td></tr></table>"
strtmp = strtmp & "<hr>"
Case "Soft"
strtmp = strtmp & "<table width='100%'><tr>"
If rsArticle("SoftPicUrl") <> "" And Not IsNull(rsArticle("SoftPicUrl")) Then
If Left(rsArticle("SoftPicUrl"), 4) = "http" Or Left(rsArticle("SoftPicUrl"), 1) = "/" Then
strtmp = strtmp & "<td width=150 align=center><img src='" & rsArticle("SoftPicUrl") & "' width='" & iWidth & "' height='" & iHeight & "' border='0' align='left'></td>"
Else
strtmp = strtmp & ("<td width=150 align=center><img src='")
strtmp = strtmp & GetSoftUrl(GetClassFild(rsArticle("ClassID"), 4), GetClassFild(rsArticle("ClassID"), 3), rsArticle("UpdateTime"), rsArticle("SoftID"))
strtmp = strtmp & ("' width='" & iWidth & "' height='" & iHeight & "' border='0' align='left'></td>")
End If
End If
strtmp = strtmp & "<td>"
strtmp = strtmp & ("<h4>" & ReplaceText(rsArticle("SoftName"), 2) & "</h4> ")
If rsArticle("SoftIntro") = "" Then
strtmp = strtmp & rsArticle("Keyword")
Else
strtmp = strtmp & GetSubStr(ReplaceText(nohtml(rsArticle("SoftIntro")), 1), iNum, True)
End If
If PE_CBool(arrTemp(7)) Then strtmp = strtmp & ("<div align='right'><a href='" & strInstallDir & arrTemp(3) & "/ShowSoft.asp?SoftID=" & rsArticle("SoftID") & "' Target=""_blank"">" & strShowDetal & "</a></div>")
strtmp = strtmp & "</td></tr></table>"
strtmp = strtmp & "<hr>"
Case "Photo"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -