?? register.asp
字號:
<!--#include file="MarcosCB.asp"-->
<%
getConn()
dim i
dim theAct,strOther
dim str,pageCode,pageTitle,pageOther
dim userName,passWord,conPassWord,userSign,userSex,userBirthday,userGroup
theAct=getPost("theAct")
if theAct="reg" then
userName=getPost("userName")
passWord=getPost("passWord")
conPassWord=getPost("conPassWord")
userSign=getPost("userSign")
userSex=getPost("userSex")
userBirthday=getPost("userBirthday")
userGroup=getPost("userGroup")
if not canReg(userName) then
echo "<script>alert('對不起,用戶名只能使用中文,數(shù)字和英文字母!');history.back();</script>"
response.end
end if
if instr(userName,"游客")>0 then
echo "<script>alert('對不起, 游客 為系統(tǒng)關(guān)鍵字,不允許注冊.');history.back();</script>"
response.end
end if
if isExists(userName) then
echo "<script>alert('對不起,該用戶名已經(jīng)被注冊!');history.back();</script>"
response.end
end if
if not isDate(userBirthday) then
echo "<script>alert('對不起,您的生日填寫錯誤!');history.back();</script>"
response.end
end if
rs.open "Marcos_User",conn,1,3
rs.addnew
rs("userName")=userName
rs("passWord")=md5(passWord)
rs("userSign")=userSign
rs("userSex")=userSex
rs("userBirthday")=userBirthday
rs("userGroup")=userGroup
rs("regDate")=now()
rs("lastLogin")=now()
rs("lastIP")=ip
for i=1 to request("otherValue").count
if request("otherName")(i)<>"" and request("otherValue")(i)<>"" then
strOther=strOther & request("otherName")(i) & "@@" & request("otherValue")(i) & "$$$"
end if
next
rs("userOther")=strOther
rs.update
rs.close
echo "<script>alert('注冊成功!');location.href='login.asp';</script>"
response.end
end if
str=getMainCode(mySkinId)
pageTitle="<a href=register.asp>用戶注冊</a>"
pageOther="<script>document.title+=' - 填寫注冊資料';</script>"
showHead str,pageTitle,pageOther
showBody()
showFoot(str)
sub showBody()
pageCode=getPageCode(mySkinId,"PageRegister")
echo pageCode
end sub
closeConn()
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -