📄 usersave.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%if newreg=0 then
response.write "<script language=javascript>alert('网站用户注册过多,暂时停止注册,谢谢您的光临!!!');history.back(1);</script>"
Response.End
else
end if
%>
<%
function IsValidEmail(email)
'Check for valid syntax in an email address.
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
sub error()
%>
<div align="center">
<center>
<table cellpadding=0 cellspacing=0 border=0 width=750 height="1" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="1" width="750" colspan="3" background="images/line_bg01.gif">
<img border="0" src="images/line_bg01.gif"></td>
</tr>
<tr>
<td height="41" width="1" background="images/line_bg02.gif">
<img border="0" src="images/line_bg02.gif"></td>
<td height="41" width="742">
<table cellpadding=3 cellspacing=1 border=0 width=100% bgcolor="<%=Tablebackcolor%>">
<tr align="center">
<td width="100%">错误信息:</td>
</tr>
<tr>
<td width="100%"><b>产生错误的可能原因:<br><%=errmsg%></td>
</tr>
<tr align="center">
<td width="100%"><a href="javascript:history.go(-1)"> << 返回上一页</a></td>
</tr>
</table>
</td>
<td height="41" width="5" background="images/line_bg02.gif">
<img border="0" src="images/line_bg02.gif"></td>
</tr>
<tr>
<td height="1" width="750" colspan="3" background="images/line_bg01.gif">
<img border="0" src="images/line_bg01.gif"></td>
</tr>
</table>
</center>
</div>
<br>
<%
end sub
founderr=false
if isnull(session("HappyMusicPwd")) or session("HappyMusicPwd")="" or isnull(session("DJ58User")) or session("DJ58User")="" then
errmsg=errmsg+"<br>"+"<li>你尚未登陆。"
founderr=true
end if
if trim(request("password"))="" or Len(request("password"))>10 then
errmsg=errmsg+"<br>"+"<li>请输入您的密码(长度不能大于10)。"
founderr=true
else
password=trim(request("password"))
end if
if request("sex")="" then
errmsg=errmsg+"<br>"+"<li>请选择您的性别。"
founderr=true
elseif request("sex")=0 or request("sex")=1 then
sex=request("sex")
else
errmsg=errmsg+"<br>"+"<li>您输入的字符非法。"
founderr=true
end if
if password<>request("password2") then
errmsg=errmsg+"<br>"+"<li>您输入的密码和确认密码不一致。"
founderr=true
end if
if IsValidEmail(trim(request("Email")))=false then
errmsg=errmsg+"<br>"+"<li>您的Email有错误。"
founderr=true
else
Email=trim(request("Email"))
end if
if request("UserWebName")="" and request("UserWebUrl")<>"" then
errmsg=errmsg+"<br>"+"<li>如果您填写主页地址,那么主页名称也要填上!!!"
founderr=true
end if
if request("UserWebName")<>"" and request("UserWebUrl")="" then
errmsg=errmsg+"<br>"+"<li>如果您填写主页名称,那么主页地址也要填上!!!"
founderr=true
end if
if Instr(request("UserName"),"=")>0 or Instr(request("UserName"),"%")>0 or Instr(request("UserName"),chr(32))>0 or Instr(request("UserName"),"?")>0 or Instr(request("UserName"),"&")>0 or Instr(request("UserName"),";")>0 or Instr(request("UserName"),",")>0 or Instr(request("UserName"),"'")>0 or Instr(request("UserName"),",")>0 or Instr(request("UserName"),chr(34))>0 or Instr(request("UserName"),chr(9))>0 or Instr(request("UserName"),"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -