📄 create_articlecls.asp
字号:
If CInt(DownsysClass.Setting(5)) = 0 Then
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Listing/Catalog" & classid & "/Listing_indate_Desc_1.html'>" & ClassName & "</a>"
Else
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Listing.Asp?classid=" & classid & "'>" & ClassName & "</a>"
End If
NowStation = HtmlString
End Function
'*************************************************************
'函数作用:相关文章
'*************************************************************
Private Function GetKeyArticle(Keys, keyid)
Dim Rss, SQL, HtmlString, Topic, InfoTime
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select top " & CInt(DownsysClass.TempSet(0)) & " id,classid,title,Hits,InfoTime,islock from NC_Article where title like '%" & Left((Keys), 4) & "%' and ID <> " & keyid & " and islock = 0 "
Rss.Open SQL, Conn, 1, 1
If Not (Rss.EOF And Rss.bof) Then
Do While Not Rss.EOF
HtmlString = HtmlString & DownsysClass.TempSet(2)
If CInt(DownsysClass.Setting(5)) = 0 Then
Topic = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rss("classid") & "/" & Rss("id") & ".html'>" & DownsysClass.gotTopic(Rss("Title"), CInt(DownsysClass.TempSet(1))) & "</A>"
Else
Topic = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rss("id") & "'>" & DownsysClass.gotTopic(Rss("Title"), CInt(DownsysClass.TempSet(1))) & "</A>"
End If
'InfoTime = Month(Rss("InfoTime")) & "/" & Day(Rss("InfoTime"))
'HtmlString = Replace(HtmlString, "{$Hits}", Rss("Hits"))
'HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
HtmlString = Replace(HtmlString, "{$Topic}", Topic)
Rss.movenext
Loop
End If
Rss.Close
Set Rss = Nothing
GetKeyArticle = HtmlString
End Function
Private Function FormerArticle(articleid)
Dim Rss, SQL, HtmlString
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select id,classid,title from NC_Article where id = " & articleid - 1
Rss.Open SQL, Conn, 1, 1
If Rss.EOF And Rss.bof Then
HtmlString = DownsysClass.TempSet(3)
Else
If CInt(DownsysClass.Setting(5)) = 0 Then
HtmlString = "<a href=" & DownsysClass.SetupDir & "Article/Catalog" & Rss("classid") & "/" & Rss("id") & ".html>" & Rss("title") & "</a>"
Else
HtmlString = "<a href=" & DownsysClass.SetupDir & "Article.Asp?id=" & Rss("id") & ">" & Rss("title") & "</a>"
End If
End If
Rss.Close
Set Rss = Nothing
FormerArticle = HtmlString
End Function
Private Function NextArticle(articleid)
Dim Rss, SQL, HtmlString
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select id,classid,title from NC_Article where id = " & articleid + 1
Rss.Open SQL, Conn, 1, 1
If Rss.EOF And Rss.bof Then
HtmlString = DownsysClass.TempSet(3)
Else
If CInt(DownsysClass.Setting(5)) = 0 Then
HtmlString = "<a href=" & DownsysClass.SetupDir & "Article/Catalog" & Rss("classid") & "/" & Rss("id") & ".html>" & Rss("title") & "</a>"
Else
HtmlString = "<a href=" & DownsysClass.SetupDir & "Article.Asp?id=" & Rss("id") & ">" & Rss("title") & "</a>"
End If
End If
Rss.Close
Set Rss = Nothing
NextArticle = HtmlString
End Function
'*************************************************************
'函数作用:相关软件
'*************************************************************
Private Function GetKeySoftware(Keys)
Dim Rss, SQL, HtmlString, SoftName, SoftTime
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select top " & CInt(DownsysClass.TempSet(0)) & " SoftID,sortid,SoftName,SoftVer,islock from NC_SoftInfo where SoftName like '%" & Left((Keys), 4) & "%' and islock = 0 "
Rss.Open SQL, Conn, 1, 1
If Not (Rss.EOF And Rss.bof) Then
Do While Not Rss.EOF
HtmlString = HtmlString & DownsysClass.TempSet(6)
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software/Catalog" & Rss(1) & "/" & Rss(0) & ".html'>" & DownsysClass.gotTopic(Rss(2) & " " & Rss(3), CInt(DownsysClass.TempSet(1))) & "</A>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rss(0) & "'>" & DownsysClass.gotTopic(Rss(2) & " " & Rss(3), CInt(DownsysClass.TempSet(1))) & "</A>"
End If
HtmlString = Replace(HtmlString,"{$SoftName}",SoftName)
Rss.movenext
Loop
End If
Rss.Close
Set Rss = Nothing
GetKeySoftware = HtmlString
End Function
'*************************************************************
'函数作用:热门文章
'*************************************************************
Private Function GetHotArticle()
Dim Rs, SQL, HtmlString, HotTopic, ClassName, InfoTime
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.TempSet(4)) & " id,classid,Title, ClassName,InfoTime,Hits from NC_Article where isLock = 0 order by Hits desc, InfoTime desc, id desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有热门文章!"
Else
Do While Not Rs.EOF
If Rs("InfoTime") >= Date Then
InfoTime = "<FONT color=red>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
Else
InfoTime = "<FONT color=#999999>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
HotTopic = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs(2) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.TempSet(5))) & "</A>"
Else
HotTopic = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='" & Rs(2) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.TempSet(5))) & "</A>"
End If
HtmlString = HtmlString & DownsysClass.TempSet(6)
HtmlString = Replace(HtmlString, "{$HotTopic}", HotTopic)
HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs("Hits"))
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
GetHotArticle = HtmlString
End Function
'*************************************************************
'函数作用:最新加入文章
'*************************************************************
Private Function NewArticle()
Dim Rs, SQL, HtmlString, ArticleTitle, ClassName, InfoTime, InfoDate
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.TempSet(15)) & " id,classid,Title, ClassName,InfoTime,Hits from NC_Article where isLock = 0 order by InfoTime desc, id desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有最新文章!"
Else
Do While Not Rs.EOF
If Rs("InfoTime") >= Date Then
InfoTime = "<FONT color=red>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
InfoDate = "<FONT color=red>" & FormatDateTime(Rs("InfoTime"), 2) & "</FONT >"
Else
InfoTime = "<FONT color=#999999>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
InfoDate = "<FONT color=#999999>" & FormatDateTime(Rs("InfoTime"), 2) & "</FONT >"
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='文章标题:" & Rs(2) & "<BR>更新时间:" & Rs(4) & "<BR>浏览次数:" & Rs(5) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(20))) & "</A>"
ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs(1) & "/Listing_Indate_Desc_1.html' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
Else
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='文章标题:" & Rs(2) & "<BR>更新时间:" & Rs(4) & "<BR>浏览次数:" & Rs(5) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(20))) & "</A>"
ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing.asp?classid=" & Rs(1) & "' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
End If
HtmlString = HtmlString & DownsysClass.mainset(21)
HtmlString = Replace(HtmlString, "{$ArticleTitle}", ArticleTitle)
HtmlString = Replace(HtmlString, "{$ClassName}", ClassName)
HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs("Hits"))
HtmlString = Replace(HtmlString, "{$InfoDate}", InfoDate)
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
NewArticle = HtmlString
End Function
'*************************************************************
'搜索下拉框选择项目(整体分类部分:供应、求购)
'*************************************************************
Private Function sousuo()
Dim SoftType
Dim HtmlShowPage
Dim ii
HtmlShowPage = HtmlShowPage &" <select name=""action""> "
HtmlShowPage = HtmlShowPage &" <option value=""soft"" selected>全部信息</option>"
SoftType = Split(DownsysClass.Setting(35), ",")
For ii = 0 To UBound(SoftType)
HtmlShowPage = HtmlShowPage & "<option value=""soft"& ii &""">" & Trim(SoftType(ii)) & "</option>"
Next
HtmlShowPage = HtmlShowPage & "<option value=""info"">文章搜索</option></SELECT>"
sousuo = HtmlShowPage
End Function
'*************************************************************
'函数作用:推荐文章
'*************************************************************
Private Function BestArticle()
Dim Rs, SQL, HtmlString, ArticleTitle, ClassName, InfoTime, InfoDate
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.TempSet(15)) & " id,classid,Title, ClassName,InfoTime,Hits,isTop from NC_Article where isLock = 0 And isCommend = 1 order by isTop desc, InfoTime desc, id desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有推荐文章!"
Else
Do While Not Rs.EOF
If Rs("InfoTime") >= Date Then
InfoTime = "<FONT color=red>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
InfoDate = "<FONT color=red>" & FormatDateTime(Rs("InfoTime"), 2) & "</FONT >"
Else
InfoTime = "<FONT color=#999999>" & Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime")) & "</FONT >"
InfoDate = "<FONT color=#999999>" & FormatDateTime(Rs("InfoTime"), 2) & "</FONT >"
End If
If CInt(DownsysClass.Setting(5)) = 1 Then
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='文章标题:" & Rs(2) & "<BR>更新时间:" & Rs(4) & "<BR>浏览次数:" & Rs(5) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.TempSet(15))) & "</A>"
ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing.asp?classid=" & Rs(1) & "' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
Else
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='文章标题:" & Rs(2) & "<BR>更新时间:" & Rs(4) & "<BR>浏览次数:" & Rs(5) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.TempSet(15))) & "</A>"
ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs(1) & "/Listing_Indate_Desc_1.html' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
End If
HtmlString = HtmlString & DownsysClass.TempSet(16)
HtmlString = Replace(HtmlString, "{$BestTopic}", ArticleTitle)
HtmlString = Replace(HtmlString, "{$ClassName}", ClassName)
HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs("Hits"))
HtmlString = Replace(HtmlString, "{$InfoDate}", InfoDate)
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
BestArticle = HtmlString
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -