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

📄 softchannel.asp

📁 网络上经典的图片程序
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		Else
			SpecialName = rsPecial("SpecialName")
			SpecialID = rsPecial("SpecialID")
			SpecialDir = rsPecial("SpecialDir")
			skinid = CLng(Newasp.ChannelSkin)
		End If
		rsPecial.Close: Set rsPecial = Nothing
		Newasp.LoadTemplates ChannelID, 4, skinid
		If CreateHtml <> 0 Then
			HtmlFilePath = Newasp.InstallDir & Newasp.ChannelDir & "special/" & SpecialDir & "/"
			Newasp.CreatPathEx (HtmlFilePath)
		End If
		HtmlContent = Newasp.HtmlContent
		HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir)
		HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
		HtmlContent = Replace(HtmlContent, "{$ModuleName}", Newasp.ModuleName)
		HtmlContent = Replace(HtmlContent, "{$SpecialID}", SpecialID)
		HtmlContent = Replace(HtmlContent, "{$PageTitle}", SpecialName)
		HtmlContent = Replace(HtmlContent, "{$SoftIndex}", strIndexName)
		HtmlContent = Replace(HtmlContent, "{$SpecialName}", SpecialName)
		Call ReplaceString
		maxperpage = CInt(Newasp.HtmlSetting(1))

		If CLng(CurrentPage) = 0 Then CurrentPage = 1
		'记录总数
		TotalNumber = Newasp.Execute("SELECT COUNT(SoftID) from NC_SoftList WHERE ChannelID = " & ChannelID & " And isAccept > 0 And SpecialID = " & SpecialID)(0)
		TotalPageNum = CLng(TotalNumber / maxperpage)  '得到总页数
		If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
		If CurrentPage < 1 Then CurrentPage = 1
		If CurrentPage > TotalPageNum Then CurrentPage = TotalPageNum
		Set Rs = CreateObject("ADODB.Recordset")
		SQL = "SELECT A.SoftID,A.ClassID,A.ColorMode,A.FontMode,A.SoftName,A.SoftVer,A.content,A.Related,A.SoftType,A.RunSystem,A.impower,A.SoftSize,A.star,A.SoftTime,A.username,A.IsTop,A.IsBest,A.Allhits,A.SoftImage,A.HtmlFileDate,C.ClassName,C.HtmlFileDir,C.UseHtml FROM [NC_SoftList] A INNER JOIN [NC_Classify] C On A.ClassID=C.ClassID WHERE A.ChannelID=" & ChannelID & " And A.isAccept > 0 And A.SpecialID = " & SpecialID & " ORDER BY A.isTop DESC, A.SoftTime DESC ,A.SoftID DESC"
		If isSqlDataBase = 1 Then
			Set Rs = Newasp.Execute(SQL)
		Else
			Rs.Open SQL, Conn, 1, 1
		End If
		If Rs.BOF And Rs.EOF Then
			'如果没有找到相关内容,清除掉无用的标签代码
			HtmlContent = Replace(HtmlContent, "{$ReadListPage}", "还没有找到任何专题" & Newasp.ModuleName & "")
			HtmlContent = Replace(HtmlContent, Newasp.CutFixContent(HtmlContent, "[ShowRepetend]", "[/ShowRepetend]", 1), "")
			'如果是生成HTML,执行下面的语句
			If CreateHtml <> 0 Then
				HtmlFileName = HtmlFilePath & Newasp.SpecialFileName(SpecialID, Newasp.HtmlExtName, 1)
				Newasp.CreatedTextFile HtmlFileName, HtmlContent
				If IsShowFlush = 1 Then 
					Response.Write "<li style=""font-size: 12px;"">生成" & strClassName & "HTML完成... <a href=" & HtmlFileName & " target=_blank>" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
					Response.Flush
				End If
			End If
		Else
			'获取模板标签[ShowRepetend][/ReadSoftList]中的字符串
			TempListContent = Newasp.CutFixContent(HtmlContent, "[ShowRepetend]", "[/ShowRepetend]", 1)
			If CreateHtml <> 0 Then
				Call LoadSoftListHtml(n)
			Else
				Call LoadChildListAsp
			End If
		End If
		Rs.Close: Set Rs = Nothing
		If CreateHtml = 0 Then CreateSoftSpecial = HtmlContent
		Exit Function
	End Function
	'================================================
	'过程名:LoadSoftListHtml
	'作  用:装载软件列表并生成HTML
	'================================================
	Private Sub LoadSoftListHtml(n)
		Dim HtmlFileName
		
		If IsNull(TempListContent) Then Exit Sub
		For CurrentPage = n To TotalPageNum
			Rs.MoveFirst
			i = 0
			If TotalPageNum > 1 Then Rs.Move (CurrentPage - 1) * maxperpage
			'Dim bookmark:bookmark = Rs.bookmark
			ListContent = ""
			j = (CurrentPage - 1) * maxperpage + 1
			Do While Not Rs.EOF And i < CInt(maxperpage)
				If Not Response.IsClientConnected Then Response.End
				Call LoadListDetail
				Rs.MoveNext
				i = i + 1
				j = j + 1
				If i >= maxperpage Then Exit Do
			Loop
			Dim strHtmlFront, strHtmlPage
			strHtmlFront = "Special" & Newasp.Supplemental(SpecialID, 3) & "_"
			strHtmlPage = htmlshowpage(CurrentPage, TotalPageNum, TotalNumber, maxperpage, strHtmlFront, Newasp.HtmlExtName, SpecialName)
			HtmlTemplate = HtmlContent
			HtmlTemplate = Replace(HtmlTemplate, TempListContent, ListContent)
			HtmlTemplate = Replace(HtmlTemplate, "{$ReadListPage}", strHtmlPage)
			HtmlTemplate = Replace(HtmlTemplate, "[ShowRepetend]", "")
			HtmlTemplate = Replace(HtmlTemplate, "[/ShowRepetend]", "")
			'开始生成子分类的HTML页
			HtmlFileName = HtmlFilePath & Newasp.SpecialFileName(SpecialID, Newasp.HtmlExtName, CurrentPage)
			Newasp.CreatedTextFile HtmlFileName, HtmlTemplate
			If IsShowFlush = 1 Then Response.Write "<li style=""font-size: 12px;"">生成" & strClassName & "HTML完成... <a href=" & HtmlFileName & " target=_blank>" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
			Response.Flush
		Next
		Exit Sub
	End Sub
	'================================================
	'过程名:ReplaceString
	'作  用:替换模板内容
	'================================================
	Private Sub ReplaceString()
		HtmlContent = Replace(HtmlContent, "{$SelectedType}", "")
		HtmlContent = ReadClassMenu(HtmlContent)
		HtmlContent = HTML.ReadSoftPic(HtmlContent)
		HtmlContent = HTML.ReadSoftList(HtmlContent)
		HtmlContent = HTML.ReadSoftPicAndText(HtmlContent)
		HtmlContent = HTML.ReadPopularSoft(HtmlContent)
		HtmlContent = Replace(HtmlContent, "{$SkinPath}", Newasp.SkinPath)
		HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
	End Sub
	'#############################\\执行推荐软件开始//#############################
	'================================================
	'过程名:ShowBestDown
	'作  用:显示推荐下载
	'================================================
	Public Sub ShowBestDown()
		On Error Resume Next
		If CreateHtml <> 0 Then
			Response.Redirect (ChannelRootDir & "index" & Newasp.HtmlExtName)
			Exit Sub
		Else
			Newasp.PreventInfuse
			If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
				Response.Write ("错误的系统参数!请输入整数")
				Response.End
			End If
			If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
				CurrentPage = CLng(Request("page"))
			Else
				CurrentPage = 1
			End If
			Response.Write CreateBestDown(1)
		End If
	End Sub
	'================================================
	'过程名:ShowNewDown
	'作  用:显示最新下载
	'================================================
	Public Sub ShowNewDown()
		On Error Resume Next
		If CreateHtml <> 0 Then
			Response.Redirect (ChannelRootDir & "index" & Newasp.HtmlExtName)
			Exit Sub
		Else
			Newasp.PreventInfuse
			If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
				Response.Write ("错误的系统参数!请输入整数")
				Response.End
			End If
			If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
				CurrentPage = CLng(Request("page"))
			Else
				CurrentPage = 1
			End If
			Response.Write CreateBestDown(0)
		End If
	End Sub
	'================================================
	'过程名:ShowSoftType
	'作  用:显示软件类型
	'================================================
	Public Sub ShowSoftType()
		On Error Resume Next
		Newasp.PreventInfuse
		If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
			Response.Write ("错误的系统参数!请输入整数")
			Response.End
		End If
		If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
			CurrentPage = CLng(Request("page"))
		Else
			CurrentPage = 1
		End If
		SoftType = Newasp.CheckStr(Request("type"))
		Response.Write CreateBestDown(2)
	End Sub
	'================================================
	'过程名:ShowSoftType
	'作  用:显示软件类型
	'================================================
	Public Sub ShowHotDownload()
		On Error Resume Next
		Newasp.PreventInfuse
		If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
			Response.Write ("错误的系统参数!请输入整数")
			Response.End
		End If
		If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
			CurrentPage = CLng(Request("page"))
		Else
			CurrentPage = 1
		End If
		SoftType = Newasp.CheckStr(Request("type"))
		Response.Write CreateBestDown(3)
	End Sub
	'================================================
	'过程名:CreateBestDown
	'作  用:最新推荐下载列表
	'================================================
	Public Function CreateBestDown(t)
		On Error Resume Next
		Dim HtmlFileName, SQL1, SQL2
		
		skinid = CLng(Newasp.ChannelSkin)
		Newasp.LoadTemplates ChannelID, 5, skinid
		HtmlFilePath = Newasp.InstallDir & Newasp.ChannelDir & "special/"
		HtmlContent = Newasp.HtmlContent
		HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir)
		HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
		HtmlContent = Replace(HtmlContent, "{$ModuleName}", Newasp.ModuleName)
		HtmlContent = Replace(HtmlContent, "{$SoftIndex}", strIndexName)
		'HtmlContent = Replace(HtmlContent, "{$PageTitle}", "推荐" & Newasp.ModuleName)
		If CInt(t) = 1 Then
			strClassName = Newasp.HtmlSetting(9)
			HtmlContent = Replace(HtmlContent, "{$PageTitle}", Newasp.HtmlSetting(9))
			PageType = 3
			SQL1 = "And IsBest>0"
			SQL2 = "And A.IsBest>0 ORDER BY A.isTop DESC, A.SoftTime DESC ,A.SoftID DESC"
		ElseIf CInt(t) = 2 Then
			Dim Channel_Setting, strSoftType, SelectedType, i
			Channel_Setting = Split(Newasp.Channel_Setting, "|||")(2)
			strSoftType = Split(Channel_Setting, ",")
			SelectedType = "<select name=""type"" size=""1"" style=""font-size: 9pt"" onChange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & vbNewLine
			SelectedType = SelectedType & "<option value=""showtype.asp"">全部" & Newasp.ModuleName & "</option>" & vbNewLine
			For i = 0 To UBound(strSoftType)
				SelectedType = SelectedType & "<option value=""showtype.asp?type=" & strSoftType(i) & """"
				If Trim(strSoftType(i)) = Trim(SoftType) Then SelectedType = SelectedType & " selected"
				SelectedType = SelectedType & ">" & strSoftType(i) & "</option>" & vbNewLine
			Next
			SelectedType = SelectedType & "<select>" & vbNewLine
			HtmlContent = Replace(HtmlContent, "{$SelectedType}", SelectedType)
			If Trim(SoftType) <> "" Then
				strClassName = SoftType
				HtmlContent = Replace(HtmlContent, "{$PageTitle}", SoftType)
				PageType = 6
				SQL1 = "And SoftType='" & SoftType & "'"
				SQL2 = "And A.SoftType='" & SoftType & "' ORDER BY A.isTop DESC, A.SoftTime DESC ,A.SoftID DESC"
			Else
				strClassName = "全部" & Newasp.ModuleName & "类型"
				HtmlContent = Replace(HtmlContent, "{$PageTitle}", Newasp.ModuleName & "类型")
				PageType = 6
				SQL1 = ""
				SQL2 =  " ORDER BY A.isTop DESC, A.SoftTime DESC ,A.SoftID DESC"
			End If
		ElseIf CInt(t) = 3 Then
			strClassName = Newasp.HtmlSetting(10)
			HtmlContent = Replace(HtmlContent, "{$PageTitle}", Newasp.HtmlSetting(10))
			PageType = 3
			SQL1 = "And AllHits > " & CLng(Newasp.LeastHotHist)
			SQL2 = "And A.AllHits > " & CLng(Newasp.LeastHotHist) & " ORDER BY A.AllHits DESC, A.SoftTime DESC ,A.SoftID DESC"
		Else
			strClassName = Newasp.HtmlSetting(8)
			HtmlContent = Replace(HtmlContent, "{$PageTitle}", Newasp.HtmlSetting(8))
			PageType = 3
			SQL1 = vbNullString
			SQL2 = "ORDER BY A.isTop DESC, A.SoftTime DESC ,A.SoftID DESC"
		End If
		Call ReplaceString
		maxperpage = CLng(Newasp.HtmlSetting(1))
		If CLng(CurrentPage) = 0 Then CurrentPage = 1
		'记录总数
		TotalNumber = Newasp.Execute("SELECT COUNT(SoftID) FROM NC_SoftList WHERE ChannelID = " & ChannelID & " And isAccept > 0  " & SQL1 & "")(0)
		If TotalNumber >= CLng(Newasp.HtmlSetting(4)) Then TotalNumber = CLng(Newasp.HtmlSetting(4))
		TotalPageNum = CLng(TotalNumber / maxperpage)  '得到总页数
		If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
		If CurrentPage < 1 Then CurrentPage = 1
		If CurrentPage > TotalPageNum Then CurrentPage = TotalPageNum
		Set Rs = CreateObject("ADODB.Recordset")

		SQL = "SELECT TOP " & CLng(Newasp.HtmlSetting(4)) & " A.SoftID,A.ClassID,A.ColorMode,A.FontMode,A.SoftName,A.SoftVer,A.content,A.Related,A.SoftType,A.RunSystem,A.impower,A.SoftSize,A.star,A.SoftTime,A.username,A.IsTop,A.IsBest,A.Allhits,A.SoftImage,A.HtmlFileDate,C.ClassName,C.HtmlFileDir,C.UseHtml FROM [NC_SoftList] A INNER JOIN [NC_Classify] C ON A.ClassID=C.ClassID where A.ChannelID=" & ChannelID & " And A.isAccept > 0  " & SQL2
		If isSqlDataBase = 1 Then
			Set Rs = Newasp.Exe

⌨️ 快捷键说明

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