?? regsubmit.asp
字號(hào):
<!--#include file="Odbc_connection.asp"-->
<!--#include file="Function.asp"-->
<%
On Error Resume Next
insertok=trim(request.Form("insertok"))
username=trim(request.Form("username"))
password=trim(request.Form("password"))
password2=trim(request.Form("password2"))
reg=trim(request.Form("reg"))
reg1=trim(request.Form("reg1"))
typed=cint(trim(request.Form("typed")))
address=trim(request.Form("ADDRESS"))
department=request.Form("addone_id")
class1=request.Form("addtwo_id")
number=trim(request.Form("number"))
number1=number
Email=trim(request.Form("Email"))
tel=trim(request.Form("TEL"))
ip=request.ServerVariables("REMOTE_ADDR")
'-------------------------------------------
IF DEPARTMENT="請(qǐng)選擇教師院系" or class1="請(qǐng)選擇班級(jí)" THEN
response.write"<script>alert('請(qǐng)選擇所在院系和班級(jí)!');location='REGOK.asp'</script>"
response.End()
END IF
if class1<>"—學(xué)校督導(dǎo)—" then
if class1<>"—教師同行—" then
strsql="select * from class where id="&class1
set rs=db.execute(strsql)
class1=rs("classname")
end if
end if
strsql="select * from department where id="&department
set rs=db.execute(strsql)
department=rs("department")
'----------------------------------------------
'--------------------將系別數(shù)字轉(zhuǎn)換成文字
typedok=TONGGUO
'2005-3-24日晚上的代碼!
'成功的得到了FORM了的值
if Email="" then
Email="無(wú)"
end if
if address="" then
address="無(wú)"
end if
if tel="" then
tel="無(wú)"
end if
'----------------------------------------------
user=number
'-----------------------------------------------產(chǎn)生用戶ID
if username="" or password="" or number1="" then
response.write"<script>alert('請(qǐng)把信息添完整');location='regok.asp'</script>"
response.End()
end if
'------------------------------------------
if reg<>reg1 then
response.write"<script>alert('附加碼錯(cuò)誤!');location='regok.asp'</script>"
response.End()
end if
'----------------------------------------------------------------------
if db.errors.count>0 then
response.write"<script>alert('數(shù)據(jù)提交時(shí)出現(xiàn)錯(cuò)誤,請(qǐng)重新申請(qǐng)!');location='regok.asp'</script>"
end if
'------------------------------------------------------------
strsql="INSERT INTO USERinfo(USERNAME,PASSWORD,REALNAME,TYPED,TYPEDOK,EMAIL,NUM,TEL,ADDRESS,SUBMITDATE,IP,DEPART,CLASS1)"
strsql=strsql&"values('"&USER&"','"&PASSWORD&"','"&USERNAME&"',"&TYPED&","&TYPEDOK&",'"&EMAIL&"','"&NUMBER&"','"&TEL&"','"&ADDRESS&"','"&now()&"','"&IP&"','"&DEPARTMENT&"','"&CLASS1&"')"
db.execute(strsql)
session("userREGID")=USER
response.write"<script>alert('注冊(cè)成功!');location='regdisplay.asp'</script>"
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -