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

📄 soft_down.asp

📁 深度学习整站系统 v1.10 1、将整个目录上传到虚拟空间
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/connDB.asp" -->
<%

if(Request.QueryString("fSoftID") <> "") then Command1__MM_SoftHits = Request.QueryString("fSoftID")

%>
<%
Dim RsSiteConfig
Dim RsSiteConfig_numRows

Set RsSiteConfig = Server.CreateObject("ADODB.Recordset")
RsSiteConfig.ActiveConnection = MM_connDB_STRING
RsSiteConfig.Source = "SELECT * FROM tSiteConfig"
RsSiteConfig.CursorType = 0
RsSiteConfig.CursorLocation = 2
RsSiteConfig.LockType = 1
RsSiteConfig.Open()

RsSiteConfig_numRows = 0
%>
<%
Dim RsSoft__MMColParam
RsSoft__MMColParam = "1"
If (Request.QueryString("fSoftID") <> "") Then 
  RsSoft__MMColParam = Request.QueryString("fSoftID")
End If
%>
<%
Dim RsSoft
Dim RsSoft_numRows

Set RsSoft = Server.CreateObject("ADODB.Recordset")
RsSoft.ActiveConnection = MM_connDB_STRING
RsSoft.Source = "SELECT fSoftID, fHits FROM tSoft WHERE fSoftID = " + Replace(RsSoft__MMColParam, "'", "''") + ""
RsSoft.CursorType = 0
RsSoft.CursorLocation = 2
RsSoft.LockType = 1
RsSoft.Open()

RsSoft_numRows = 0
%>
<%

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_connDB_STRING
Command1.CommandText = "UPDATE tSoft  SET fHits =fHits+1  WHERE fSoftID =" + Replace(Command1__MM_SoftHits, "'", "''") + ""
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>
<%
From_url = Cstr(Request.ServerVariables("HTTP_REFERER"))
Serv_url = Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(From_url,8,len(Serv_url)) <> Serv_url then
response.write "<p>&nbsp; </p><p>&nbsp; </p><p>&nbsp; </p><div align='center'><b><p>请勿非法盗链或下载本站软件!</p></b>"
response.write "<p>3秒钟后系统将自动返回首页......</p>"
response.write "<p><a href='"&(RsSiteConfig.Fields.Item("fSiteUrl").Value)&"/'>"&(RsSiteConfig.Fields.Item("fSiteUrl").Value)&"</a></p>"
response.write "<p>本站软件做了防盗链处理,请从本站的软件下载页面进入下载本软件!而不要直接在浏览器的地址栏输入下载地址。</div></p>"
response.write "<meta http-equiv=refresh content=3;url=http://www.deepteach.com/>"
response.end
end if

Function GetFileName(longname)		'/folder1/folder2/file.asp=>file.asp
while instr(longname,"/")
  longname = right(longname,len(longname)-1)
wend
GetFileName = longname
End Function

Dim Stream
Dim Contents
Dim FileName
Dim TrueFileName
Dim FileExt
Const adTypeBinary = 1
FileName = Request.QueryString("FileName")
if FileName = "" Then
    Response.Write "无效文件名!"
    Response.End
End if
FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
    Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
        Response.Write "非法操作!"
        Response.End
End Select
Response.Clear
Response.AddHeader "content-disposition", "attachment; filename=" & GetFileName(Request.QueryString("FileName"))
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
if lcase(right(FileName,3))="rar" then		'设置文件类型
TrueFileName = (RsSiteConfig.Fields.Item("fSaveUpFilesPath").Value)& FileName 			'设置文件目录的相对路径
end if 
Stream.LoadFromFile Server.MapPath(TrueFileName)
While Not Stream.EOS
    Response.BinaryWrite Stream.Read(1024 * 64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
%>
<%
RsSiteConfig.Close()
Set RsSiteConfig = Nothing
%>
<%
RsSoft.Close()
Set RsSoft = Nothing
%>

⌨️ 快捷键说明

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