<!--#include file=CONN.ASP-->
<!--#include file=config.asp-->
<!--#include file=usercookies.asp-->
<%dim rs,sql,username,jf,g_s
username=request.cookies("fox")("username")
sub fox_1()
set rs=server.createobject("adodb.recordset")
sql = "select jf,dxb from [FOX_user] where username='"&username&"'"
rs.open sql,conn,1,3
if rs("jf")<int(request("jf")) then
response.Write "<script LANGUAGE='javascript'>alert('参数错误！');history.go(-1);</script>"
response.end
end if
if hjf<int(request("jf")) then
response.Write "<script LANGUAGE='javascript'>alert('参数错误！');history.go(-1);</script>"
response.end
end if
g_s=int(rs("jf")/hjf)
rs("jf")=rs("jf")-int(g_s*hjf)
rs("dxb")=rs("dxb")+g_s
rs.update
rs.close
set rs=nothing
    Response.Write "<script>alert('转换成功！');this.location.href='userhome.asp';</SCRIPT>"
     response.end
Response.Redirect "userhome.asp"
end sub
%>
<%
if request("fox")="1" then
fox_1()
end if
%></body></html>