📄 mb_add.asp
字号:
response.end
end if
if myobj.chkbool(request.form("is_free"))=false then
response.write"<script language=javascript>alert('免费用户值类型错误');history.back();</Script>"
response.end
end if
if request.form("u_type")=1 then
if request.form("point")="" then
response.write"<script language=javascript>alert('请填写用户可用的影币数量');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.form("point"))=false then
response.write"<script language=javascript>alert('影币数量只能是0-9的数字');history.back();</Script>"
response.end
end if
if cint(request.form("point"))<0 then
response.write"<script language=javascript>alert('影币数量不能少于0');history.back();</Script>"
response.end
end if
end if
if request.form("u_type")<>1 then
if request.form("e_year")="" or request.form("e_month")="" or request.form("e_day")="" then
response.write"<script language=javascript>alert('请将用户服务到期时间填写完整');history.back();</Script>"
response.end
end if
if isdate(request.form("e_year")&"-"&request.form("e_month")&"-"&request.form("e_day"))=false then
response.write"<script language=javascript>alert('用户服务到期时间无效');history.back();</Script>"
response.end
end if
end if
if request.form("u_type")=3 then
if request.form("bdip0")="" or request.form("bdip1")="" or request.form("bdip2")="" or request.form("bdip3")="" then
response.write"<script language=javascript>alert('请将与该用户账号绑定的IP地址填写完整');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.form("bdip0"))=false or myobj.ChkNum(request.form("bdip1"))=false or myobj.ChkNum(request.form("bdip2"))=false or myobj.ChkNum(request.form("bdip3"))=false then
response.write"<script language=javascript>alert('IP地址只能填写0-255的数字');history.back();</Script>"
response.end
end if
if request.form("bdip0")=0 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=0 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
if request.form("bdip0")=255 and request.form("bdip1")=255 and request.form("bdip2")=255 and request.form("bdip3")=255 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
if request.form("bdip0")=127 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=1 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
if request.form("bdip0")=224 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=1 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
if request.form("bdip0")=224 and request.form("bdip1")=0 and request.form("bdip2")=0 and request.form("bdip3")=2 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
if request.form("bdip0")=169 and request.form("bdip1")=254 then
response.write"<script language=javascript>alert('绑定的IP地址是无效的或是保留的特殊IP地址,请重新填写');history.back();</Script>"
response.end
end if
end if
if request.form("u_name")<>"" then
if myobj.chkcn(request.form("u_name"))=false then
response.write"<script language=javascript>alert('真实姓名只能填写汉字');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("u_name"))<4 or myobj.ChkLen(request.form("u_name"))>8 then
response.write"<script language=javascript>alert('真实姓名不能少于2个汉字或多于4个汉字');history.back();</Script>"
response.end
end if
end if
if request.form("u_sex")<>"" then
if myobj.chkbool(request.form("u_sex")) then
response.write"<script language=javascript>alert('用户性别的值类型错误');history.back();</Script>"
response.end
end if
end if
if request.form("b_year")<>"" or request.form("b_month")<>"" or request.form("b_day")<>"" then
if request.form("b_year")="" or request.form("b_month")="" or request.form("b_day")="" then
response.write"<script language=javascript>alert('请将出生日期填写完整');history.back();</Script>"
response.end
end if
if isdate(request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day"))=false then
response.write"<script language=javascript>alert('您填写的出生日期无效');history.back();</Script>"
response.end
end if
end if
if request.form("u_add")<>"" then
if myobj.chkcn(request.form("u_add"))=false then
response.write"<script language=javascript>alert('用户所在地区的值错误');history.back();</Script>"
response.end
end if
end if
if request.form("u_qq")<>"" then
if myobj.ChkLen(request.form("u_qq"))<5 or myobj.ChkLen(request.form("u_qq"))>20 then
response.write"<script language=javascript>alert('腾讯QQ号码长度必须为5-20个数字');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.form("u_qq"))=false then
response.write"<script language=javascript>alert('腾讯QQ号码只能填写0-9的数字');history.back();</Script>"
response.end
end if
if left(request.form("u_qq"),1)=0 then
response.write"<script language=javascript>alert('腾讯QQ号码的第一个数字不能是0');history.back();</Script>"
response.end
end if
end if
if request.form("u_msn")<>"" then
if myobj.ChkLen(request.form("u_msn"))>50 then
response.write"<script language=javascript>alert('MSN地址不能大于50个字符');history.back();</Script>"
response.end
end if
if myobj.ChkEmail(request.form("u_msn"))=false then
response.write"<script language=javascript>alert('MSN地址格式错误');history.back();</Script>"
response.end
end if
end if
if request.form("u_email")<>"" then
if myobj.ChkLen(request.form("u_email"))>50 then
response.write"<script language=javascript>alert('电子邮件地址不能大于50个字符');history.back();</Script>"
response.end
end if
if myobj.ChkEmail(request.form("u_email"))=false then
response.write"<script language=javascript>alert('电子邮件地址格式错误');history.back();</Script>"
response.end
end if
end if
if request.form("u_tel")<>"" then
if myobj.ChkNum(request.form("u_tel"))=false then
response.write"<script language=javascript>alert('固定电话的只能填写0-9的数字');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("u_tel"))<>11 then
response.write"<script language=javascript>alert('固定电话的长度必须为11个数字');history.back();</Script>"
response.end
end if
if left(request.form("u_tel"),1)<>0 then
response.write"<script language=javascript>alert('固定电话的第一个数字只能是0');history.back();</Script>"
response.end
end if
end if
if request.form("u_mtel")<>"" then
if myobj.ChkLen(request.form("u_mtel"))<>11 then
response.write"<script language=javascript>alert('手机号码必须是11位的数字');history.back();</Script>"
response.end
end if
if left(request.form("u_mtel"),1)<>1 then
response.write"<script language=javascript>alert('手机号码的第一个数字只能是1');history.back();</Script>"
response.end
end if
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where (id is null)",conn,1,3
rs.addnew
rs("u_type")=request.form("u_type")
rs("userid")=LCase(request.form("userid"))
rs("u_pwd")=md5(request.form("u_pwd"))
rs("pwd_qu")=request.form("pwd_qu")
rs("pwd_an")=md5(request.form("pwd_an"))
rs("is_vip")=cbool(request.form("is_vip"))
rs("is_free")=cbool(request.form("is_free"))
if request.form("u_type")=1 then
rs("point")=request.form("point")
end if
if request.form("u_type")<>1 then
rs("end_time")=request.form("e_year")&"-"&request.form("e_month")&"-"&request.form("e_day")&" "&time()
end if
if request.form("u_type")=3 then
rs("bd_ip")=request.form("bdip0")&"."&request.form("bdip1")&"."&request.form("bdip2")&"."&request.form("bdip3")
end if
if request.form("u_name")<>"" then
rs("u_name")=request.form("u_name")
end if
if request.form("u_sex")<>"" then
rs("u_sex")=cbool(request.form("u_sex"))
end if
if request.form("b_year")<>"" and request.form("b_month")<>"" and request.form("b_day")<>"" and isdate(request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day"))=true then
rs("bd_time")=request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day")&" "&time()
end if
if request.form("u_add")<>"" then
rs("u_add")=request.form("u_add")
end if
if request.form("u_qq")<>"" then
rs("u_qq")=request.form("u_qq")
end if
if request.form("u_msn")<>"" then
rs("u_msn")=request.form("u_msn")
end if
if request.form("u_email")<>"" then
rs("u_email")=request.form("u_email")
end if
if request.form("u_tel")<>"" then
rs("u_tel")=request.form("u_tel")
end if
if request.form("u_mtel")<>"" then
rs("u_mtel")=request.form("u_mtel")
end if
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center" class="font1"><strong class="font1">增加新用户-</strong>完毕</td>
</tr>
</table>
<table width="550" height="150" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><p>新用户增加成功!</p>
<p><a href="<%=filename%>">继续增加新用户</a></p></td>
</tr>
</table>
<%
end sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -