📄 web_person_register.asp
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="Web_Session.asp" -->
<%
Dim Action,Comid,PageNo
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//检测管理员是否有权限操作该页面
If Instr(1,Session("Web_Power"),"125") <= 0 Then
Call CloseDB()
Response.write "对不起!您没有访问该页面的权限..."
Response.End()
End If
Action = Replace_text(request.QueryString("action"))
Select Case Action
Case "edit"
Call Edit_Submit() '//跳转到编辑函数
End Select
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
function checkaccount(username)
{
var re, r;
re = /\S/;
r = username.match(re);
if (!r)
{
alert("请输入用户名!");
return false;
}
else
{
window.open("../Person/Accountcheck.asp?action=cusername&value="+username,"")
}
}
function checkuseremail(username)
{
var re, r;
re = /\S/;
r = username.match(re);
if (!r)
{
alert("请邮箱地址!");
return false;
}
else
{
window.open("../Person/Accountcheck.asp?action=cuseremail&value="+username,"")
}
}
function is_zw(str)
{
exp=/[0-9a-zA-Z_]/g;
if(str.search(exp) != -1)
{
return false;
}
return true;
}
function is_number(str)
{
exp=/[^0-9()-]/g;
if(str.search(exp) != -1)
{
return false;
}
return true;
}
function check_reg(){
if (document.reg.username.value==""){
alert("用户名不能为空!请继续注册...");
document.reg.username.focus();
return false;
}
if (document.reg.username.value.length<4 || document.reg.username.value.length>20){
alert("用户名必须是4-20位的字符!请继续注册...");
document.reg.username.focus();
return false;
}
if (is_zw(document.reg.username.value)){
alert("用户名不能是中文文字!请继续注册...");
document.reg.username.focus();
return false;
}
if (document.reg.password.value==""){
alert("密码不能是空值!请继续注册...");
document.reg.password.focus();
return false;
}
if (document.reg.password.value==document.reg.username.value ){
alert("密码不能与用户名相同!请继续注册...");
document.reg.password.focus();
return false;
}
if (document.reg.password.value.length<6 ){
alert("密码不能低于6位的符号!请继续注册...");
document.reg.password.focus();
return false;
}
if (document.reg.password2.value==""){
alert("确认密码不能是空值!请继续注册...");
document.reg.password2.focus();
return false;
}
if (document.reg.password2.value!=document.reg.password.value){
alert("确认密码与密码不相同!请继续注册...");
document.reg.password2.focus();
return false;
}
if (document.reg.question.value==""){
alert("密码提示问题必须输入!请继续注册...");
document.reg.question.focus();
return false;
}
if (document.reg.answer.value==""){
alert("提示答案必须输入!请继续注册...");
document.reg.answer.focus();
return false;
}
if (document.reg.useremail.value==""){
alert("用户的邮箱必须输入!请继续注册...");
document.reg.useremail.focus();
return false;
}
if(document.reg.useremail.value.indexOf("@")==-1 || document.reg.useremail.value.indexOf(".")==-1){
alert("用户的邮箱格式不正确!请继续注册...");
document.reg.useremail.focus();
return false;
}
if (document.reg.realname.value==""){
alert("用户真实姓名不能为空值!请继续注册...");
document.reg.realname.focus();
return false;
}
if (!is_zw(document.reg.realname.value)){
alert("用户真实姓名必须是中文文字!请继续注册...");
document.reg.realname.focus();
return false;
}
if (document.reg.realname.value.length<2 || document.reg.realname.value.length>10){
alert("用户真实姓名必须是2-10个中文文字组成!请继续注册...");
document.reg.realname.focus();
return false;
}
if (document.reg.birthyear.value==""){
alert("出生年份不能为空值!请继续注册...");
document.reg.birthyear.focus();
return false;
}
if (document.reg.birthyear.value.match(/\D/)){
alert("出生年份必须是合法的数字!请继续注册...");
document.reg.birthyear.focus();
return false;
}
if (document.reg.stature.value==""){
alert("您的身高不能为空值!请继续注册...");
document.reg.stature.focus();
return false;
}
if (document.reg.stature.value.match(/\D/)){
alert("您的身高必须是合法的数字!请继续注册...");
document.reg.stature.focus();
return false;
}
if (document.reg.tizhong.value==""){
alert("您的体重不能为空值!请继续注册...");
document.reg.tizhong.focus();
return false;
}
if (document.reg.tizhong.value.match(/\D/)){
alert("您的体重必须是合法的数字!请继续注册...");
document.reg.tizhong.focus();
return false;
}
if (document.reg.codeid.value==""){
alert("您的证件号码不能为空值!请继续注册...");
document.reg.codeid.focus();
return false;
}
if (document.reg.codeid.value.length<15){
alert("您的证件号码格式不正确!请继续注册...");
document.reg.codeid.focus();
return false;
}
if (document.reg.lastschool.value==""){
alert("请填写您的毕业院校!请继续注册...");
document.reg.lastschool.focus();
return false;
}
if (document.reg.byear.value==""){
alert("请填写您的毕业年份!请继续注册...");
document.reg.byear.focus();
return false;
}
if (document.reg.byear.value.match(/\D/)){
alert("毕业年份必须是合法的数字!请继续注册...");
document.reg.byear.focus();
return false;
}
if (document.reg.speciality.value==""){
alert("请填写您的专业名称!请继续注册...");
document.reg.speciality.focus();
return false;
}
if (document.reg.personphone.value==""){
alert("您的联系电话不能为空值!请继续注册...");
document.reg.personphone.focus();
return false;
}
if (!is_number(document.reg.personphone.value)){
alert("联系电话只能含有0-9和-!请继续注册...");
document.reg.personphone.focus();
return false;
}
if (!is_number(document.reg.mt.value)){
alert("移动电话只能含有0-9和-!请继续注册...");
document.reg.mt.focus();
return false;
}
if (document.reg.zipcode.value==""){
alert("邮政编码不能为空!请继续注册...");
document.reg.zipcode.focus();
return false;
}
if (document.reg.zipcode.value.match(/\D/)){
alert("邮政编码必须是合法的数字!请继续注册...");
document.reg.zipcode.focus();
return false;
}
if (document.reg.address.value==""){
alert("通讯地址不能为空!请继续注册...");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -