📄 create_softindexcls.asp
字号:
<%
Class Create_SoftIndex_Cls
Private ErrMsg
Private SucMsg
Private Founderr
Private NC_Admin
Private Sub Class_Initialize()
Founderr = False
End Sub
Private Sub Class_Terminate()
If IsObject(Conn) Then
Conn.Close
Set Conn = Nothing
End If
If IsObject(NC_Admin) Then
Set NC_Admin = Nothing
End If
If IsObject(DownloadClass_Ads) Then
Set DownloadClass_Ads = Nothing
End If
End Sub
'*************************************************************
'函数作用:信息排行 hitsID=0:信息总排行 hitsID=1:本日信息排行
'*************************************************************
Private Function DownLoadTop(HitsID)
Dim Rs, SQL, HtmlString, OrderName, SoftName
Select Case CInt(HitsID)
Case 1
OrderName = "DayHits"
Case 2
OrderName = "WeekHits"
Case 3
OrderName = "MonthHits"
Case Else
OrderName = "Hits"
End Select
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(13)) & " softid,sortid,SoftName,SoftVer, " & OrderName & ", SoftTime from NC_SoftInfo where isLock = 0 order by " & OrderName & " desc, SoftTime desc, softid desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有排行信息!"
Else
Do While Not Rs.EOF
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='信息名称: " & Rs(2) & Rs(3) & "<BR>更新时间: " & Rs(5) & "<BR>信息次数: " & Rs(4) & "'>" & DownsysClass.gotTopic(Rs(2) & Rs(3), CInt(DownsysClass.mainset(14))) & "</A>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rs(0) & "' title='信息名称: " & Rs(2) & " " & Rs(3) & "<BR>更新时间: " & Rs(5) & "<BR>信息次数: " & Rs(4) & "'>" & DownsysClass.gotTopic(Rs(2) & " " & Rs(3), CInt(DownsysClass.mainset(14))) & "</A>"
End If
HtmlString = HtmlString & DownsysClass.mainset(15)
HtmlString = Replace(HtmlString, "{$SoftTopName}", SoftName)
HtmlString = Replace(HtmlString, "{$SoftHits}", Rs(4))
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
DownLoadTop = HtmlString
End Function
'*************************************************************
'函数作用:热门文章 hitsID=0:总浏览排行文章 hitsID=1:本日浏览排行
'*************************************************************
Private Function ArticleHits(HitsID)
Dim Rs, SQL, HtmlString, OrderName, ArticleTitle
Select Case CInt(HitsID)
Case 1
OrderName = "DayHits"
Case 2
OrderName = "WeekHits"
Case 3
OrderName = "MonthHits"
Case Else
OrderName = "Hits"
End Select
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(16)) & " id,classid,Title, " & OrderName & ", InfoTime from NC_Article where isLock = 0 order by " & OrderName & " 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 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(3) & "'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(17))) & "</A>"
Else
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='文章标题: " & Rs(2) & "<BR>更新时间: " & Rs(4) & "<BR>浏览次数: " & Rs(3) & "'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(17))) & "</A>"
End If
HtmlString = HtmlString & DownsysClass.mainset(18)
HtmlString = Replace(HtmlString, "{$ArticleTitle}", ArticleTitle)
HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs(3))
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
ArticleHits = 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.mainset(19)) & " id,classid,Title, ClassName,InfoTime,Hits,isCommend 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>" & Year(Rs("InfoTime")) & "." & Month(Rs("InfoTime")) & "." & Day(Rs("InfoTime")) & "</FONT >"
InfoDate = "<FONT color=red>" & FormatDateTime(Rs("InfoTime"), 2) & "</FONT >"
Else
InfoTime = "<FONT color=#999999>" & Year(Rs("InfoTime")) & "." & 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
if Rs("isCommend") = 1 Then
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs(2) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(20))) & "</A><img src='" & DownsysClass.SetupDir & "Images/hot.gif' width='19' height='7'>"
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/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs(2) & "' 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>"
End if
Else
if Rs("isCommend") = 1 Then
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='" & Rs(2) & "' class='TableLink'>" & DownsysClass.gotTopic(Rs(2), CInt(DownsysClass.mainset(20))) & "</A><img src='" & DownsysClass.SetupDir & "Images/hot.gif' width='19' height='7'>"
ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing.asp?classid=" & Rs(1) & "' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
Else
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rs(0) & "' title='" & Rs(2) & "' 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
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 BestArticle()
Dim Rs, SQL, HtmlString, ArticleTitle, ClassName, InfoTime, InfoDate
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(19)) & " 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)) = 0 Then
ArticleTitle = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs(2) & "' 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) & "' 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
BestArticle = HtmlString
End Function
'*************************************************************
'函数作用:最近更新信息
'*************************************************************
Private Function DayNewSoft()
Dim Rs, SQL, HtmlString, SoftName, SortName, SoftTime, SoftDate
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(22)) & " softid,sortid,SoftName, SoftVer,SortName,SoftTime,Hits from NC_SoftInfo where isLock = 0 order by SoftTime desc, softid desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有更新信息!"
Else
Do While Not Rs.EOF
If Rs("SoftTime") >= Date Then
SoftTime = "<FONT color=red>" & Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime")) & "</FONT >"
SoftDate = "<FONT color=red>" & FormatDateTime(Rs("SoftTime"), 2) & "</FONT >"
Else
SoftTime = "<FONT color=#999999>" & Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime")) & "</FONT >"
SoftDate = "<FONT color=red>" & FormatDateTime(Rs("SoftTime"), 2) & "</FONT >"
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs("SoftName") & Rs("SoftVer") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(23))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "Sorting0/Catalog" & Rs(1) & "/Sorting_Indate_Desc_1.html' title='" & Rs("SortName") & "'>" & Rs("SortName") & "</A>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rs(0) & "' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(23))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "Sorting.asp?sortid=" & Rs(1) & "' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "'>" & Rs("SortName") & "</A>"
End If
HtmlString = HtmlString & DownsysClass.mainset(24)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftHits}", Rs("Hits"))
HtmlString = Replace(HtmlString, "{$SoftDate}", SoftDate)
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
DayNewSoft = HtmlString
End Function
'*************************************************************
'函数作用:推荐信息
'*************************************************************
Private Function CommendSoft()
Dim Rs, SQL, HtmlString, SoftName, SortName, SoftTime, SoftDate
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(22)) & " softid,sortid,SoftName, SoftVer,SortName,SoftTime,Hits,isTop from NC_SoftInfo where isLock = 0 And isCommend = 1 order by SoftTime desc, softid desc"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有推荐信息!"
Else
Do While Not Rs.EOF
If Rs("SoftTime") >= Date Then
SoftTime = "<FONT color=red>" & Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime")) & "</FONT >"
SoftDate = "<FONT color=red>" & FormatDateTime(Rs("SoftTime"), 2) & "</FONT >"
Else
SoftTime = "<FONT color=#999999>" & Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime")) & "</FONT >"
SoftDate = "<FONT color=#999999>" & FormatDateTime(Rs("SoftTime"), 2) & "</FONT >"
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software/Catalog" & Rs(1) & "/" & Rs(0) & ".html' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(23))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "Sorting0/Catalog" & Rs(1) & "/Sorting_Indate_Desc_1.html' title='" & Rs("SortName") & "'>" & Rs("SortName") & "</A>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rs(0) & "' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(23))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "Sorting.asp?sortid=" & Rs(1) & "' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "'>" & Rs("SortName") & "</A>"
End If
If Rs("isTop") = 1 Then SoftName = "<FONT color=red>" & SoftName & "</Font>"
HtmlString = HtmlString & DownsysClass.mainset(24)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftHits}", Rs("Hits"))
HtmlString = Replace(HtmlString, "{$SoftDate}", SoftDate)
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
CommendSoft = HtmlString
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -