⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkusername.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
字号:
<!--#include file="include/conn.asp"-->
<!--#include file="include/config.asp"-->
<!--#include file="include/ms_publicfunction.asp"-->
<%
dim username,messageStr
username=trim(request("username"))
if username="" then
	showChkMsg "用户名不能为空","出错信息"
	response.end
elseif strLength(username)<3 or len(username)>12 then
	showChkMsg "用户名不能小于 <font color=""#ff0000"">3</font> 个字符或者大于 <font color=""#ff0000"">12</font> 个字符","出错信息"
	response.end
end if
if chkIsAvaStr(username)=false then
	showChkMsg "用户名含有非法字符","出错信息"
	response.end
end if
if userIsEnable(username)=false then
	showChkMsg "很抱歉,<font color=""#ff0000"">"&username&"</font> 用户名已被禁用或已有人使用了,请换其它试试看","用户名无效"
	response.end
end if
set rs=conn.execute("select user_name from ms_user where user_name='"&lcase(chkFormStr(username))&"'")
if not rs.eof and not rs.bof then
	showChkMsg "很遗憾,<font color=""#ff0000"">"&username&"</font> 用户名已经被注册了,请更换其它试试看!","该用户名不可使用"
	rs.close
	set rs=nothing
	response.end
else
	showChkMsg "恭喜恭喜!<font color=""#ff0000"">"&username&"</font> 用户名还没有人注册,赶快注册吧!","用户名可以使用"
	rs.close
	set rs=nothing
	response.end
end if
sub showChkMsg(messageStr,title)
%>
<html>
<head>
<title>用户名检测</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="320" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
	<th align="center" style="font-size:12px;">系统返回信息</th>
</tr>
<tr>
	<td align="center" style="font-size:12px;"><%=messageStr%></td>
</tr>
<tr>
	<td align="center" style="font-size:12px;">【<a href='javascript:onclick=window.close()'>关闭本窗口</a>】</td>
</tr>
</table>
</body>
</html>
<%end sub
'========================================================
'MaoSin CMS 1.1      Power by maosin.com
'Email: maosin@163.com , maosin@maosin.com
'Web: http://www.maosin.com  http://www.maosin.net
'Copyright (C) 2006 maosin.com All Rights Reserved.
'========================================================
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -