附件管理整合版(防盗链)
作者:情留メ蚊子 日期:2009-01-03
打开:Action.asp
在
复制内容到剪贴板
程序代码
程序代码<%
复制内容到剪贴板
程序代码
程序代码<!--#include file="control/f_control.asp" -->
在 set checkcdb=nothing 下面添加
复制内容到剪贴板
程序代码
程序代码ElseIf request("action") = "Antidown" or request("action") = "Antimdown" then
dim down, showdownstr, id
response.expires=-1
response.expiresabsolute=now()-1
response.cachecontrol="no-cache"
id = request("id")
id = split(id,"&")(0)
Set down = conn.execute("select FilesPath,FilesCounts from blog_Files where id="&id)
response.clear()
If request("action") = "Antimdown" and memName = empty Then
showdownstr = getFileIcons(getFileInfo(down(0))(9))&" 该文件只允许会员下载! <a href=""login.asp"" accesskey=""L"">登录</a> | <a href=""register.asp"">注册</a>"
Else
showdownstr = getFileIcons(getFileInfo(down(0))(9))&" <a href="""&request("downurl")&""" target=""_blank"">"&trim(checkstr(request("main")))&" </a>[该附件大小 <font color=red>"&getFileInfo(down(0))(0)&"</font> ; 更新于 <font color=red>"&Datetostr(getFileInfo(down(0))(10),"Y-m-d")&"</font> ; 已被下载 <font color=red>"&down(1)&"</font> 次]"
End If
response.write showdownstr
dim down, showdownstr, id
response.expires=-1
response.expiresabsolute=now()-1
response.cachecontrol="no-cache"
id = request("id")
id = split(id,"&")(0)
Set down = conn.execute("select FilesPath,FilesCounts from blog_Files where id="&id)
response.clear()
If request("action") = "Antimdown" and memName = empty Then
showdownstr = getFileIcons(getFileInfo(down(0))(9))&" 该文件只允许会员下载! <a href=""login.asp"" accesskey=""L"">登录</a> | <a href=""register.asp"">注册</a>"
Else
showdownstr = getFileIcons(getFileInfo(down(0))(9))&" <a href="""&request("downurl")&""" target=""_blank"">"&trim(checkstr(request("main")))&" </a>[该附件大小 <font color=red>"&getFileInfo(down(0))(0)&"</font> ; 更新于 <font color=red>"&Datetostr(getFileInfo(down(0))(10),"Y-m-d")&"</font> ; 已被下载 <font color=red>"&down(1)&"</font> 次]"
End If
response.write showdownstr
打开:common/ubbcode.asp 找到
复制内容到剪贴板
程序代码
程序代码re.Pattern = "\[down=(.[^\]]*)\](.[^\[]*)\[\/down]"
复制内容到剪贴板
程序代码
程序代码 dim rndnum11, rndnum22, rndnum33, rndnum44
re.Pattern = "\[down=(download\.asp\?id=)(.[^\[]*)\](.[^\[]*)\[\/down]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
tmpStr3 = strMatch.SubMatches(2)
rndnum11 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""down_"&rndnum11&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antidown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode(tmpStr3)&"','down_"&rndnum11&"','down_"&rndnum11&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[down\](download\.asp\?id=)(.[^\[]*)\[\/down\]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
rndnum22 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""down_"&rndnum22&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antidown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode("点击下载此文件")&"','down_"&rndnum22&"','down_"&rndnum22&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[mDown=(download\.asp\?id=)(.[^\[]*)\](.[^\[]*)\[\/mDown]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
tmpStr3 = strMatch.SubMatches(2)
rndnum33 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""mdown_"&rndnum33&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antimdown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode(tmpStr3)&"','mdown_"&rndnum33&"','mdown_"&rndnum33&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[mDown\](download\.asp\?id=)(.[^\[]*)\[\/mDown]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
rndnum44 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""mdown_"&rndnum44&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antimdown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode("点击下载此文件")&"','mdown_"&rndnum44&"','mdown_"&rndnum44&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[down=(download\.asp\?id=)(.[^\[]*)\](.[^\[]*)\[\/down]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
tmpStr3 = strMatch.SubMatches(2)
rndnum11 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""down_"&rndnum11&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antidown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode(tmpStr3)&"','down_"&rndnum11&"','down_"&rndnum11&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[down\](download\.asp\?id=)(.[^\[]*)\[\/down\]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
rndnum22 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""down_"&rndnum22&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antidown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode("点击下载此文件")&"','down_"&rndnum22&"','down_"&rndnum22&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[mDown=(download\.asp\?id=)(.[^\[]*)\](.[^\[]*)\[\/mDown]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
tmpStr3 = strMatch.SubMatches(2)
rndnum33 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""mdown_"&rndnum33&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antimdown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode(tmpStr3)&"','mdown_"&rndnum33&"','mdown_"&rndnum33&"');</script>", 1, -1, 0)
Next
re.Pattern = "\[mDown\](download\.asp\?id=)(.[^\[]*)\[\/mDown]"
Set strMatchs = re.Execute(strContent)
For Each strMatch in strMatchs
tmpStr1 = checkURL(strMatch.SubMatches(0))
tmpStr2 = strMatch.SubMatches(1)
rndnum44 = randomStr(10)
strContent = Replace(strContent, strMatch.Value, "<span id=""mdown_"&rndnum44&"""></span><script language=""javascript"" type=""text/javascript"">check('Action.asp?action=Antimdown&id="&tmpStr2&"&downurl="&server.URLEncode(tmpStr1&tmpStr2)&"&main="&server.URLEncode("点击下载此文件")&"','mdown_"&rndnum44&"','mdown_"&rndnum44&"');</script>", 1, -1, 0)
Next
评论: 7 | 引用: 0 | 查看次数: 5149
我安装你的方法修改了,是静态页面
但是老是加载状态
这是怎么回事??
但是老是加载状态
这是怎么回事??
The Microsoft Jet database engine cannot find the input table or query 'blog_Files'. Make sure it exists and that its name is spelled correctly.
/blog/control/c_SQLFile.asp, line 77
/blog/control/c_SQLFile.asp, line 77
情留メ蚊子 于 2009-03-02 05:53 PM 回复
请升级数据库
第一件事情:你的留言板不好用了,留言提交后找不到地址
第二件事情:我非常喜欢你的这个选项卡,相关日志(支持全静态别名)的东西,你可以发给我修改方法或者代码吗?
第二件事情:我非常喜欢你的这个选项卡,相关日志(支持全静态别名)的东西,你可以发给我修改方法或者代码吗?
蚊子兄 能不能把你的站的留言本发我一份 我的好像不能支持别名静态模式下的内页侧栏。
我的邮箱是 7223033@qq.com
还有你的留言本现在不能留言了 不知道为什么 所以就发这了 请见谅
我的邮箱是 7223033@qq.com
还有你的留言本现在不能留言了 不知道为什么 所以就发这了 请见谅
放假喽。..........
请问这个什么原理啊。。。目标另存为和迅雷就不能下载。。。但还是在你的网站啊。。。防盗链不是应该其他网站才不能下载的吗~
情留メ蚊子 于 2009-01-04 12:01 AM 回复
用迅雷可以下载。。另保存不能,用IE默认的下载可以
发表评论
上一篇
下一篇

文章来自:
Tags:
相关日志:
回复
第一个
后台管理 附件信息 这边,怎么让每页显示100个?
第二个
修改后文章没有引用的附件不会自动选中
不知道是我的问题还是代码的问题