<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
call saycardd(""&getcent&"赠送")

dim ids,TP,num
TP=Request("TP")
ids=Request("ids")

if TP<>"" then

'检查ID是否存在
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM users where id="&ids,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("ID不存在！")
end if
  rs.close
  set rs=Nothing

num=Request("num")

if num="" or IsNumeric(num)=False then
  Call Error("数量无效！")
end if

  conn.Execute("update Users set myjb=myjb+"&num&" Where id="&ids)

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from guest",conn,1,2
rs.addnew
rs("fnr")="系统管理员转给您"&num&getcent&"，请注意查收！"
rs("sid")=ids
rs("fid")=0
rs.update
rs.close
set rs=nothing

 Response.Write num&getcent&"成功送给ID:"&ids&"<br/>"
else
if ids="" or IsNumeric(ids)=False then
  Call Error("ID无效！")
end if
 Response.Write "送给ID:"&ids&"<br/>"
 Response.Write "赠送数量：<br/>"
if saytk>1 then
Response.write "<br/><form name=""form"" method=""post"" action=""getcent.asp?sid="&sid&"&amp;saytk="&saytk&""">"
 Response.Write "<input name=""num"" format='*N' maxlength='10' value=""""/>"
response.write "<input type=""hidden"" name=""tp"" value=""1""/>"
response.write "<input type=""hidden"" name=""ids"" value="""&ids&"""/>"
response.write "<input type=""submit"" name=""Submit"" value=""确认赠送""></form><br/>"
else
 Response.Write "<input name=""num"&tt&""" format='*N' maxlength='10' value=""""/>"
 Response.Write "<br/><anchor>确认赠送"
 Response.Write "<go href=""getcent.asp?sid="&sid&"&amp;saytk="&saytk&""" method=""post"" accept-charset=""utf-8"">"
 Response.Write "<postfield name=""num"" value=""$(num"&tt&")""/>"
 Response.Write "<postfield name=""ids"" value="""&ids&"""/>"
 Response.Write "<postfield name=""TP"" value=""1""/>"
 Response.Write "</go></anchor><br/>"
end if
end if
conn.close
set conn=nothing
Response.write "<br/><a href=""show.asp?id="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&""">[用户信息]</a>"%>
<!--#include file="fanhui.asp"-->
<%response.write""
call head3()%>