<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq1.asp"-->
<%Call head()
Call saycarda("还魂丹过户")%>


<% if cwhh<0 then
call error("您的还魂丹小于0")
end if
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("还魂丹数量无效！")
  end if

  yibi = abs(int(yibi))
  if clng(userid)=clng(myid) then
  Call Error("呵呵！不能为自己过户！")
  end if
 


  dim cents,yibis

  yibis=yibi
if cwhh < yibis then
 Response.Write "还魂丹数量不足！不能为你服务!<br/>"
 Response.Write "<a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"'>宠物</a>-"
 Response.Write "<a href='show.asp?sid="&sid&"&amp;saytk="&saytk&"'>空间</a>-"
 Response.Write "<a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"'>社区</a><br/>"
 Response.Write "</p></card></wml>"
 response.end
 End if 





  conn.execute("update Users Set cwhh = cwhh + "&yibi&" where ID="&userid)
  conn.execute("update Users Set cwhh = cwhh - "&yibis&" where ID="&myid)


'发送信息
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&"&sid=[sid])"&myni&"(/url)赠送你"&yibi&"还魂丹！附言："&fuyan&""
else
rs("fnr")="恭喜！(url=uinfo.asp?ID="&myid&"&sid=[sid])"&myni&"(/url)赠送你"&yibi&"还魂丹！"
end if
rs.update
rs.close
set rs=Nothing
conn.close
set conn=Nothing
  Response.write "赠送成功，你已赠送(ID:"&userid&")"&yibi&"个还魂丹！"
 Response.Write "<a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"'>宠物</a>-"
 Response.Write "<a href='show.asp?sid="&sid&"&amp;saytk="&saytk&"'>空间</a>-"

%>
<!--#include file="fanhui.asp"-->
<%Call headsay()%>

