<%if Session("weight")=0 then 
Response.Redirect "error.asp?cause=4"
 end if
%>
<%if Session("weight")<2 then 
Response.Redirect "error.asp?cause=5"
 end if
%>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
   set rs=server.CreateObject ("ADODB.recordset")
    'rs.Supports (adUpdate)
   
   sql="select * from marry_public where user_name='"&session("Current_user")&"'"
   rs.Open sql,conn1,3
  
  if rs.RecordCount>0 then
	set rs1=server.CreateObject ("ADODB.recordset")
   sql="delete * from marry_public where user_name='"&session("Current_user")&"'" 
	rs1.open sql,conn1,3,2
	
 end if

	set rs1=server.CreateObject ("ADODB.recordset")
	rs1.Open "marry_public",conn1,3,2
	rs1.AddNew 
	rs1("user_name")=session("Current_user")
	
	rs1("youdian")=Request("youdian")	
	rs1("quedian")=Request("quedian")	
	rs1("single8to9")=Request("single8to9")	
	rs1("marry8to9")=Request("marry8to9")	
	rs1("single20to21")=Request("single20to21")	
	rs1("marry20to21")=Request("marry20to21")	
	rs1("childnow")=Request("childnow")	
	rs1("childmarry")=Request("childmarry")	
	rs1("tochild")=Request("tochild")	
	rs1("partner")=Request("partner")	
	rs1("notallow")=Request("notallow")	
	rs1("enounceinfo")=Request("enounceinfo")	
	rs1("pub_time")=now()	
	rs1.Update


conn1.close

	Response.Redirect "my_marry_build.asp"
	
 %> 