📄 reg_usercode.asp
字号:
<%@ Language=VBScript %>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="../dsn.asp" -->
<!-- #include file="init.inc" -->
<%
set cn = Server.CreateObject("ADODB.Connection")
cn.Open(mycnstr)
set rs = Server.CreateObject("ADODB.Recordset")
usercode=Request.QueryString("usercode")
errflag=Request.QueryString("errflag")
%>
<!--#include file="begin.asp" -->
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30">
<tr>
<td width="20"> </td>
<td>欢迎光临<%=forumtitle%></td>
<td width="10"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30" bgcolor="<%=barcolor%>">
<tr>
<td width="10"> </td>
<td width=30 align=center><img src="images/homeflag.gif"></td>
<%if classflag="1" then%>
<td><a href="forum.asp"><%=forumtitle%></a> > 用户注册 > 选择用户名 </td>
<%else%>
<td><a href="forum_list.asp"><%=forumtitle%></a> > 用户注册 > 选择用户名</td>
<%end if%>
<td width="100" align="right"></td>
<td width="10"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="<%=titlebgcolor%>">
<td height="26" width=30></td>
<td align="center"><b><font color=<%=titlecolor%>>第二步:选择会员代号</font></b></td>
<td> </td>
</tr>
</table>
<table width="90%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=tablecolor%>">
<tr bgcolor="#ffffff">
<td class="font1" style="line-height:180%" valign=middle height=360>
<table width="550" cellspacing="0" cellpadding="1" border="0" align=center>
<tr>
<td bgcolor=cccccc>
<table width=100% bgcolor=FFFFFF cellpadding=3 cellspacing=5>
<form name=form1 method=post action="reg_adduser.asp" onsubmit="return checkform(form1)" autocomplete = "off">
<tr><td colspan=2 align=center height=60>
<%if errflag="1" then%>
<font color=red><B>很遗憾 :(</B></font><BR><BR>
<font face=webdings color=fe8c14>4</font>会员代号<font color=FF6600><%=username%></font>已经被占用,请您重新选择一个 !
<%else%>
只有注册成为本网站的会员后才能享受到相应服务
<%end if%>
</td></tr>
<tr><td width=180 align=right>请填写会员代号:</td>
<td align=left>
<input type=text name=usercode size=25 maxlength=16 value=""><br>
</td></tr>
<tr><td width=180 align=right></td>
<td align=left>
</td></tr>
<tr><td colspan=2 align=center height=15></td></tr>
<tr><td colspan=2 align=center>
<input type=submit value="确 认" name=submit style="width:75px; height:24px">
<input type="reset" name="reset" value="重 填" style="width:75px; height:24px"><br><br>
</td></tr>
</form>
</table>
<table width="100%" bgcolor="FFFFFF" cellpadding=4 cellspacing=4>
<tr><td align=center><font face=webdings color=fe8c14>4</font>合法的会员代号应该由
<font color=FF6600>a-z</font>的英文字母(不区分大小写)、<font color=FF6600>0-9</font>的数字、<font color=FF6600>汉字</font>或<font color=FF6600>下划线</font>组成。
</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
<tr bgcolor="#e4f4e9">
<td align="center" height=40>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="20"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- #include file="end.asp" -->
<script language=Javascript>
form1.usercode.focus();
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
function checkform(form)
{
var usercode;
var flag=true;
if(form("usercode").value==""){alert("请填入会员名!");form("usercode").focus();return false;}
usercode=form("usercode").value;
usercode=usercode.trim();
if(usercode.substring(0,1)=="*"){alert("会员名不能以[*]开头!");form("usercode").focus();return false;}
return flag;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -