www.gusucode.com > 艺术签名文章资讯网源代码 > 艺术签名文章资讯网源代码/624/flash/down.asp
<!--#include file="config.asp" --> <% Dim Rs,SQL,HtmlContent Dim ChannelRootDir,strInstallDir,strIndexName Dim flashid,downid,showurl,ErrMsg Dim strTitle,strAddress,addTime Dim AllHits,Introduce,filesize Dim HtmlFileUrl,strUrl,strBasicPath Newasp.ReadChannel(ChannelID) If Newasp.BindDomain = "0" Then ChannelRootDir = Newasp.InstallDir & Newasp.ChannelDir strBasicPath = "" strInstallDir = Newasp.InstallDir Else ChannelRootDir = "/" strInstallDir = Newasp.SiteUrl & "/" If Len(Newasp.NamedPath) > 2 Then strBasicPath = Newasp.NamedPath Else strBasicPath = Server.MapPath(Newasp.InstallDir & Newasp.ChannelDir) End If End If ubb.BasePath = ChannelRootDir ubb.setUbbcode = Join(Newasp.setUserEditor,"|") ubb.Keyword = Newasp.ContentKeyword strIndexName = "<a href=""" & ChannelRootDir & """>" & Newasp.ChannelName & "</a>" flashid = Newasp.ChkNumeric(Request.Querystring("id")) If flashid = 0 Then OutAlertScript("错误的系统参数!请输入正确的软件ID") Response.End End If Newasp.LoadTemplates ChannelID, 6, Newasp.ChannelSkin 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, "{$IndexTitle}", strIndexName) HtmlContent = Replace(HtmlContent, "{$FlashIndex}", strIndexName) HtmlContent = ReadClassMenu(HtmlContent) HtmlContent = ReadClassMenubar(HtmlContent) HtmlContent = HTML.ReadAnnounceList(HtmlContent) HtmlContent = HTML.ReadStatistic(HtmlContent) HtmlContent = HTML.ReadUserRank(HtmlContent) SQL = "SELECT A.flashid,A.ClassID,A.title,A.Introduce,A.filesize,A.downid,A.showurl,A.addTime,A.AllHits,A.HtmlFileDate,A.DownAddress,C.HtmlFileDir FROM NC_FlashList A INNER JOIN [NC_Classify] C On A.ClassID=C.ClassID WHERE A.ChannelID="& ChannelID &" And A.isAccept > 0 And A.flashid=" & flashid Set Rs = Newasp.Execute(SQL) If Rs.EOF And Rs.BOF Then ErrMsg = ErrMsg & "<li>对不起~!没有找到你想下载的软件。</li>" Returnerr(ErrMsg) Set Rs = Nothing Response.End Else strTitle = Rs("title") strAddress = Newasp.ChkNull(Rs("DownAddress")) showurl = Newasp.ChkNull(Rs("showurl")) addTime = Rs("addTime") AllHits = Rs("AllHits") downid = Rs("downid") Introduce = ubb.Ubbcode(Rs("Introduce")) If CLng(Rs("filesize")) > 0 Then filesize = NewCloud.Readfilesize(Rs("fileSize")) Else filesize = "未知大小" End If If CInt(Newasp.IsCreateHtml) <> 0 Then HtmlFileUrl = Newasp.ReadDestination(Newasp.InfoDestination, Newasp.ChannelDir, Rs("HtmlFileDate"),Rs("HtmlFileDir"),Rs("ClassID"),Rs("flashid"),1,"") strUrl = HtmlFileUrl Else If IsURLRewrite Then strUrl = ChannelRootDir & Rs("flashid") & Newasp.HtmlExtName Else strUrl = ChannelRootDir & "show.asp?id="& Rs("flashid") End If End If End If Rs.Close:Set Rs = Nothing HtmlContent = Replace(HtmlContent, "{$PageTitle}", strTitle) HtmlContent = Replace(HtmlContent, "{$FlashTitle}", strTitle) HtmlContent = Replace(HtmlContent, "{$strUrl}", strUrl) HtmlContent = Replace(HtmlContent, "{$DateAndTime}", addTime) HtmlContent = Replace(HtmlContent, "{$FleshSize}", filesize) HtmlContent = Replace(HtmlContent, "{$AllHits}", AllHits) HtmlContent = Replace(HtmlContent, "{$Introduce}", Introduce) HtmlContent = Replace(HtmlContent, "{$ShowDownAddress}", ShowDownAddress()) HtmlContent = Replace(HtmlContent, "{$FlashTitle}", strTitle) HtmlContent = Replace(HtmlContent, "{$FlashID}", flashid) HtmlContent = Replace(HtmlContent, "{$flashid}", flashid) HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir) HtmlContent = Replace(HtmlContent, "{$SkinPath}", Newasp.SkinPath) HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir) HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID) Response.Write HtmlContent Set NewCloud = Nothing Public Function ShowDownAddress() On Error Resume Next Dim rsDown,strDownAddress Dim i,DownloadPath strDownAddress = "" If Len(showurl) > 3 Then strDownAddress = Newasp.HtmlSetting(3) strDownAddress = Replace(strDownAddress, "{$DownLoadName}", "点击立即下载") If CInt(Newasp.HtmlSetting(1)) > 0 Then strDownAddress = Replace(strDownAddress, "{$DownLoadUrl}", NewCloud.FormatShowUrl(showurl)) Else strDownAddress = Replace(strDownAddress, "{$DownLoadUrl}", "downfile.asp?url=" & showurl) End If End If If Len(strAddress) > 3 Then Set rsDown = Newasp.Execute("SELECT downid,DownloadName,DownloadPath,IsDisp FROM NC_DownServer WHERE ChannelID=" & ChannelID & " And depth=1 And rootid =" & downid & " And isLock=0 ORDER BY orders ASC") If Not (rsDown.BOF And rsDown.EOF) Then i = 0 Do While Not rsDown.EOF If rsDown("IsDisp") > 0 Then DownloadPath = rsDown("DownloadPath") & strAddress Else DownloadPath = "download.asp?id=" & flashid & "&downid=" & rsDown("downid") End If strDownAddress = strDownAddress & Newasp.HtmlSetting(3) strDownAddress = Replace(strDownAddress, "{$DownLoadUrl}", DownloadPath) strDownAddress = Replace(strDownAddress, "{$DownLoadName}", rsDown("DownloadName")) rsDown.MoveNext i = i + 1 Loop Else strDownAddress = strDownAddress & Newasp.HtmlSetting(3) strDownAddress = Replace(strDownAddress, "{$DownLoadName}", "点击立即下载") If CInt(Newasp.HtmlSetting(1)) > 0 Then strDownAddress = Replace(strDownAddress, "{$DownLoadUrl}", strAddress) Else strDownAddress = Replace(strDownAddress, "{$DownLoadUrl}", "download.asp?id=" & flashid & "&downid=0") End If End If Set rsDown = Nothing End If ShowDownAddress = strDownAddress End Function CloseConn %>