📄 create_pageindexcls.asp
字号:
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
'*************************************************************
'函数作用:站内公告
'*************************************************************
Private Function WebMessage(statid)
Dim Rs, SQL, HtmlString, MsgTitle, PostTime
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.mainset(25)) & " * from NC_Message where statid in (0, " & statid & ") order by isTop desc, Postime 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("Postime") >= Date Then
PostTime = "<FONT color=red>" & FormatDateTime(Rs("Postime"), 2) & "</FONT >"
Else
PostTime = "<FONT color=#999999>" & FormatDateTime(Rs("Postime"), 2) & "</FONT >"
End If
MsgTitle = "<A HREF=""javascript:openScript('" & DownsysClass.SetupDir & "message.asp?id=" & Rs("id") & "',400,300)"" title='" & Rs("title") & "'>" & DownsysClass.gotTopic(Rs("title"), CInt(DownsysClass.mainset(26))) & "</A>"
HtmlString = HtmlString & DownsysClass.mainset(27)
HtmlString = Replace(HtmlString, "{$MsgTitle}", MsgTitle)
HtmlString = Replace(HtmlString, "{$PostTime}", PostTime)
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
WebMessage = HtmlString
End Function
'*************************************************************
'函数作用:统计信息
'*************************************************************
Private Function Statistics()
Dim Rs, SQL, HtmlString
Dim AllSoft, DayUpdateSoft, AllDownNum, AllSoftSize
Dim AllArticle, DayUpdateArt, AllArticleHits, AllUserNum
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "Select count(SoftID) from NC_SoftInfo"
Rs.Open SQL, Conn, 1, 1
AllSoft = Rs(0)
If IsNull(AllSoft) Then AllSoft = 0
Rs.Close
If isSqlDataBase = 1 Then
SQL = "Select count(SoftID) from NC_SoftInfo Where datediff(d,SoftTime,GetDate())=0"
Else
SQL = "Select count(SoftID) from NC_SoftInfo Where softTime>=Date()"
End If
Rs.Open SQL, Conn, 1, 1
DayUpdateSoft = Rs(0)
If IsNull(DayUpdateSoft) Then DayUpdateSoft = 0
Rs.Close
SQL = "Select sum(Hits) from NC_SoftInfo"
Rs.Open SQL, Conn, 1, 1
AllDownNum = Rs(0)
If IsNull(AllDownNum) Then AllDownNum = 0
Rs.Close
SQL = "Select sum(SoftSize) from NC_SoftInfo"
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
AllSoftSize = 0
Else
If IsNull(Rs(0)) Then
AllSoftSize = 0
Else
AllSoftSize = Round(Rs(0) / 1024 / 1024, 3)
End If
End If
Rs.Close
SQL = "Select count(ID) from NC_Article"
Rs.Open SQL, Conn, 1, 1
AllArticle = Rs(0)
If IsNull(AllArticle) Then AllArticle = 0
Rs.Close
If isSqlDataBase = 1 Then
SQL = "Select count(ID) from NC_Article Where datediff(d,infoTime,GetDate())=0"
Else
SQL = "Select count(ID) from NC_Article Where infoTime >= Date()"
End If
Rs.Open SQL, Conn, 1, 1
DayUpdateArt = Rs(0)
If IsNull(DayUpdateArt) Then DayUpdateArt = 0
Rs.Close
SQL = "Select sum(Hits) from NC_Article"
Rs.Open SQL, Conn, 1, 1
AllArticleHits = Rs(0)
If IsNull(AllArticleHits) Then AllArticleHits = 0
Rs.Close
SQL = "Select count(userid) from NC_User"
Rs.Open SQL, Conn, 1, 1
AllUserNum = Rs(0)
If IsNull(AllUserNum) Then AllUserNum = 0
Rs.Close
HtmlString = DownsysClass.mainset(12)
HtmlString = Replace(HtmlString, "{$AllSoft}", AllSoft)
HtmlString = Replace(HtmlString, "{$DayUpdateSoft}", DayUpdateSoft)
HtmlString = Replace(HtmlString, "{$AllDownNum}", AllDownNum)
HtmlString = Replace(HtmlString, "{$AllSoftSize}", AllSoftSize)
HtmlString = Replace(HtmlString, "{$AllArticle}", AllArticle)
HtmlString = Replace(HtmlString, "{$DayUpdateArt}", DayUpdateArt)
HtmlString = Replace(HtmlString, "{$AllArticleHits}", AllArticleHits)
HtmlString = Replace(HtmlString, "{$AllUserNum}", AllUserNum)
Set Rs = Nothing
Statistics = HtmlString
End Function
'*************************************************************
'函数作用:友情连接
'*************************************************************
Public Function FriendLink()
If CInt(DownsysClass.Setting(17)) = 1 Then
Dim Rs, SQL, i
Set Rs = Server.CreateObject("adodb.recordset")
FriendLink = FriendLink & "<table align=center width=98% >"
i = CInt(DownsysClass.TempSet(10))
SQL = "select Linkname,readme,lurl from NC_Link where islogo=0 and isLock=0 order by linkid"
Set Rs = Conn.Execute(SQL)
If Not Rs.EOF And Not Rs.bof Then
Do While Not Rs.EOF
If i > CInt(DownsysClass.TempSet(11)) Then
FriendLink = FriendLink & "<tr><td width=""13%"">"
i = 1
Else
FriendLink = FriendLink & "<td width=""13%"">"
End If
FriendLink = FriendLink & "<a href=" & Rs(2) & " target=_blank title=""" & Rs(1) & """>" & Rs(0) & "</a>"
Rs.movenext
FriendLink = FriendLink & "</td>"
If i = CInt(DownsysClass.TempSet(11)) Then FriendLink = FriendLink & "</tr>"
i = i + 1
Loop
End If
Rs.Close
i = CInt(DownsysClass.TempSet(10))
SQL = "select Linkname,readme,lurl,logo from NC_Link where islogo=1 and isLock=0 order by linkid"
Set Rs = Conn.Execute(SQL)
If Not Rs.EOF And Not Rs.bof Then
FriendLink = FriendLink & "<tr><td></td></tr>"
Do While Not Rs.EOF
If i > CInt(DownsysClass.TempSet(11)) Then
FriendLink = FriendLink & "<tr><td width=""13%"">"
i = 1
Else
FriendLink = FriendLink & "<td width=""13%"">"
End If
FriendLink = FriendLink & "<a href=" & Rs(2) & " target=_blank><img src=""" & Rs(3) & """ border=0 alt=""" & Rs(0) & ":" & Rs(1) & """ height=31 width=88></a>"
Rs.movenext
FriendLink = FriendLink & "</td>"
If i = CInt(DownsysClass.TempSet(11)) Then FriendLink = FriendLink & "</tr>"
i = i + 1
Loop
End If
Rs.Close
Set Rs = Nothing
If IsNull(FriendLink) Or FriendLink = "" Then FriendLink = " "
FriendLink = FriendLink & "</table>"
End If
End Function
'*************************************************************
'函数作用:信息类型
'*************************************************************
Private Function CreateSoftType()
Dim Rs, SQL, SoftTime, Title, HtmlString, SoftName, SortName, i, TypeUrl, SoftDate
Set Rs = Server.CreateObject("adodb.recordset")
HtmlString = HtmlString & "<TABLE width=""100%"" cellSpacing=5 cellPadding=1 border=0>" & vbCrLf
HtmlString = HtmlString & " <TR vAlign=top>" & vbCrLf
Dim SoftType
SoftType = Split(DownsysClass.Setting(35), ",")
For i = 0 To UBound(SoftType)
HtmlString = HtmlString & " <TD vAlign=top width=""50%"">" & vbCrLf
SQL = "SELECT top " & CInt(DownsysClass.TempSet(5)) & " SoftID,sortid,SoftName,SoftVer,SortName,SoftType,SoftTime,Hits FROM NC_SoftInfo where SoftType='" & Trim(SoftType(i)) & "' order by SoftTime desc,SoftID desc"
Rs.Open SQL, Conn, 1, 1
HtmlString = HtmlString & DownsysClass.TempSet(7)
If CInt(DownsysClass.Setting(5)) = 0 Then
TypeUrl = DownsysClass.SetupDir & "Software/Latenew_" & i & ".html"
Else
TypeUrl = DownsysClass.SetupDir & "Latenew.Asp?type=" & Trim(SoftType(i)) & ""
End If
HtmlString = Replace(HtmlString, "{$SoftTypeUrl}", TypeUrl)
HtmlString = Replace(HtmlString, "{$TypeName}", Trim(SoftType(i)))
If Rs.EOF And Rs.bof Then
HtmlString = HtmlString & "<p align=center>还没有任何信息!</p>"
Else
Do While Not Rs.EOF
HtmlString = HtmlString & DownsysClass.TempSet(8)
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("sortid") & "/" & Rs("softid") & ".html' title='信息名称: " & Rs("SoftName") & Rs("SoftVer") & "<BR>更新时间: " & Rs("SoftTime") & "<BR>信息次数: " & Rs("Hits") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " &Rs("SoftVer"), CInt(DownsysClass.TempSet(6))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "PageSort/Catalog" & Rs("sortid") & "/PageSort_Indate_Desc_1.html' title='" & Rs("SortName") & "'>" & Rs("SortName") & "</A>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rs("softid") & "' title='信息名称:" & Rs("SoftName") & " " & Rs("SoftVer") & "<BR>更新时间: " & Rs("SoftTime") & "<BR>信息次数: " & Rs("Hits") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.TempSet(6))) & "</A>"
SortName = "<A HREF='" & DownsysClass.SetupDir & "PageSort.asp?sortid=" & Rs("sortid") & "' title='" & Rs("SoftName") & " " & Rs("SoftVer") & "'>" & Rs("SortName") & "</A>"
End If
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftDate}", SoftDate)
Rs.movenext
Loop
End If
HtmlString = HtmlString & DownsysClass.TempSet(9)
Rs.Close
HtmlString = HtmlString & "</TD>" & vbCrLf
If DownsysClass.TempSet(12) = "" Then
If (i Mod 2) = 1 Then HtmlString = HtmlString & "</tr><tr>"
Else
If (i Mod CInt(DownsysClass.TempSet(12))) = (CInt(DownsysClass.TempSet(12)) - 1) Then HtmlString = HtmlString & "</tr><tr>"
End If
Next
HtmlString = HtmlString & " </TR>" & vbCrLf
HtmlString = HtmlString & "</TABLE>" & vbCrLf
Set Rs = Nothing
CreateSoftType = HtmlString
End Function
'*************************************************************
'函数作用:图片推荐
'*************************************************************
Private Function SoftImage()
Dim Rs, SQL, HtmlString, SoftName, SoftImg, i
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select Top " & CInt(DownsysClass.TempSet(0)) & " softid,sortid,SoftName,SoftVer,SoftImg from NC_SoftInfo where isLock = 0 And SoftImg <>'' order by SoftTime desc, softid desc"
Rs.Open SQL, Conn, 1, 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -