📄 userreg.asp
字号:
<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="HMconnection.asp"-->
<!--#include file="webconfig.asp"-->
<%dim action
action=request.QueryString("action")%>
<html>
<head>
<title><%=webname%>-新用户注册</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style/style.css" type="text/css">
</head>
<body bgcolor="#B2DBFD" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="index1.files/background-extender.gif" oncontextmenu=self.event.returnValue=false onselectstart="return false">
<div align=center>
<table width="775" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#E5E5E5">
<tr>
<td>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="98%">
<tr> <td bgcolor="#FFFFFF">
<div align="center"> <!--#include file="webtop.asp"--></div>
</td></tr>
</table>
<div align=center>
<table cellspacing=0 cellpadding=0 width="98%" border=0 bgcolor="#FFFFFF">
<tbody>
<tr>
<td width="1" bgcolor="#0000FF">
</td>
<td valign=top width=195 background="index1.files/orange.jpg ">
<div align="left">
<!--#include file="webleft.asp"-->
</div>
</td>
<td valign=top width="589"> <table cellspacing=0 cellpadding=0 width="100%" align=center
bgcolor=#ffffff border=0> <tbody> <tr> <td height=1></td></tr> </tbody>
</table>
<%select case action
case ""%>
<table cellspacing=0 cellpadding=0 width="100%" border=0> <tbody> <tr valign=top>
<td colspan=2 height=40> <div align=center>
<table cellspacing=0 cellpadding=0 width="98%" border=0> <tbody>
<tr valign=top>
<td colspan=2 height=40 valign="middle">
<div align=center><br>
<b><font color="#FF0000" size="2"><%=webname%>注册条约</font></b>
<hr width="80%" size="1" noshade>
<table border="0" width="459" height="29">
<tr>
<td align="center"> <font size="2" color="#000000">1、有任何问题请联系:
Email:<a href="mailto:<%=email%>"><%=email%></a> QQ:<%=masterqq%></font></td>
</tr>
</table>
<hr width="80%" size="1" noshade>
<br>
<table border="0" width="80%" height="150" align="center" cellpadding="3" cellspacing="0">
<tr>
<td bgcolor="#eeeeee">
<%call tiaoyue()%>
</td>
</tr>
<tr>
<form name="form1" method="post" action="UserReg.asp?action=yes">
<td height="36">
<div align="center"> <br>
<input type="submit" name="Submit4"style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="我 同 意">
<input type="button" name="Submit22" value="我 不 同 意" style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee"onClick="location.href='index.asp'">
</div>
</td>
</form>
<%case "yes"%>
<table cellspacing=0 cellpadding=0 width="100%" border=0> <tbody> <tr valign=top>
<td colspan=2 height=40> <div align=center>
<table cellspacing=0 cellpadding=0 width="98%" border=0> <tbody>
<tr valign=top>
<td colspan=2 height=40 valign="middle">
<div align=center><br>
<font color="#FF0000" size="2">用户须知</font>
<hr width="80%" size="1" noshade>
<table border="0" width="459" height="29">
<tr>
<td align="left"> <font size="2" color="#000000"> 1、有任何问题请联系:
Email:<a href="mailto:<%=email%>"><%=email%></a> QQ:<%=masterqq%>
<br> 2、“密码”和“提示答案”采用不可逆转方式加密算法,请务必记劳!
<br> 3、“Email”和“提示答案”是您找回密码的唯一凭证,请认真填写!</font></td>
</tr>
</table>
<hr width="80%" size="1" noshade>
<br>
<table border="0" width="345" height="300" align="center" cellpadding="3" cellspacing="0">
<form name="userinfo" action="member/Userreg2.asp?action=regdo" method="post" >
<tr>
<td width="32%" >
<div align="right"><font color="#000000">户
名:</font></div>
</td>
<td width="68%" > <font color="#000000">
<input style="border: 1px solid #000000" name=username size=15 >
<font color="#FF0000">*</font> 4-15位数</font></td>
</tr>
<tr>
<td width="32%" >
<div align="right"><font color="#000000">密
码:</font></div>
</td>
<td width="68%" > <font color="#000000">
<input style="border: 1px solid #000000" size=10 name=userpassword type="password">
<font color="#FF0000">* <font color="#000000">最少4位</font></font></font></td>
</tr>
<tr>
<td width="32%" >
<div align="right"><font color="#000000">确
认:</font></div>
</td>
<td width="68%" > <font color="#000000">
<input style="border: 1px solid #000000" size=10 name=userpassword1 type="password">
<font color="#FF0000"> * </font></font></td>
</tr>
<tr>
<td width="32%" >
<div align="right">性
别:</div>
</td>
<td width="68%" >
<input type=radio CHECKED value="1" name=sex>
男
<input type=radio value="0" name=sex>
女</td>
</tr>
<tr>
<td width="32%" >
<div align="right">Email:</div>
</td>
<td width="68%" >
<input style="border: 1px solid #000000" name=useremail size=20 >
<font color="#FF0000">* </font></td>
</tr>
<tr>
<td width="32%" >
<div align="right">提示问题:</div>
</td>
<td width="68%" >
<input style="border: 1px solid #000000" name=question size=20 >
<font color="#FF0000">* </font></td>
</tr>
<tr>
<td width="32%" height="13" >
<div align="right">提示答案:</div>
</td>
<td width="68%" height="13" >
<input style="border: 1px solid #000000" name=answer size=20 >
<font color="#FF0000">*</font> 请牢记</td>
</tr>
<tr>
<td colspan="2" align="center"> <br>
<input type="hidden" name="submit" value="mysubmit">
<input onClick="return check();" type="image" border="0" name="submit" value="mysubmit" src="images/ok.gif" width="45" height="20" align=absMiddle>
<a href="####" onClick=reset()><img src="images/esc.gif" width="45" height="20" border="0" align=absMiddle></a><br>
<br>
</td>
</tr>
</form>
<%end select%>
</table>
</div></td></tr> <tr> <td colspan=4 height=3></td>
</tr>
</tbody> </table></div></td></tr> <tr> <td colspan=4 height=2></td></tr>
</tbody> </table></td>
<td width="1" bgcolor="#0000FF"></td>
</tr>
</tbody>
</table>
<!--#include file="webbottom.asp"-->
</td>
</tr>
</table>
</div>
</html>
<%sub tiaoyue()
dim objRS8
set objRS8=server.CreateObject("adodb.recordset")
objRS8.Open "select regtiaoyue from webconfig",conn,1,1
response.Write trim(objRS8("regtiaoyue"))
objRS8.Close
set objRS8=nothing
end sub%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check()
{
if(checkspace(document.userinfo.username.value)) {
document.userinfo.username.focus();
alert("用户名不能为空,请重新输入!");
return false;
}
if(document.userinfo.username.value.length < 4 || document.userinfo.username.value.length >15 ) {
document.userinfo.username.focus();
alert("用户名长度必须在4-15之间,请重新输入!");
return false;
}
if(checkspace(document.userinfo.userpassword.value) || document.userinfo.userpassword.value.length < 4) {
document.userinfo.userpassword.focus();
alert("密码长度不能小于4,请重新输入!");
return false;
}
if(document.userinfo.userpassword.value != document.userinfo.userpassword1.value) {
document.userinfo.userpassword.focus();
document.userinfo.userpassword.value = '';
document.userinfo.userpassword1.value = '';
alert("两次输入的密码不同,请重新输入!");
return false;
}
if(document.userinfo.useremail.value.length!=0)
{
if (document.userinfo.useremail.value.charAt(0)=="." ||
document.userinfo.useremail.value.charAt(0)=="@"||
document.userinfo.useremail.value.indexOf('@', 0) == -1 ||
document.userinfo.useremail.value.indexOf('.', 0) == -1 ||
document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
{
alert("Email地址格式不正确!");
document.userinfo.useremail.focus();
return false;
}
}
else
{
alert("Email不能为空!");
document.userinfo.useremail.focus();
return false;
}
if(checkspace(document.userinfo.question.value)) {
document.userinfo.question.focus();
alert("提示问题不能空,请重新输入!");
return false;
}
if(checkspace(document.userinfo.answer.value)) {
document.userinfo.answer.focus();
alert("提示答案不能空,请重新输入!");
return false;
}
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -