<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
   user_name=replace(Request("user_name")," ","~",1,-1,1)
sql="select * from user where user_name='"&Request("user_name")&"'"
set rs=server.CreateObject ("ADODB.recordset")
 rs.Open sql,conn1,3
if rs.RecordCount <>0 then
  Response.Redirect "error.asp?cause=3"
end if 
   
   
   
   set rs=server.CreateObject ("ADODB.recordset")
   rs.Supports (adAddNew)
   rs.Open "select * from user",conn1,2,3 
  
   
   rs.AddNew 
   rs("user_name")=user_name
   rs("passwd")=user_name
   rs("nickname")=user_name
   rs("passwd_question")="yes"
   rs("passwd_answer")="no"
   rs("weight")=1
   rs("public_select")=2
   rs("counter")=0
   rs("visited_counter")=0
   rs("charisma")=0
   rs("sex")="女"
   rs("byear")="1982"
   rs("bmonth")="1"
   rs("bday")="1"
   'rs("brief_info")="我是谁？"
   rs("email")="lcb2005@163.com"
   rs("telephone")="05986832655"
   rs("province")="福建省"
   rs("city")="三明"
   rs("vocation")=""
   rs("employment")=""
   rs("education")="本科"
   rs("salary")=""
   rs("constellation")=""
   rs("blood")=""
   rs("married")=""
   rs("relation")=""
   rs("photo")=0
   rs("sound")=0
   rs("reg_date")=date
   rs("last_time")=date
   rs.Update 
 
%>

<%
  set rs1=server.CreateObject ("ADODB.recordset")
  rs1.Supports (adAddNew)
  rs1.Open "select * from user_info",conn1,2,3 
  rs1.AddNew 
 rs1("user_name")=user_name
 rs1("language")="000000000000"
  rs1("height")=0
  rs1("shape")="保留"
  rs1("smoking")="保留"
  rs1("drinking")="保留"
  rs1("oicq")=""
  rs1("homepage")="http://"
  rs1("homeintro")="无"
  rs1("character")="000000000000000000000000000000000000000000000000000000000000"
    rs1("favourite")="000000000000000000000000"
    rs1("f_sports")="00000000000000000000000"
    rs1("f_season")="0000"
    rs1("f_movie")="0000000000000"
    rs1("f_music")="00000000"
    rs1("f_food")="000000000000000"
    rs1("dress_up")="请选择"
  rs1.Update 
   conn1.close
   
   Response.Redirect "add_success.asp"

%>