⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 create_hottopjs.asp

📁 大型黄页系统,精美黄页flash演示,10m
💻 ASP
📖 第 1 页 / 共 2 页
字号:
				End If
				SoftTime = Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime"))
				HtmlString = HtmlString & DownsysClass.mainset(15)
				HtmlString = Replace(HtmlString, "{$SoftTopName}", SoftName)
				HtmlString = Replace(HtmlString, "{$SoftHits}", Rs(4))
				HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
				Rs.movenext
			Loop
		End If
		Rs.Close
		Set Rs = Nothing
		JString = "document.write (" & Chr(34) & " " & HtmlString & " " & Chr(34) & ");"
		CreateJsFile JString, Jname
	End Function
	'*************************************************************
	'函数作用:信息分类排行
	'*************************************************************
	Private Function CreateSortingTop(sortid, rootid, depth)
		Dim Rs
		Dim SQL
		Dim HtmlString
		Dim SortingTopName
		Dim JString
		Dim Jname
		Dim SoftTime
		Jname = "ThisTop" & sortid & ".JS"
		If sortid = "" Then
			SQL = "select Top " & CInt(DownsysClass.mainset(13)) & " * from NC_softinfo where isLock=0 order by Hits Desc, SoftTime Desc, softid Desc"
		Else
			If depth = 0 Then
				SQL = "select Top " & CInt(DownsysClass.mainset(13)) & " * from NC_softinfo where isLock=0 and rootid=" & rootid & " order by Hits Desc, SoftTime Desc, softid Desc"
			Else
				Dim Rss, AllSortID, ParentStr, i
	        		Set Rss = DownsysClass.Execute("select * from NC_SoftSort where strParent like '%"& sortid &"%'")
	        		If Rss.EOF And Rss.bof Then
	                		AllSortID = sortid
	        		Else
	                		Do While Not Rss.eof
	                        	ParentStr = Split(Rss("strParent"), ",")
					For i = 0 To UBound(ParentStr)
						If CLng(ParentStr(i)) = sortid Then
							AllSortID = AllSortID & Rss("sortid") &","
							Exit For
						End If
					Next
	                		Rss.movenext
	                		loop
	                		AllSortID = AllSortID & sortid
	        		End If
				Rss.Close
        			Set Rss = Nothing
                        	SQL = "select Top " & CInt(DownsysClass.mainset(13)) & " * from NC_softinfo where isLock=0 And sortid in (" & AllSortID & ") order by Hits Desc, SoftTime Desc, softid Desc"
			End If
		End If
		Set Rs = Server.CreateObject("adodb.recordset")
		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)) = 1 Then
				SortingTopName = "<A HREF='" & DownsysClass.SetupDir & "Software.asp?id=" & Rs("softid") & "' title='信息名称: " & Rs("SoftName") & " " & Rs("SoftVer") & "<BR>更新时间: " & Rs("SoftTime") & "<BR>下载次数: " & Rs("Hits") & "'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(14))) & "</A>"
				Else
				SortingTopName = "<A HREF='" & DownsysClass.SetupDir & "Software/Catalog" & Rs("sortid") & "/" & Rs("softid") & ".html' title='信息名称: " & Rs("SoftName") & " " & Rs("SoftVer") & "<BR>更新时间: " & Rs("SoftTime") & "<BR>下载次数: " & Rs("Hits") & "'>" & DownsysClass.gotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(DownsysClass.mainset(14))) & "</A>"
				End If
				SoftTime = Month(Rs("SoftTime")) & "/" & Day(Rs("SoftTime"))
				HtmlString = HtmlString & DownsysClass.mainset(15)
				HtmlString = Replace(HtmlString, "{$SoftTopName}", SortingTopName)
				HtmlString = Replace(HtmlString, "{$SoftHits}", Rs("Hits"))
				HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
				Rs.movenext
			Loop
		End If
		Rs.Close
		Set Rs = Nothing
		JString = "document.write (" & Chr(34) & " " & HtmlString & " " & Chr(34) & ");"
		CreateJsFile JString, Jname
	End Function
	'*************************************************************
	'函数作用:生成JS文件
	'*************************************************************
	Private Function CreateJsFile(JString, Jname)
		Dim CreateHtml
		Dim FSO
		Set FSO = Server.CreateObject("ADODB.STREAM")
		CreateHtml = Server.MapPath(DownsysClass.SetupDir & "JS/SoftTop/" & Jname)
			With FSO
				.Open
				.Charset = "GB2312"
				.WriteText JString
				.SaveToFile CreateHtml,2
				.Close
			End With 						
		Set FSO = Nothing
	End Function
	'*************************************************************
	'函数作用:生成JS文件
	'*************************************************************
	Private Function CreateJsFiles(JString, Jname)
		Dim CreateHtml
		Dim FSO
		Set FSO = Server.CreateObject("ADODB.STREAM")
		CreateHtml = Server.MapPath(DownsysClass.SetupDir & "JS/ArticleTop/" & Jname)
			With FSO
				.Open
				.Charset = "GB2312"
				.WriteText JString
				.SaveToFile CreateHtml,2
				.Close
			End With 
		Set FSO = Nothing
	End Function
	'*************************************************************
	'函数作用:热门文章 hitsID=0:总浏览排行文章 hitsID=1:本日浏览排行
	'*************************************************************
	Private Function CreateArticleTop(HitsID, Jname)
		Dim Rs
		Dim SQL
		Dim HtmlString
		Dim OrderName
		Dim ArticleTitle
		Dim JString
		Dim InfoTime
		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)) = 1 Then
				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>"
				Else
				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>"
				End If
				InfoTime = Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime"))
				HtmlString = HtmlString & DownsysClass.mainset(18)
				HtmlString = Replace(HtmlString, "{$ArticleTitle}", ArticleTitle)
				HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs(3))
				HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
				Rs.movenext
			Loop
		End If
		Rs.Close
		Set Rs = Nothing
		JString = "document.write (" & Chr(34) & " " & HtmlString & " " & Chr(34) & ");"
		CreateJsFiles JString, Jname
	End Function
	'*************************************************************
	'函数作用:文章分类排行
	'*************************************************************
	Private Function CreateClassTop(classid, rootid, depth)
		Dim Rs
		Dim SQL
		Dim HtmlString
		Dim SortingTopName
		Dim JString
		Dim Jname
		Dim InfoTime
		Jname = "ThisTop" & classid & ".JS"
		If classid = "" Then
			SQL = "select Top " & CInt(DownsysClass.mainset(16)) & " * from NC_Article where isLock=0 order by Hits Desc, InfoTime Desc, id Desc"
		Else
			If depth = 0 Then
				SQL = "select Top " & CInt(DownsysClass.mainset(16)) & " * from NC_Article where isLock=0 and rootid=" & rootid & " order by Hits Desc, InfoTime Desc, id Desc"
			Else
				Dim Rss, AllClassID, ParentStr, i
	        		Set Rss = DownsysClass.Execute("select * from NC_Class where strParent like '%"& classid &"%'")
	        		If Rss.EOF And Rss.bof Then
	                		AllClassID = classid
	        		Else
	                		Do While Not Rss.eof
	                       		ParentStr = Split(Rss("strParent"), ",")
					For i = 0 To UBound(ParentStr)
						If CLng(ParentStr(i)) = classid Then
							AllClassID = AllClassID & Rss("classid") &","
							Exit For
						End If
					Next
	                		Rss.movenext
	                		loop
	                		AllClassID = AllClassID & classid
	        		End If
				Rss.Close
        			Set Rss = Nothing
                        	SQL = "select Top " & CInt(DownsysClass.mainset(16)) & " * from NC_Article where isLock=0 And classid in (" & AllClassID & ") order by Hits Desc, InfoTime Desc, id Desc"
			End If
		End If
		Set Rs = Server.CreateObject("adodb.recordset")
		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)) = 1 Then
				SortingTopName = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?ID=" & Rs("id") & "' title='文章标题: " & Rs("Title") & "<BR>更新时间: " & Rs("InfoTime") & "<BR>阅读次数: " & Rs("Hits") & "'>" & DownsysClass.gotTopic(Rs("Title"), CInt(DownsysClass.mainset(17))) & "</A>"
				Else
				SortingTopName = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs("classid") & "/" & Rs("id") & ".html' title='信息名称: " & Rs("Title") & "<BR>更新时间: " & Rs("InfoTime") & "<BR>阅读次数: " & Rs("Hits") & "'>" & DownsysClass.gotTopic(Rs("Title"), CInt(DownsysClass.mainset(17))) & "</A>"
				End If
				InfoTime = Month(Rs("InfoTime")) & "/" & Day(Rs("InfoTime"))
				HtmlString = HtmlString & DownsysClass.mainset(18)
				HtmlString = Replace(HtmlString, "{$ArticleTitle}", SortingTopName)
				HtmlString = Replace(HtmlString, "{$ArticleHits}", Rs("Hits"))
				HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
				Rs.movenext
			Loop
		End If
		Rs.Close
		Set Rs = Nothing
		JString = "document.write (" & Chr(34) & " " & HtmlString & " " & Chr(34) & ");"
		CreateJsFiles JString, Jname
	End Function
End Class
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -