<!-- #include file="Inc/Inc.asp" -->
<!-- #include file="Inc/Function.asp" -->
<%Call Head()
Call saycarda("下载文件")
%>

<%
if myid<>0 then
else
Response.write "<a href='login.asp?url="&Replace(Replace(R_url(),"sid=","sidoo="),"sid=","sidoo=")&"'>请您先登陆...</a>"& chr(13)
Call headsay()
Response.End

End if
dim ID,TP
if wjop="1" then
browsers=Lcase(Left(Request.ServerVariables("HTTP_USER_AGENT"),4))
if browsers="oper"  or  browsers="winw"  or  browsers="wapi" or browsers="mc21" or browsers="up.b" or browsers="upg1" or browsers="upsi" or browsers="qwap" or browsers="jigs" or browsers="java" or browsers="alca" or browsers="wapj" or browsers="cdr/" or browsers="nec-" or browsers="fetc" or browsers="r380" or browsers="winw" or browsers="mozi" or browsers="mozi" or browsers="m3ga" then
Call Error("请用手机访问！")
end if
end if
ID=request.querystring("id")
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
TP=request.querystring("TP")
if TP<>"" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select picurl from uppic where ID="&id
rs.open sql,conn,1,1
if rs.eof then
rs.close   
set rs=nothing
response.write"无此文件！"
else
	response.redirect rs("picurl")

rs.close   
set rs=nothing
end if
else
Dim xzfilesaytk1
xzfilesaytk1=-xzfilesaytk
if myjb < xzfilesaytk1 then
Call Error(""&getcent&"不足,每下载一次需"&xzfilesaytk1&""&getcent&"")
else
conn.execute("update users set myjb=myjb"&xzfilesaytk&" where id="&myid)
end if


Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select down,url from xzfile where ID="&id
rs.open sql,conn,1,3
if rs.eof then
rs.close   
set rs=nothing
response.write"无此文件！"
else
rs("down")=rs("down")+1
rs.update
	response.redirect rs("url")

rs.close   
set rs=nothing
end if
end if
conn.close
set conn=nothing
response.write"<br/><anchor>返回上级<prev/></anchor>"
response.write"</p></card></wml>"
%>
