📄 reg.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/inlogin.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="Registration_inc.asp"-->
<%
webtit="学生在线报名"
%>
<!--#include file="inc/head.asp"-->
<!--#include file="inc/top.asp"-->
<%
Dim FoundErr,ErrMsg
dim uname,Gender,Birthplace,Birth,IdentityNO,zkz,bmh,cityinfo,l1,l2,l3,l4,l5,addr,phone,tel,con,password1,password2,checkcodes
uname = CutStr2(che(Request.Form("uname")),16)
Gender = che(Request.Form("Gender"))
Birthplace = CutStr2(che(Request.Form("Birthplace")),20)
Birth = che(Request.Form("Birth"))
IdentityNO = CutStr2(che(Request.Form("IdentityNO")),18)
zkz = CutStr2(che(Request.Form("zkz")),16)
bmh = CutStr2(che(Request.Form("bmh")),16)
cityinfo = CutStr2(che(Request.Form("cityinfo")),20)
l1 = CutStr2(che(Request.Form("l1")),3)
l2 = CutStr2(che(Request.Form("l2")),3)
l3 = CutStr2(che(Request.Form("l3")),3)
l4 = CutStr2(che(Request.Form("l4")),3)
l5 = che(CutStr2(Request.Form("l5"),100))
addr = CutStr2(che(Request.Form("addr")),50)
phone = CutStr2(che(Request.Form("phone")),18)
tel = CutStr2(che(Request.Form("tel")),18)
con = che(CutStr2(Request.Form("con"),100))
password1 = CutStr2(che(Request.Form("password1")),16)
password2 = CutStr2(che(Request.Form("password2")),16)
checkcodes = Trim(che(Request.Form("checkcodes")))
If checkcodes=Empty Or Trim(Session("CheckCode"))<>checkcodes Then
'FoundErr=True
'ErrMsg=ErrMsg & "<li>您输入的确认码和系统产生的不一致,请重新输入</li>"
end If
If uname="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写真实姓名!</li>"
End If
If Birthplace="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写籍贯!</li>"
End If
If IdentityNO="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写身份证号!</li>"
End If
If zkz="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写准考证号!</li>"
End If
If bmh="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写高考报名号!</li>"
End If
If cityinfo="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写“高考所在城市”!</li>"
End If
If l1="" Or l3="" Or l3="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写高考成绩!</li>"
End If
If addr="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写家庭住址,录取后将以此做为录取通知书收件地址!</li>"
End If
If phone="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写电话号码,以便我们即时联系您!</li>"
End If
If tel="" Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请详细填写手机号码,以便我们即时联系您!</li>"
End If
If password1="" Or password2="" Or password1<>password2 Then
FoundErr=True
ErrMsg=ErrMsg & "<li>请正确填写您的查询密码!</li>"
End If
If FoundErr=True Then
main_errormsg ErrMsg
Else
jgid="000000"
set rs=server.createobject("adodb.recordset")
Sql = "SELECT * FROM [Reg_Userinfo] WHERE id=0"
rs.Open Sql, Conn, 1, 3
rs.AddNew
rs("uname") = uname
rs("Gender") = Gender
rs("Birthplace") = Birthplace
rs("Birth") = Birth
rs("IdentityNO") = IdentityNO
rs("zkz") = zkz
rs("bmh") = bmh
rs("cityinfo") = cityinfo
rs("l1") = l1
rs("l2") = l2
rs("l3") = l3
rs("l4") = l4
rs("l5") = l5
rs("addr") = addr
rs("phone") = phone
rs("tel") = tel
rs("con") = con
rs("password") = md5(md5(password1))
rs.Update
id = rs("id")
If Len(id)<6 Then
webID=year(Now())&Month(Now())&Day(Now())&Left(jgid,(6-Int(Len(id))))&id
Else
webID=year(Now())&Month(Now())&Day(Now())&Left(id,6)
End If
rs.close
set rs1=conn.execute("update Reg_Userinfo set webID='"&webID&"' where id="&id)
main_rightmsg "index.asp","注册成功!","录取查询页面"
End If
if err then
'response.Write(0)
else
'response.Write(1)
end If
%>
<!--#include file="inc/footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -