<%
name=Request.Form("name")
compy=Request.Form("compy")
tel=Request.Form("tell")
add=Request.Form("add")
zip=Request.Form("yp")
sh=Request.Form("sh")
email=Request.Form("email")
hkfs=Request.Form("R1")
ErrorN=0
If name="" Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":会员姓名不能为空!!! "
End If
For i=1 to Len(tel)
If InStr("1234567890-",Mid(tel,i,1))=0 Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":电话号码格式错误!!! "
Exit For
End If
Next
If add="" Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":地址不能为空!!! "
End If
If Len(zip)<>6 Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":邮编应为 6 位!!! "
Else
For i=1 to Len(zip)
If InStr("1234567890",Mid(zip,i,1))=0 Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":邮编格式不正确!!! "
Exit For
End If
Next
End If
If Not (Len(sh)=15 OR Len(sh)=18) Then
ErrorN=ErrorN+1
if ErrorN=0 Then Response.Write " 注册出错提示 "
Response.Write "错误" & ErrorN & ":身份证位数不正确!!! "
Else
For i=1 to Len(sh)
If InStr("1234567890",Mid(sh,i,1))=0 Then
if ErrorN=0 Then Response.Write " 注册出错提示 "
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":身份证格式不正确!!! "
Exit For
End If
Next
End If
If email="" Then
ErrorN=ErrorN+1
if ErrorN=0 Then Response.Write " 注册出错提示 "
Response.Write "错误" & ErrorN & ":E_Mail不能为空!!! "
Else
If InStr(email,"@")=0 Then
ErrorN=ErrorN+1
if ErrorN=0 Then Response.Write " 注册出错提示 "
Response.Write "错误" & ErrorN & ":E_Mail格式不正确!!! "
End If
End If
Set dbfdata=Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
SQLStr="SELECT * FROM 会员 where 会员证件='" & sh & "'"
dbfdata.Open Application("baije_ConnectionString")
Rs.Open SQLStr,dbfdata,1,1
If Rs.RecordCount<>0 Then
ErrorN=ErrorN+1
Response.Write "错误" & ErrorN & ":您已经注册过!!! "
End If
Rs.Close
If ErrorN>0 Then
Response.Write "会员姓 名 :" & name & " 会员单 位 :" & compy & " 联系电 话 :" & tel & " 联系地 址 :" & add & " 邮政编 码 :" & zip & " 身份证号码:" & sh & " 电子邮 箱 :" & email & " 汇款方 式 :" & hkfs & "
"
dbfdata.Close
Response.End
End If
Application.Lock
Rs.Open "会员",dbfdata,1,3,2
Rs.AddNew
Rs("会员姓名")=name
Rs("会员单位")=compy
Rs("联系电话")=tel
Rs("会员地址")=add
Rs("邮政编码")=zip
Rs("会员证件")=sh
Rs("会员E_mail")=email
Rs("汇款方式")=hkfs
Rs("注册时间")=Now
Rs.Update
Application.unlock
Rs.Close
dbfdata.Close
'Response.Write "OK"
%>
恭喜您注册成功
请确认以下您的注册信息!
会员姓名:
会员单位 :<%=compy%>
联系电话 :<%=tel%>
联系地址 :<%=add%>
邮政编码 :<%=zip%>
身份证号码:<%=sh%>
电子邮箱 :<%=email%>
汇款方式 :<%=hkfs%>
感谢您对百业的信赖与支持,我们将以最优的质量为您服务
注意:
汇款方式:暂请用银行转账
请在一个月内把预存款汇到银行帐号 否则系统将自动删除会员信息
|