<!--#include file="../inc/Bll.asp"-->
<!--#include file="../inc/Constant.asp"-->
<!--#include file="../inc/Md5.asp"-->
<!--#include file="../inc/App.asp"-->

<%
Auto_Login2()

if Request.QueryString("ac")="SendFly" then 
	dim RGuid,RGunick,GiftID,GiftNum,StoreMoney,GiftPrice,GiftSumParice,GiftName
	if Request.QueryString("guid")="" then REND
	if not IsNumeric(Request.QueryString("guid")) then REND
	RGuid=Request.QueryString("guid")
	if Session(Session_UserID_Arg)="" then RW "var FlyRe='操作超时请重新登录！';":Rend
	RS_End
	if Cint(RGunick)=0 then
		RGunick = "大家"
	else
		RGunick = tGUInfo(RGuid,"i_User_NickName")
	end if
	RS_End
	StoreMoney = Clng(GUInfo("i_User_Money"))
	RS_End
	GiftPrice = SysConfig("i_Sys_Config_FlyMsgMoney")
	GiftSumParice = Clng(GiftPrice)
	if StoreMoney<GiftSumParice then RW "var FlyRe='余额不足，请充值！';":Rend
	RS_End
	RS.Open "select * from [i_User_Info] where [i_User_ID]="&Session(Session_UserID_Arg), DB_CONN , 1 , 3
		RS("i_User_Money")=StoreMoney-GiftSumParice
		RS("i_User_PayNum")=Clng(RS("i_User_PayNum"))+GiftSumParice
		RS.Update()
		LogSnedGift RGuid,33,1,GiftSumParice
		RecordConsume GiftSumParice,0,"向 "&RGunick&"（"&RGuid&"） 赠送 1 个 飞屏，支出"&Trim(Cstr(GiftSumParice)),Session(Session_UserID_Arg)
		RW "var FlyRe=true;var Money="&StoreMoney-GiftSumParice&";"
	RS_End
	Rend
end if

%>