<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
Call saycardb("过户服务")
dim userid,yibi,fuyan,centstr
  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(""&getcent&"数量无效！")
  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&"对不起,过户密码错误！<br/>如果忘记密码请联系<b>1021</b>社区管理员帮你修改密码!")
  end if
 End if 

  dim cents,yibis
  cents=int(yibi*0.05)
  yibis=yibi+cents
if myjb < yibis then
 Response.Write ""&getcent&"不足！不能为你服务！"&getcent&"过户会收取1%收续费！<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>>>"
 Response.Write "<a href='index.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区首页</a><br/>"
call headsay()
 response.end
 End if 
if bankjie>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>>>"
 Response.Write "<a href='index.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区首页</a><br/>"
call headsay()
 response.end
 End if 
  conn.execute("update Users Set myjb = myjb + "&yibi&" where ID="&userid)
  conn.execute("update Users Set myjb = myjb - "&yibis&" 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&""&getcent&"！附言："&fuyan&""
else
rs("fnr")="恭喜！(url=uinfo.asp?ID="&myid&"&saytk="&saytk&"&sid=[sid])"&myni&"(/url)赠送你"&yibi&""&getcent&"！"
end if
rs.update
rs.close
set rs=Nothing
conn.close
set conn=Nothing
  Response.write "过户成功，你已过户"&yibi&""&getcent&"！"
 Response.Write "<br/><a href='bankcl.asp?saytk="&saytk&"&amp;sid="&sid&"'>社区银行</a>"
%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>