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

📄 create_articleindexcls.asp

📁 大型黄页系统,精美黄页flash演示,10m
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		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 DownsysClass.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
	'*************************************************************
	'函数作用:文章类型
	'*************************************************************
	Private Function CreateArticleType()
		Dim Rs, SQL, InfoTime, Title, HtmlString, Topic, ClassName, i, TypeUrl, InfoDate
		Set Rs = Server.CreateObject("adodb.recordset")
		HtmlString = HtmlString & "<TABLE WIDTH=360 BORDER=0 CELLPADDING=0 CELLSPACING=0>" & vbCrLf
		HtmlString = HtmlString & " <TR>" & vbCrLf
		Dim ArticleType
		ArticleType = Split(DownsysClass.Setting(36), ",")
		For i = 0 To UBound(ArticleType)
			HtmlString = HtmlString & "    <TD>" & vbCrLf
			SQL = "SELECT top " & CInt(DownsysClass.TempSet(3)) & " ID,Classid,Title,ClassName,ArticleType,InfoTime,Hits FROM NC_Article where ArticleType='" & Trim(ArticleType(i)) & "' order by InfoTime desc,ID desc"
			Rs.Open SQL, Conn, 1, 1
			HtmlString = HtmlString & DownsysClass.TempSet(6)
			If CInt(DownsysClass.Setting(5)) = 1 Then
				TypeUrl = DownsysClass.SetupDir & "NewArticle.Asp?type=" & Trim(ArticleType(i))
			Else
				TypeUrl = DownsysClass.SetupDir & "Article/NewArticle_" & i & ".html"
			End IF
			HtmlString = Replace(HtmlString, "{$TypeName}", Trim(ArticleType(i)))
			HtmlString = Replace(HtmlString, "{$ArticleTypeUrl}", TypeUrl)
			If Rs.EOF And Rs.bof Then
				HtmlString = HtmlString & "<p align=center>还没有任何文章!</p>"
			Else
				Do While Not Rs.EOF
					HtmlString = HtmlString & DownsysClass.TempSet(7)
					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
					Topic = "<A HREF='" & DownsysClass.SetupDir & "Article.Asp?id=" & Rs("id") & "' title='文章标题:" & Rs("Title") & "<BR>更新时间: " & Rs("InfoTime") & "<BR>浏览次数: " & Rs("Hits") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("Title"), CInt(DownsysClass.TempSet(4))) & "</A>"
					ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing.Asp?ClassID=" & Rs("ClassID") & "' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
					Else
					Topic = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rs("ClassID") &"/" & Rs("id") & ".html' title='文章标题:" & Rs("Title") & "<BR>更新时间: " & Rs("InfoTime") & "<BR>浏览次数: " & Rs("Hits") & "' class='TableLink'>" & DownsysClass.gotTopic(Rs("Title"), CInt(DownsysClass.TempSet(4))) & "</A>"
					ClassName = "<A HREF='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs("ClassID") & "/Listing_Indate_Desc_1.html' title='" & Rs("ClassName") & "'>" & Rs("ClassName") & "</A>"
					End If
					HtmlString = Replace(HtmlString, "{$Topic}", Topic)
					HtmlString = Replace(HtmlString, "{$ClassName}", ClassName)
					HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
					HtmlString = Replace(HtmlString, "{$InfoDate}", InfoDate)
					Rs.movenext
				Loop
			End If
			HtmlString = HtmlString & DownsysClass.TempSet(8)
			Rs.Close

			HtmlString = HtmlString & "</TD></tr>" & vbCrLf
			If (i Mod CInt(DownsysClass.TempSet(5))) = (CInt(DownsysClass.TempSet(5)) - 1) Then HtmlString = HtmlString & "<tr>"
		Next
		HtmlString = HtmlString & " </TR>" & vbCrLf
		HtmlString = HtmlString & "</TABLE>" & vbCrLf
		Set Rs = Nothing
		CreateArticleType = 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 ArticleImage()
		Dim Rs, SQL, HtmlString, Topic, images
		Set Rs = Server.CreateObject("adodb.recordset")
		SQL = "select Top " & CInt(DownsysClass.TempSet(9)) & " classid,ClassName,rootid,Child,ArticleNum,Readme FROM NC_Class where depth=1 order by rootid"
		Rs.Open SQL, Conn, 1, 1
		If Rs.bof And Rs.EOF Then
			HtmlString = "<img src=""" & DownsysClass.SetupDir & "images/NoPic.jpg"" width='" & DownsysClass.TempSet(20) & "' height='" & DownsysClass.TempSet(21) & "' border=0>"
		Else
			HtmlString = DownsysClass.TempSet(11)
			Do While Not Rs.EOF
				If CInt(DownsysClass.Setting(5)) = 1 Then
				Topic = "<A href='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs("classid") & "/Listing_indate_Desc_1.html'  title='" & Rs("Readme") & "<BR>共有文章: " & Rs("ArticleNum") & " 篇'>" & Rs("ClassName") & "</a>"
				images = "<A href='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs("classid") & "/Listing_indate_Desc_1.html' class=""white-orangebg s"" >" & Rs("ClassName") & "</a>"
				Else 
				Topic = "<A href='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs("classid") & "/Listing_indate_Desc_1.html'  title='" & Rs("Readme") & "<BR>共有文章: " & Rs("ArticleNum") & " 篇'>" & Rs("ClassName") & "</a>"
				images = "<A href='" & DownsysClass.SetupDir & "Listing/Catalog" & Rs("classid") & "/Listing_indate_Desc_1.html' class=""white-orangebg s"" >" & Rs("ClassName") & "</a>"
				End If
				HtmlString = HtmlString & DownsysClass.TempSet(12)
				HtmlString = Replace(HtmlString, "{$Images}", images)
				HtmlString = Replace(HtmlString, "{$Topic}", Topic)
				Rs.movenext
			Loop
			HtmlString = HtmlString & DownsysClass.TempSet(13)
		End If
		Rs.Close
		Set Rs = Nothing
		ArticleImage = HtmlString
	End Function

	Private Function SingleImage(orders)
		Dim Rs, SQL, HtmlString, Topic, images, OrderName, ii
		ii=-1
		Set Rs = Server.CreateObject("adodb.recordset")
		If orders = "Hits" Then
			OrderName = "Hits"
		Else
			OrderName = "InfoTime"
		End If
		SQL = "select Top 6 id,classid,title,images from NC_Article where isLock = 0 And images <>'' order by " & OrderName & " desc, id desc"
		Rs.Open SQL, Conn, 1, 1
