<!--#include file="conn.asp"-->
<!--include file="../bbs/bbsuser.asp"-->
<!-- #include file="inc/htmlencode2.asp"-->
<%
   username=request.form("username")
   titleid=request("titleid")
   tel=request.form("tel")
   age=request.form("age")
   sex=request.form("sex")
   job=request.form("job")
   edu=request.form("edu")
   address=request.form("address")
   qq=request.form("qq")
   'infotype=request("infotype")
   if infotype="" then infotype=0
   note=htmlencode2(request.form("note"))
   if isNull(username) or isNull(tel) or isNull(qq) or isNull(age) or not Isnumeric(tel) or not Isnumeric(age) or not Isnumeric(qq) then
      response.write "<script language='javascript'>"
      response.write "alert('电话,年龄,QQ号必须填写而且要填数字!');"
      response.write "history.go(-1);"
      response.write "</script>"
      response.end  
   end if
   sql="select * from ftbbs_bmtb where username='"&username&"' order by id desc"
   set rs=server.createobject("adodb.recordset")
   rs.open sql,conn,1,3
   if rs.eof then
      rs.addnew
      rs("username")=username
	  rs("titleid")=titleid
      rs("tel")=tel
      rs("age")=age
	  rs("sex")=sex
      rs("job")=job
      rs("edu")=edu
      rs("address")=address
      rs("qq")=qq
	  'rs("infotype")=infotype
	  rs("note")=note
      rs.update
      rs.close
      set rs=nothing
	  response.write "<SCRIPT language=JavaScript>alert('你提交成功！');history.go(-1);</script>" 
   else
	response.write "<SCRIPT language=JavaScript>alert('你已提交过了请不要重复提交！');history.go(-1);</script>"        
    response.end
   end if
   closedb
%>