帮改下网页代码!

来源:百度知道 编辑:UC知道 时间:2024/09/23 16:23:21
代码如下:我现在想一点下载链接就直接可下载,但现在却出现没有登陆。高手帮我改下。

<%

dim founderr,errmsg
errmsg=""
founderr=false
call chkparam()
if founderr then
call diserror()
response.end
else
if guestsoft="yes" then

softdowncount
call geturl()
else
if session("userlogin")<>"" then
softdowncount
call geturl()
else
Response.Write ("<script>alert(' 错误!\n\n您还没有登陆或登陆超时,请先登陆。');javascript:window.close();</script>")
Response.end
end if
end if

end if

sub chkparam()
if request.querystring("soft_id")<>"" then
if not isInteger(request.querystring("soft_id")) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的文件ID参数。"
end if

可以将中间验证session和验证会员软件或普通软件的信息去掉,即普通浏览者即可下载全部的软件,不需要登陆。

<%

dim founderr,errmsg
errmsg=""
founderr=false
call chkparam()
if founderr then
call diserror()
response.end
else

softdowncount
call geturl()

end if

sub chkparam()
if request.querystring("soft_id")<>"" then
if not isInteger(request.querystring("soft_id")) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的文件ID参数。"
end if
else
founderr=true
errmsg=errmsg+"<br>"+"<li>你没有指定要下载的文件。"
end if
if request.querystring("url")<>"" then
if not isInteger(request.querystring("url")) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的下载地址参数。"
end if