HtmlString = HtmlString & "<SCRIPT language=JavaScript>" & vbCrLf
HtmlString = HtmlString & "<!--" & vbCrLf
HtmlString = HtmlString & "var bannerAD=new Array();" & vbCrLf
HtmlString = HtmlString & "var bannerADlink=new Array();" & vbCrLf
HtmlString = HtmlString & "var adNum=0;" & vbCrLf
		If Rs.bof And Rs.EOF Then
		Else
			Do While Not Rs.EOF
		ii=ii+1
HtmlString = HtmlString & "bannerADlink[ "& ii &"]='" & DownsysClass.SetupDir & "Article/Catalog" & Rs("ClassID") &"/" & Rs("id") & ".html';" & vbCrLf
HtmlString = HtmlString & "bannerAD["& ii &"]='" & Rs("images") & "';" & vbCrLf
				Rs.movenext
			Loop
		End If

HtmlString = HtmlString & "var preloadedimages=new Array();" & vbCrLf
HtmlString = HtmlString & "   for (i=0;i<6;i++){" & vbCrLf
HtmlString = HtmlString & "preloadedimages[i]=new Image();" & vbCrLf
HtmlString = HtmlString & "      preloadedimages[i].src=bannerAD[i];" & vbCrLf
HtmlString = HtmlString & "   }" & vbCrLf

HtmlString = HtmlString & "function setTransition(){" & vbCrLf
HtmlString = HtmlString & "   if (document.all){" & vbCrLf
HtmlString = HtmlString & "      bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);" & vbCrLf
HtmlString = HtmlString & "      bannerADrotator.filters.revealTrans.apply();" & vbCrLf
HtmlString = HtmlString & "   }" & vbCrLf
HtmlString = HtmlString & "}" & vbCrLf

HtmlString = HtmlString & "function playTransition(){" & vbCrLf
HtmlString = HtmlString & "   if (document.all)" & vbCrLf
HtmlString = HtmlString & "      bannerADrotator.filters.revealTrans.play()" & vbCrLf
HtmlString = HtmlString & "}" & vbCrLf

HtmlString = HtmlString & "function nextAd(){" & vbCrLf
HtmlString = HtmlString & "   if(adNum<bannerAD.length-1)adNum++ ;" & vbCrLf
HtmlString = HtmlString & "      else adNum=0;" & vbCrLf
HtmlString = HtmlString & "   setTransition();" & vbCrLf
HtmlString = HtmlString & "   document.images.bannerADrotator.src=bannerAD[adNum];" & vbCrLf
HtmlString = HtmlString & "   playTransition();" & vbCrLf
HtmlString = HtmlString & "   theTimer=setTimeout(""nextAd()"", 6000);" & vbCrLf
HtmlString = HtmlString & "}" & vbCrLf

HtmlString = HtmlString & "function jump2url(){" & vbCrLf
HtmlString = HtmlString & "   jumpUrl=bannerADlink[adNum];" & vbCrLf
HtmlString = HtmlString & "   jumpTarget='_blank';" & vbCrLf
HtmlString = HtmlString & "   if (jumpUrl != ''){" & vbCrLf
HtmlString = HtmlString & "      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);" & vbCrLf
HtmlString = HtmlString & "      else location.href=jumpUrl;" & vbCrLf
HtmlString = HtmlString & "   }" & vbCrLf
HtmlString = HtmlString & "}" & vbCrLf
HtmlString = HtmlString & "function displayStatusMsg() { " & vbCrLf
HtmlString = HtmlString & "   status=bannerADlink[adNum];" & vbCrLf
HtmlString = HtmlString & "   document.returnValue = true;" & vbCrLf
HtmlString = HtmlString & "}" & vbCrLf
HtmlString = HtmlString & "//-->" & vbCrLf
HtmlString = HtmlString & "</SCRIPT>" & vbCrLf
HtmlString = HtmlString & "<a onMouseOver=""displayStatusMsg();return document.returnValue"" href=""javascript:jump2url()"" onMouseDown=""return aliclick(this,'?info=topimg');""><img class=black-border style=""FILTER: revealTrans(duration=2,transition=20)"" height='" & DownsysClass.TempSet(21) & "' src=""javascript:nextAd()"" width='" & DownsysClass.TempSet(20) & "' border=0 name=bannerADrotator></a>" & vbCrLf
		Rs.Close
		Set Rs = Nothing
		SingleImage = HtmlString
	End Function

End Class
%>

⌨️ 快捷键说明

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