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

<%
if Request.QueryString("ac")="CreatGiftList" then 
	RS_End
	dim objStream,Re,k,strFile
	strFile=server.mappath("/d/js/GiftList.js")
	Set objStream = Server.CreateObject("ADODB.Stream")
	Set RS = DB_CONN.EXECUTE("select top 64 * from [i_User_Gift] where [i_User_Gift_Enable]=1 order by [i_User_Gift_Sort] ")
	Re="var GiftListRe=""{data:["	
	while(not RS.Eof)
		if k>0 then Re=Re&","
		Re=Re&"{giftid:'"&Rs("i_User_Gift_ID")&"',giftclass:'"&Rs("i_User_Gift_Class")&"',giftprice:'"&Rs("i_User_Gift_Price")&"',giftname:'"&Rs("i_User_Gift_Name")&"'}"
		k=k+1
		RS.MoveNext
	wend
	Re=Re&"]}"";"
	RS_End
	With objStream
        .Type = 2
        .Open
        .Charset = "utf-8"
        .Position = objStream.Size
        .WriteText = Re
        .SaveToFile strFile,2
        .Close
    End With
    Set objStream = Nothing
	RWS "alert('静态文件生成成功');history.back(-1);"
	Rend
end if

%>