<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->


<%
call head()
Call saycardb("清还贷款")

dim yibi,Action,centstr
  yibi=Trim(Request.form("yibi"))
  centstr=Trim(Request.form("centstr"))
  IF  Request.QueryString("Action")="save" Then
if yibi="" or Isnumeric(yibi)=False then
  Call Error(""&getcent&"数量错误！")
  end if
IF centmm<>"" then
if centstr <> centmm then
  Call Error(""&getcent&"密码错误！")
  end if
 End if 

yibi = abs(int(yibi))
if yibi > myjb then
 Response.Write ""&getcent&"不足！不能为你服务！<br/>"
 Response.Write "<a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>返回社区银行</a><br/>"
 Response.write "<a href=""/bbs/show.asp?saytk="&saytk&"&amp;sid="&sid&""">空间</a>>>"
 Response.write "<a href=""/bbs/index.asp?saytk="&saytk&"&amp;sid="&sid&""">社区</a>>>"
 Response.write "<a href=""/index.asp?saytk="&saytk&"&amp;sid="&sid&""">首页</a><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
call headsay()
 response.end
 End if 
  if bankjie - yibi<0 then
  conn.execute("update Users Set bankjie = bankjie - "&bankjie&" where ID="&myid)
  conn.execute("update Users Set myjb =myjb - "&bankjie&" where ID="&myid)
  Response.write "支付成功，你已成功还款"&bankjie&"金币！"
  Response.write "<br/>由于您还帐数目大于欠贷数目，银行只收您的欠贷数目！<br/>"
else
  conn.execute("update Users Set bankjie = bankjie - "&yibi&" where ID="&myid)
  conn.execute("update Users Set myjb = myjb - "&yibi&" where ID="&myid)
  Response.write "支付成功，你已成功还款"&yibi&getcent&"！"
  End if
else
 response.write "您现在欠银行贷款"&bankjie&getcent&"<br/>"

  If saytk>1 then%>
<form name="form" method="post" action="bankhk.asp?Action=save&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>">
<%End if
 Response.Write "输入还款金额："
 Response.Write "<br/><input emptyok=""false"" value="""" name=""yibi"" format=""*N""/>"
if centmm<>"" then
 Response.Write "<br/>您的"&getcent&"密码："
Response.Write "<br/><input emptyok=""false"" value="""" name=""centstr""/>"
end If

If saytk<>1 Then

response.write "<br/><input type=""submit"" name=""Submit"" value=""下一步""></form>"
else
 Response.Write "<br/><anchor>下一步<go href=""bankhk.asp?Action=save&amp;saytk="&saytk&"&amp;sid="&sid&""" method=""post"">"
 Response.Write "<postfield name=""centstr"" value=""$(centstr)""/>"
 Response.Write "<postfield name=""yibi"" value=""$(yibi)""/>"
 Response.Write "</go></anchor>"
  end if
 response.write "<br/>您自带"&getcent&""&myjb&""
 end if
 Response.Write "<br/><a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>返回社区银行</a><br/>"
 Response.write "<a href=""/bbs/show.asp?saytk="&saytk&"&amp;sid="&sid&""">空间</a>>>"
 Response.write "<a href=""/bbs/index.asp?saytk="&saytk&"&amp;sid="&sid&""">社区</a>>>"
 Response.write "<a href=""/index.asp?saytk="&saytk&"&amp;sid="&sid&""">首页</a><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"

%>

<%call headsay()%>