<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
Call saycardb("元宝过户")
dim userid,yibi,fuyan,centstr,newrmbcent
  userid=Trim(Request.form("userid"))
  fuyan=Trim(Request.form("fuyan"))
  
  yibi=Trim(Request.form("yibi"))
  centstr=Trim(Request.form("centstr"))
  if userid="" or Isnumeric(userid)=False then
  Call Error("ID无效！")
  end if
  if yibi="" or Isnumeric(yibi)=False then
  Call Error("元宝数量无效！")
  end if
  yibi = abs(int(yibi))
  if clng(userid)=clng(myid) then
  Call Error("呵呵！不能为自己过户！")
  end if
 
IF centmm<>"" then
if centstr <> centmm then
  Call Error(""&getcent&"密码错误！")
  end if
 End if 

  dim cents,yibis
  cents=int(yibi*0)
  yibis=yibi+cents
if myrmbcent < yibis then
 Response.Write "元宝不足！不能为你服务！元宝过户会收取100"&getcent&"收续费！<br/>"
 Response.Write "<a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区银行</a><br/>"
 Response.Write "<br/><a href='show.asp?saytk="&saytk&"&amp;sid="&sid&"'>我的空间</a><br/>"
 Response.Write "<a href='index.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区首页</a><br/>"
call headsay()
 response.end
 End if 
 if myjb < 100 then
 Response.Write ""&getcent&"不足！不能为你服务！元宝过户会收取100"&getcent&"收续费！<br/>"
 Response.Write "<a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区银行</a><br/>"
 Response.Write "<br/><a href='show.asp?saytk="&saytk&"&amp;sid="&sid&"'>我的空间</a><br/>"
 Response.Write "<a href='index.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区首页</a><br/>"
call headsay()
 response.end
 End if 
if myrmbcent<0 then
 Response.Write "你还有贷款没有还！不能进行元宝过户服务！<br/>"
 Response.Write "<a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区银行</a><br/>"
 Response.Write "<br/><a href='show.asp?saytk="&saytk&"&amp;sid="&sid&"'>我的空间</a><br/>"
 Response.Write "<a href='index.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区首页</a><br/>"
call headsay()
 response.end
 End if 
  conn.execute("update Users Set rmbcent = rmbcent + "&yibi&" where ID="&userid)
  conn.execute("update Users Set rmbcent = rmbcent - "&yibis&" where ID="&myid)
  conn.execute("update Users Set myjb = myjb - 100 where ID="&myid)
'记录过户
   set rs=server.createobject("adodb.recordset")
   rs.open "select fromid,toid,paycent,banktimes from bankcent",conn,1,2
   rs.addnew
   rs("fromid")     = myid
   rs("toid")    = userid
   rs("paycent")    = yibi
   rs("banktimes") = now()
   rs.update
   rs.close
 set rs=Nothing
'发送信息
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * From Guest",conn,1,2
rs.addnew	
rs("sid")=userid
rs("fid")=0
if fuyan<>"" then
rs("fnr")="恭喜！(url=uinfo.asp?ID="&myid&"&saytk="&saytk&"&sid=[sid])"&myni&"(/url)赠送你"&yibi&"元宝！附言："&fuyan&""
else
rs("fnr")="恭喜！(url=uinfo.asp?ID="&myid&"&saytk="&saytk&"&sid=[sid])"&myni&"(/url)赠送你"&yibi&"元宝！"
end if
rs.update
rs.close
set rs=Nothing
conn.close
set conn=Nothing
  Response.write "过户成功，你已过户"&yibi&"元宝！"
 Response.Write "<br/><a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区银行</a>"
%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>