<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checkhy.asp" -->
<!-- #include file="include/168soft_SqlIn.Asp" -->
<%
HyNumber = trim(request("HyNumber"))
PickupCount = trim(request("PickupCount"))
PayPalAccount=trim(request("PayPal"))

if len(PickupCount)=0 then
	PickupCount=0
end if
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
sql ="select HyMoneyAccount from HyMoneyAccount where HyNumber='" & HyNumber & "'"
rs.open sql,conn
if rs.recordcount>0 then
	HyMoneyAccount=rs("HyMoneyAccount")
else
	HyMoneyAccount=0
end if


if cint(PickupCount)-cint(HyMoneyAccount)>0 then%>
<script language="javascript">
	alert("对不起，你帐户余额不够，请检查!");
	history.back();
</script>
<%response.end
end if%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="include/e1.css" type="text/css">
</HEAD>
<BODY>
-------------------------提款申请中...............<br>
<%
set rs=server.CreateObject("adodb.recordset")
sql = "insert into HyPickupMoneyLog(HyNumber,PayPalAccount,PickupCount,PickupDate) values("
sql = sql &"'" &  HyNumber & "','" & PayPalAccount & "'," & PickupCount & ",'" & thistoday & "')"
'response.write sql
rs.Open sql,conn
%>

<script language="javascript">
	alert("已收到您的提款申请，我们将尽快处理你的申请!");
//	history.back();
	window.location.href="HyPickupMoney.asp"
	//window.parent.frames(0).location.reload();
</script>
</BODY>
</HTML>