📄 downdown.asp
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/function.asp"-->
<%
'//版权所有:野草设计
'//程序作者:野草
'//当前版本:V2.0
'//联系QQ:94440079
'//官方网站:http://www.yecaoweb.com
%>
<%
call yecaosql()
url1=Cstr(Request.ServerVariables("HTTP_REFERER"))
url2=Cstr(Request.ServerVariables("SERVER_NAME"))
dim myid,mynum
myid=YC_post("下载ID",request.querystring("id"),1,0,0)
mynum=YC_post("下载个数ID",request.querystring("num"),1,0,0)
if mid(url1,8,len(url2))<>url2 then
YC("<html><title>禁止下载</title>")
YCGO("error.asp?action=stop&text="&server.urlencode("禁止下载!"))
response.end
end if
if isnull(myid) then
YCGO("error.asp?action=stop&text="&server.urlencode("您的操作有误哦!"))
response.end
end if
YC_sql("update [YC_down] set downclick=downclick+1 where id="&myid)
sql="select title,exper,url,reads from [YC_down] where id="&myid
set rs=conn.execute(sql)
dim down(2)
down(0)=rs("title")
down(1)=split(rs("url"),"|")(mynum)
call godown()
sub godown()
if lcase(left(down(1),7))="http://" or lcase(left(down(1),6))="ftp://" then
YCGO(down(1))
else
Response.Clear
Response.ContentType="application/ms-download"
Response.AddHeader"content-disposition","attachment;filename="&down(0)&""&Mid(down(1),InStrRev(down(1),"."))&""
Set Stream=server.CreateObject("ADODB.Stream")
Stream.Type=1
Stream.Open
Stream.LoadFromFile Server.MapPath(down(1))
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024*64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
end if
end sub
call closedata()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -