<!--#include file="top.asp"-->
<!--#include file="inc/articlechar.inc"-->
<%
dim conn,DBPath
dim rs_lar
dim sql,haveerr,star
dim i
dim err(25)
'叛断Session变量是否超时
'if isempty(session("u_id")) then
   'response.redirect "timeout.asp"
'end if
'-----------------------------------------------------------------
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("CONN/hs1299764859.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'-----------------------------------------------------------------
Set rs_lar = Server.CreateObject("ADODB.Recordset")
sql="select user_id from larchives where user_id =" & session("u_id")
rs_lar.open sql,conn,3,2
if not(rs_lar.eof and rs_lar.bof) then
   response.write "You have established the file!"
   response.end
end if
name        =htmlencode2(request("name"))
ne          =request("ne")
sex         =request("sex")
byear       =request("byear")
bmonth      =request("bmonth")
bday        =request("bday")
marry       =request("marry")
cd          =request("cd")
home        =htmlencode2(request("home"))
dizhi       =htmlencode2(request("dizhi"))
postcalcode =request("postcalcode")
lg          =request("lg")
mz          =request("mz")
tg          =request("tg")
car         =request("car")
job         =request("job")
hb          =request("hb")
fresume     =htmlencode2(request("fresume"))
tel         =request("tel")
tel1        =request("tel1")
tel2        =request("tel2")
H_info      =request("H_info")
bedroom     =request("bedroom")
bath        =request("bath")
H_size      =request("H_size")
nr          =request("nr")
nb          =request("nb")
nl          =request("nl")
homepage    =htmlencode2(Trim(request("homepage")))
email       =request("email")
education   =request("education")
live        =request("live")
cc          =request("cc")
c_name      =request("c_name")
sex1        =request("sex1")
birth       =request("birth")
hbb         =request("hbb")
si          =request("si")
fd          =request("fd")
mc          =request("mc")
c_name      =request("c_name1")
sex1        =request("sex2")
birth       =request("birth1")
hbb         =request("hbb1")
si          =request("si1")
fd          =request("fd1")
mc          =request("mc1")
mc          =request("mc2")
Cleanbaby   =request("Cleanbaby")
CleanRoom   =request("CleanRoom")
L_baby      =request("L_baby")
L_fy        =request("L_fy")
feedbaby    =request("feedbaby")
feedfy      =request("feedfy")
c_baby      =request("c_baby")
petcare     =request("petcare")
gard        =request("gard")
snow        =request("snow")
dp          =request("dp")
df          =request("df")
Party       =request("Party")
jobstart    =request("jobstart")
jobd        =request("jobd")
h_wage      =request("h_wage")
ded         =request("ded")
Agepref     =request("Agepref")
'容错代码--------------------------------------------------------------------------------------------------------------
if len(name)>50                then err(1)="Name can't over 50 letters!"
if len(name)<2                 then err(1)="The name is minimal to also want 2 letters!"
if len(fresume)>500            then err(8)="Resume can't over 500 letters!"
if fresume=""                  then fresume="-Not fill-"
if home=""                     then home="-Not fill-"
if len(email)>50               then err(11)="Email at most can have 50 letters!"
if not isvalidemail(email)     then err(12)="The mistake of email address!"
if not(isdate(byear & "-" & bmonth & "-" & bday)) then err(24)="Birthday you have no choice or date of birthdays invalid!"
for i=1 to 24
    if err(i)<>"" then 
  haveerr="yes"
  response.write err(i)
  response.end
 end if
next
function IsValidEmail(email)
 dim names, name, i, c
 IsValidEmail = true
 names = Split(email, "@")
 if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
 end if
 for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
 next
 if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
 end if
 i = Len(names(1)) - InStrRev(names(1), ".")
 if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
 end if
 if InStr(email, "..") > 0 then
   IsValidEmail = false
 end if
end function
'--------------------------------------------------------------------------------------------------------------------------
if     (bmonth=12 and bday>=22) or (bmonth=1 and bday<=19)  then
 star= "山羊座"
elseif (bmonth=1 and bday>=20)  or (bmonth=2 and bday<=18)  then
 star= "水瓶座"
elseif (bmonth=2 and bday>=19)  or (bmonth=3 and bday<=20)  then
 star= "双鱼座"
elseif (bmonth=3 and bday>=21)  or (bmonth=4 and bday<=19)  then
 star= "白羊座"
elseif (bmonth=4 and bday>=20)  or (bmonth=5 and bday<=20)  then
 star= "金牛座"
elseif (bmonth=5 and bday>=21)  or (bmonth=6 and bday<=20)  then
 star= "双子座"
elseif (bmonth=6 and bday>=21)  or (bmonth=7 and bday<=22)  then
 star= "巨蟹座"
elseif (bmonth=7 and bday>=23)  or (bmonth=8 and bday<=22)  then
 star= "狮子座"
elseif (bmonth=8 and bday>=23)  or (bmonth=9 and bday<=22)  then
 star= "处女座"
elseif (bmonth=9 and bday>=23)  or (bmonth=10 and bday<=22) then
 star= "天枰座"
elseif (bmonth=10 and bday>=23) or (bmonth=11 and bday<=21) then
 star= "天蝎座"
elseif (bmonth=11 and bday>=22) or (bmonth=12 and bday<=21) then
 star= "射手座"
end if
%>
<%if haveerr="yes" then%>
<LINK href="incc/style.css" rel=stylesheet type=text/css>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR> 
      <TD vAlign=top align=middle> <TABLE width=778 border=0 cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF">
          <TBODY>
            <TR> 
              <TD align=middle vAlign=top> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td height="8"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                </table>
                <SPAN id=_ctl0_Middle_03_Middle_LoveSearch1> </SPAN> <table width="96%" border="2" align="center" cellpadding="2" cellspacing="2" bordercolor="#CCCCCC">
                  <tr> 
                    <td><TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
                        <TBODY>
                          <TR> 
                            <TD width=320 height=24><IMG height=15 
                              src="images/4-6.gif" width=15 
                              align=absMiddle> <strong></strong></TD>
                            <TD align=right width=36> </TD>
                          </TR>
                          <TR> 
                            <TD bgColor=#9cccdf colSpan=2 height=2></TD>
                          </TR>
                          <TR valign="top"> 
                            <TD height="200" 
                            colSpan=2 style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px"> 
                              <div align="center"> 
                                <p> </p><table border="0" width="420" bordercolor="#336699" cellspacing="0" align="center">
                                  <tr> 
                                    <td width="100%"> <table border="0" width="100%" cellspacing="0">
                                        <tr> 
                                          <td width="100%" height="30"> Register 
                                            the failure!Discovers in personal 
                                            file that you hand over necessarily 
                                            column eyes as follows problem: </td>
                                        </tr>
                                        <%for i=1 to 25%>
                                        <%if err(i)<>"" then %>
                                        <tr> 
                                          <td width="100%"> <ul>
                                              <li> <font color="red"> <%=err(i)%> 
                                                </font> </li>
                                            </ul></td>
                                        </tr>
                                        <%end if%>
                                        <%next%>
                                        <tr> 
                                          <td width="100%" align="center" height="30"> 
                                            <a href="" onclick="history.go(-1);return false;">[Return]</a> 
                                          </td>
                                        </tr>
                                      </table></td>
                                  </tr>
                                </table>
                                <p> </p>
                              </div></TD>
                          </TR>
                        </TBODY>
                      </TABLE></td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td height="8"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                </table></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="CopyRight1.asp"-->
<%response.end%>
<%end if%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("CONN/hs1299764859.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs_lar = Server.CreateObject("ADODB.Recordset")
'检查入会ID,叛断是否已入档
rs_lar.open "larchives",conn,3,2
rs_lar.addnew
rs_lar("user_id")      =session("u_id")
rs_lar("ne")           =ne
rs_lar("britherday")   =byear & "-" & bmonth & "-" & bday
rs_lar("age")          =datediff("yyyy",byear & "-" & bmonth & "-" & bday,date)
rs_lar("home")         =province & home
rs_lar("ip")           =request.ServerVariables("REMOTE_ADDR")
rs_lar("date")         =date
rs_lar("time")         =time
rs_lar("click")        =0
rs_lar("renqi")        =0
rs_lar("photo")        =0
rs_lar("last_login")=now()
dim rszd
rszd=split("name sex shengao mz yy tg dizhi education postcalcode marry cd tel tel1 tel2 lg mc yy car job hb fresume H_info bedroom bath H_size Nr Nb Nl homepage Email live cc c_name sex1 birth hbb si fd mc c_name1 sex2 birth1 hbb1 si1 fd1 mc1 mc2 Cleanbaby CleanRoom L_baby L_fy feedbaby feedfy c_baby petcare gard snow dp df Party jobstart jobd h_wage ded Agepref"," ")
dim rszdv
rszdv=split(name&"++"&sex&"++"&shengao&"++"&mz&"++"&yy&"++"&tg&"++"&dizhi&"++"&education&"++"&postcalcode&"++"&marry&"++"&cd&"++"&tel&"++"&tel1&"++"&tel2&"++"&lg&"++"&mc&"++"&yy&"++"&car&"++"&job&"++"&hb&"++"&fresume&"++"&H_info&"++"&bedroom&"++"&bath&"++"&Nr&"++"&Nb&"++"&Nl&"++"&homepage&"++"&Email&"++"&live&"++"&cc&"++"&c_name&"++"&sex1&"++"&birth&"++"&hbb&"++"&si&"++"&fd&"++"&mc&"++"&c_name1&"++"&sex2&"++"&birth1&"++"&hbb1&"++"&si1&"++"&fd1&"++"&mc1&"++"&mc2&"++"&Cleanbaby&"++"&CleanRoom&"++"&L_baby&"++"&L_fy&"++"&feedbaby&"++"&feedfy&"++"&c_baby&"++"&petcare&"++"&gard&"++"&snow&"++"&dp&"++"&df&"++"&Party&"++"&jobstart&"++"&jobd&"++"&h_wage&"++"&ded&"++"&Agepref,"++")
for i=0 to ubound(rszd)
 if not isnull(rszdv(i)) and rszdv(i)<>"" then rs_lar(rszd(i))=rszdv(i)
next
rs_lar.update
rs_lar.close
set rs_lar=nothing
conn.close
set conn=nothing
response.redirect "Reg_Next.asp"
%>