softchannel.asp

来自「小游戏网站演示www.4399.io 拥有4万条游戏数据」· ASP 代码 · 共 1,455 行 · 第 1/5 页

ASP
1,455
字号
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
		HtmlContent = Replace(HtmlContent, "{$DownAddress}", DownloadAddress)
		HtmlContent = Replace(HtmlContent, "{$RegsiteUrl}", strRegsite)
		HtmlContent = Replace(HtmlContent, "{$Author}", strAuthor)
		HtmlContent = Replace(HtmlContent, "{$SoftImage}", SoftImage)
		HtmlContent = Replace(HtmlContent, "{$Previewimg}", Previewimg)
		HtmlContent = Replace(HtmlContent, "{$PreviewUrl}", PreviewUrl)
		HtmlContent = Replace(HtmlContent, "{$HomePage}", HomePage)
		HtmlContent = Replace(HtmlContent, "{$HomePageUrl}", HomePageUrl)
		HtmlContent = Replace(HtmlContent, "{$Contact}", strContact)
		HtmlContent = Replace(HtmlContent, "{$Decode}", strDecode)
		HtmlContent = Replace(HtmlContent, "{$MemberSoft}", MemberSoft)
		HtmlContent = Replace(HtmlContent, "{$SoftID}", Rs("SoftID"))
		HtmlContent = Replace(HtmlContent, "{$ClassName}", Rs("ClassName")&"")
		HtmlContent = Replace(HtmlContent, "{$SoftName}", softname)
		HtmlContent = Replace(HtmlContent, "{$SoftwareNames}", Rs("softname"))
		HtmlContent = Replace(HtmlContent, "{$SoftVer}", Rs("softver") & "")
		HtmlContent = Replace(HtmlContent, "{$SubTitle}", subtitle)
		HtmlContent = Replace(HtmlContent, "{$SoftContent}", SoftIntro)
		HtmlContent = Replace(HtmlContent, "{$ThisUrl}", ThisUrl)
		HtmlContent = Replace(HtmlContent, "{$SoftTime}", Rs("SoftTime")&"")
		HtmlContent = Replace(HtmlContent, "{$UserName}", Rs("username")&"")
		HtmlContent = Replace(HtmlContent, "{$Language}", Rs("Languages")&"")
		HtmlContent = Replace(HtmlContent, "{$SoftType}", Rs("SoftType")&"")
		HtmlContent = Replace(HtmlContent, "{$RunSystem}", Rs("RunSystem")&"")
		HtmlContent = Replace(HtmlContent, "{$RunSystems}", Newasp.GotTopic(Rs("RunSystem")&"",30))
		HtmlContent = Replace(HtmlContent, "{$Impower}", Rs("impower")&"")
		HtmlContent = Replace(HtmlContent, "{$Star}", Rs("star")&"")
		HtmlContent = Replace(HtmlContent, "{$IsBest}", Rs("IsBest"))
		HtmlContent = Replace(HtmlContent, "{$IsTop}", Rs("IsTop"))
		HtmlContent = Replace(HtmlContent, "{$Regsite}", Rs("Regsite")&"")
		HtmlContent = Replace(HtmlContent, "{$PreviewPic}", strPreviewImg)
		HtmlContent = Replace(HtmlContent, "{$showreg}", Rs("showreg")&"")
		HtmlContent = Replace(HtmlContent, "{$PointNum}", Rs("PointNum")&"")
		HtmlContent = Replace(HtmlContent, "{$SoftPrice}", Rs("SoftPrice")&"")
		HtmlContent = Replace(HtmlContent, "{$SoftSize}", ReadSoftsize(Rs("SoftSize")))
		HtmlContent = Replace(HtmlContent, "{$FileSize}", CCur(Rs("SoftSize")))
		HtmlContent = Replace(HtmlContent, "{$HeadTitle}", Trim(Rs("SoftName")))
		
		HtmlContent = GetDescription(HtmlContent, SoftIntro)
		If InStr(HtmlContent, "{$Description}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$Description}", Newasp.CutString(SoftIntro,190))
		End If
		If InStr(HtmlContent, "{$FrontSoft}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$FrontSoft}", FrontSoft(softid))
		End If
		If InStr(HtmlContent, "{$NextSoft}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$NextSoft}", NextSoft(softid))
		End If
		If InStr(HtmlContent, "{$RelatedSoft}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$RelatedSoft}", RelatedSoft(Rs("Related"), Rs("SoftName"), Rs("SoftID")))
		End If
		If InStr(HtmlContent, "{$ShowHotSoft}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$ShowHotSoft}", ShowHotSoft(Rs("ClassID")))
		End If
		If InStr(HtmlContent, "{$SoftComment}") > 0 Then
			HtmlContent = Replace(HtmlContent, "{$SoftComment}", SoftComment(Rs("SoftID")))
		End If
		m_intPlugin = Rs("plugin")
		Select Case m_intPlugin
			Case 1 : m_strPluginInfo = Newasp.HtmlSetting(29)
			Case 2 : m_strPluginInfo = Newasp.HtmlSetting(30)
			Case 3 : m_strPluginInfo = Newasp.HtmlSetting(31)
			Case 4 : m_strPluginInfo = Newasp.HtmlSetting(32)
			Case 5 : m_strPluginInfo = Newasp.HtmlSetting(33)
			Case 6 : m_strPluginInfo = Newasp.HtmlSetting(34)
			Case 7 : m_strPluginInfo = Newasp.HtmlSetting(35)
			Case Else
			m_strPluginInfo = Newasp.HtmlSetting(28)
		End Select
		
		HtmlContent = Replace(HtmlContent, "{$Plugin}", m_intPlugin)
		HtmlContent = Replace(HtmlContent, "{$PluginInfo}", m_strPluginInfo & "")
		HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir)
		HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
		HtmlContent = Replace(HtmlContent, "{$SoftIndex}", strIndexName)
		HtmlContent = Replace(HtmlContent, "{$IndexTitle}", strIndexName)
		HtmlContent = Replace(HtmlContent, "{$ModuleName}", Newasp.ModuleName)
		HtmlContent = Replace(HtmlContent, "{$PageTitle}", Trim(Rs("SoftName") & " " & Rs("SoftVer")))
		HtmlContent = Replace(HtmlContent, "{$ClassID}", Rs("ClassID"))
		HtmlContent = Replace(HtmlContent, "{$SoftID}", softid)
		HtmlContent = Replace(HtmlContent, "{$supsoftid}", Newasp.Supplemental(softid,6))
		HtmlContent = HTML.ReadCurrentStation(HtmlContent, ChannelID, Rs("ClassID"), Rs("ClassName"), Rs("ParentID"), Rs("ParentStr"), Rs("HtmlFileDir"))
		HtmlContent = HTML.ReadAnnounceContent(HtmlContent, ChannelID)
		HtmlContent = ReadClassMenubar(HtmlContent)
		HtmlContent = ReadClassMenu(HtmlContent)
		HtmlContent = Replace(HtmlContent, "{$Classify}", Trim(HTML.CurrentClass))
		HtmlContent = Replace(HtmlContent, "{$CurrentClass}", HTML.CurrentClass)
		If len(subtitle) = 0 Then
			HeaderTitle = Trim(HTML.CurrentClass)
			HeaderTitles = ""
			HeaderTopic = Newasp.SiteName
		Else
			HeaderTitle = subtitle
			HeaderTitles = " - " & subtitle
			HeaderTopic = subtitle
		End If
		RandomCodes = GetRandomizeCode
		HtmlContent = Replace(HtmlContent, "{$RandomCodes}", RandomCodes)
		HtmlContent = Replace(HtmlContent, "{$HeaderTitle}", HeaderTitle)
		HtmlContent = Replace(HtmlContent, "{$HeaderTitles}", HeaderTitles)
		HtmlContent = Replace(HtmlContent, "{$HeaderTopic}", HeaderTopic)
		HtmlContent = Replace(HtmlContent, "{$ParentClass}", HTML.ParentClass)
		HtmlContent = HTML.ReadPopularSoft(HtmlContent)
		HtmlContent = HTML.ReadSoftPic(HtmlContent)
		HtmlContent = HTML.ReadSoftList(HtmlContent)
		HtmlContent = HTML.ReadFlashList(HtmlContent)
		HtmlContent = HTML.ReadFlashPic(HtmlContent)
		HtmlContent = HTML.ReadArticleList(HtmlContent)
		HtmlContent = HTML.ReadArticlePic(HtmlContent)
		HtmlContent = HTML.LoadCommentGrade(HtmlContent, ChannelID, softid)
		HtmlContent = Replace(HtmlContent, "{$SkinPath}", Newasp.SkinPath)
		HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
		HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
		If CreateHtml <> 0 Then
			Call CreateSoftIntro
		Else
			ReadSoftIntro = HtmlContent
		End If
		Rs.Close: Set Rs = Nothing
	End Function
	'=================================================
	'函数名:CreateSoftIntro
	'作  用:生成软件内容
	'参  数:SoftID ----软件ID
	'=================================================
	Private Sub CreateSoftIntro()
		Dim HtmlFileName
		HtmlFileName = Newasp.ReadDestination(Newasp.InfoDestination, Newasp.ChannelDir, Rs("HtmlFileDate"),Rs("HtmlFileDir"),Rs("ClassID"),Rs("softid"),1,"")
		HtmlFilePath = Newasp.HtmlFilesPath
		Newasp.CreatPathEx (strBasicPath & HtmlFilePath)
		Newasp.CreatedTextFile strBasicPath & HtmlFileName, HtmlContent
		If IsShowFlush = 1 Then Response.Write "<li style=""font-size: 12px;"">生成" & Newasp.ModuleName & "信息HTML完成... <a href=" & HtmlFileName & " target=_blank>" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
		Response.Flush
	End Sub
	Public Function GetDescription(ByVal str,ByVal strIntro)
		Dim strTemp, i
		Dim sTempContent, nTempContent
		Dim arrTempContent, arrTempContents, strLen
		If Len(strIntro) = 0 Then
			GetDescription = str
			Exit Function
		End If
		strTemp = str
		If InStr(strTemp, "{$Description(") > 0 Then
			sTempContent = Newasp.CutMatchContent(strTemp, "{$Description(", ")}", 1)
			nTempContent = Newasp.CutMatchContent(strTemp, "{$Description(", ")}", 0)
			arrTempContents = Split(sTempContent, "|||")
			arrTempContent = Split(nTempContent, "|||")
			
			For i = 0 To UBound(arrTempContents)
				strLen = Newasp.ChkNumeric(arrTempContent(i))
				If strLen > 0 Then
					strTemp = Replace(strTemp, arrTempContents(i), Newasp.CutString(strIntro,strLen))
				Else
					strTemp = Replace(strTemp, arrTempContents(i), ChkDescription(strIntro))
				End If
			Next
		End If
		GetDescription = strTemp
	End Function
	Public Function ChkDescription(ByVal str)
		Dim re,strHtml
		strHtml = str
		Set re = New RegExp
		re.IgnoreCase = True
		re.Global = True
		re.Pattern = "\[br\]"
		strHtml = re.Replace(strHtml, "")
		re.Pattern = "\[align=right\](.*)\[\/align\]"
		strHtml = re.Replace(strHtml, "")
		re.Pattern = "([\f\n\r\t\v])"
		strHtml = re.Replace(strHtml, "")
		re.Pattern = "<(.[^>]*)>"
		strHtml = re.Replace(strHtml, "")
		Set re = Nothing
		strHtml = Replace(strHtml, "&nbsp;", "")
		strHtml = Replace(strHtml, "====", "")
		strHtml = Replace(strHtml, "----", "")
		strHtml = Replace(strHtml, "////", "")
		strHtml = Replace(strHtml, "\\\\", "")
		strHtml = Replace(strHtml, "####", "")
		strHtml = Replace(strHtml, "@@@@", "")
		strHtml = Replace(strHtml, "****", "")
		strHtml = Replace(strHtml, "~~~~", "")
		strHtml = Replace(strHtml, "≡≡≡", "")
		strHtml = Replace(strHtml, "++++", "")
		strHtml = Replace(strHtml, "::::", "")
		strHtml = Replace(strHtml, " ", "")
		strHtml = Replace(strHtml, Chr(9), "")
		strHtml = Replace(strHtml, Chr(10), "")
		strHtml = Replace(strHtml, Chr(34), "&quot;")
		strHtml = Replace(strHtml, Chr(39), "&#39;")
		strHtml = Replace(strHtml, "[InstallDir_ChannelDir]", "")
		strHtml = Replace(strHtml, "[NextPage]", "")
		strHtml = Replace(strHtml, "[Page_Break]", "")
		ChkDescription = strHtml
	End Function
	
	'================================================
	'函数名:ShowDownAddress
	'作  用:显示软件下载地址
	'参  数:SoftID ----软件ID
	'================================================
	Private Function ShowDownAddress(softid)
		Dim rsAddress, sqlAddress, rsDown,softname
		Dim SoftNameStr,DownloadName, DownloadPath
		Dim DownAddress,strDownAddress,showdown,DownText,selfont
		Dim ii,foundstr,n,m_intType
		showdown = Newasp.ChkNumeric(Newasp.HtmlSetting(28))
		If Rs("PauseDown") > 0 Then
			ShowDownAddress = Newasp.HtmlSetting(22)
			Exit Function
		End If
		If IsRandomAddress Then
			If IsSqlDataBase = 1 Then
				foundstr = " ORDER BY IsOuter DESC, newid()"
			Else
				foundstr = " ORDER BY IsOuter DESC, rnd(A.downid)"
			End If
		Else
			foundstr = " ORDER BY orders ASC"
		End If
		ii = 0
		n = 0
		softname = Trim(Rs("SoftName") & " " & Rs("SoftVer"))
		m_intType = Newasp.ChkNumeric(Newasp.HtmlSetting(26))
		If m_intType <> 1 Then
			Set rsDown = Newasp.Execute("SELECT id,downid,DownFileName,DownText FROM [NC_DownAddress] WHERE softid=" & CLng(softid))
			If Not (rsDown.BOF And rsDown.EOF) Then
				Do While Not rsDown.EOF
					ii = ii + 1
					DownText = rsDown("DownText") & ""
					If Len(DownText) = 0 Then DownText = "立即下载"
					If InStr(DownText, "{$") > 0 Then
						DownAddress = DownText
					Else
						'---- 如果使用了下载服务器,就打开下载服务器数据表
						If rsDown("downid") > 0 Then
							sqlAddress = "SELECT downid,DownloadName,DownloadPath,IsDisp,UserGroup,DownPoint,IsOuter,selfont FROM NC_DownServer WHERE ChannelID=" & ChannelID & " And depth=1 And rootid =" & rsDown("downid") & " And isLock=0 " & foundstr
							Set rsAddress = Newasp.Execute(sqlAddress)
							If Not(rsAddress.EOF And rsAddress.BOF) Then
								Do While Not rsAddress.EOF
									DownAddress = DownAddress & Newasp.HtmlSetting(21)
									'---- 是否直接显示软件直接的下载地址
									If rsAddress("IsDisp") <> 1 Or rsAddress("IsOuter") > 1  Then
										If m_intType = 2 Then
											If IsURLRewrite Then
												DownloadPath = ChannelRootDir & softid & "_" & rsAddress("downid") & "_" & rsDown(0) & "_1" & Newasp.HtmlExtName
											Else
												DownloadPath = ChannelRootDir & "softdown.asp?softid=" & softid & "&downid=" & rsAddress("downid") & "&n=" & rsDown(0) & "&type=1"
											End If
										Else
											DownloadPath = ChannelRootDir & "download.asp?softid=" & softid & "&downid=" & rsAddress("downid") & "&id=" & rsDown(0)
										End If
									Else
										If rsAddress("IsOuter") <> 1 Then
											DownloadPath = Trim(rsAddress("DownloadPath") & rsDown(2))
										Else
											DownloadPath = Trim(rsAddress("DownloadPath"))
										End If
									End If
									selfont = rsAddress("selfont") & ""
									If InStr(DownText, "###") > 0 Then
										DownloadName = Replace(rsAddress("DownloadName"), "{$SoftName}", DownText)
										DownloadName = Replace(DownloadName, "{$Soft_Name}", DownText)
										DownloadName = Replace(DownloadName, "###", "")
										DownAddress = Replace(DownAddress, "{$Soft_Name}", DownText)
										DownAddress = Replace(DownAddress, "{$show}", 1)
										DownAddress = Replace(DownAddress, "{$Title}", DownText)
									Else
										DownloadName = rsAddress("DownloadName") & ""
										DownloadName = Replace(DownloadName, "{$Soft_Name}", "")
										DownAddress = Replace(DownAddress, "{$Soft_Name}", "")
										DownAddress = Replace(DownAddress, "{$show}", 0)
										DownAddress = Replace(DownAddress, "{$Title}", SoftName)
									End If
									If Len(selfont) > 8 Then
										DownloadName = "<span " & selfont & ">" & DownloadName & "</span>"
									End If
									If rsAddress("UserGroup") > 0 Then
										DownloadName = Replace(DownloadName, "{$DownPoint}", rsAddress("DownPoint"))
									Else
										DownloadName = Replace(DownloadName, "{$DownPoint}", 0)
									End If
									DownloadName = Replace(DownloadName, "{$DownText}", DownText)
									DownloadName = Replace(DownloadName, "{$SoftName}", softname)
									DownAddress = Replace(DownAddress, "{$ii}", ii)
									DownAddress = Replace(DownAddress, "{$downid}", rsAddress("downid"))
									DownAddress = Replace(DownAddress, "{$DownLoadUrl}", DownloadPath)

⌨️ 快捷键说明

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