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

<%
Auto_Login2()
'uid,unick,gclass,gnum
if Request.QueryString("ac")="GetGiftRecord" then 
	dim SumPay,SumIncome,CurrentPage,k,Re,t,RGuid
	if Request.QueryString("n")="" then REND
	if not IsNumeric(Request.QueryString("n")) then REND
	if Request.QueryString("guid")="" then REND
	if not IsNumeric(Request.QueryString("guid")) then REND
	RGuid = Request.QueryString("guid")
	t = Request.QueryString("n")
	RS_End
	Re="var GRe=""{data:["
	Set RS=DB_CONN.EXECUTE("select top "&t&" *,(select [i_User_NickName] from [i_User_Info] where [i_User_ID]=[i_User_Gift_SendRecord_UID]) as 'unick' from [i_User_Gift_SendRecord] a join [i_User_Gift] b on a.[i_User_Gift_SendRecord_GiftID]=b.[i_User_Gift_ID] where [i_User_Gift_SendRecord_GUID]="&RGuid&"  and (DATEDIFF(D,getdate(),i_User_Gift_SendRecord_Time)=0) order by [i_User_Gift_SendRecord_Time] desc")
	while (not RS.eof )
		if k>0 then Re=Re&","		
		Re=Re&"{uid:'"&RS("i_User_Gift_SendRecord_UID")&"',unick:'"&RS("unick")&"',gclass:'"&RS("i_User_Gift_Class")&"',gnum:'"&RS("i_User_Gift_SendRecord_GiftNum")&"'}"
		k=k+1
		RS.MoveNext
	Wend
	Re=Re&"]}"";"
	RS_End
	RW Re
	Rend
end if

%>