<%@ Language=VBScript %>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
     
   favourite=""
   for i=1 to 24
		temp1="favor"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			favourite="1"&favourite
		else
			favourite="0"&favourite
		end if
   next
   '////////////
   f_sports=""
   for i=1 to 23
		temp1="sport"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			f_sports="1"&f_sports
		else
			f_sports="0"&f_sports
		end if
   next
   '////////////
   f_season=""
   for i=1 to 4
		temp1="season"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			f_season="1"&f_season
		else
			f_season="0"&f_season
		end if
   next
   '////////////
   f_movie=""
   for i=1 to 13
		temp1="movie"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			f_movie="1"&f_movie
		else
			f_movie="0"&f_movie
		end if
   next
   '////////////
   f_music=""
   for i=1 to 8
		temp1="music"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			f_music="1"&f_music
		else
			f_music="0"&f_music
		end if
   next
   '////////////
   f_food=""
   for i=1 to 15
		temp1="food"&cstr(i)
		if  Request(cstr(temp1))=cstr(i) then
			f_food="1"&f_food
		else
			f_food="0"&f_food
		end if
   next
   set rs1=server.CreateObject ("ADODB.recordset")
   'rs1.Supports (adAddNew)
   rs1.Supports ( adUpdate )
   sql="select * from user_info where user_name='"&session("Current_user")&"'"
   rs1.Open sql,conn1,2,3
   if rs1.RecordCount<>0 then
    rs1("favourite")=favourite
    rs1("f_sports")=f_sports
    rs1("f_season")=f_season
    rs1("f_movie")=f_movie
    rs1("f_music")=f_music
    rs1("f_food")=f_food
    rs1("dress_up")=Request("dress")
    
    rs1.Update 
   end if
   
   conn1.close
   
	Response.Redirect "my_interest.asp"
%>