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

📄 admin_checkname.asp

📁 本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置、MSSQL/MySQL数据库方面的专业问题请自行解决。 本人仅提供本系统相关的一些技术问题的解释、解答。
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../inc/config.asp"-->
<!-- #include file="session.asp" -->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<script language="javaScript" src="../js/js.js"></script>
</head>

<body>
<%Select Case request.querystring("info")
	Case "author"
		Call author()
	Case "user"
		Call user()
	Case "authoradd"
		Call authoradd()
end select 

Sub author()
key_Name=CheckSql(request("Name"))
	if key_Name="" then
		FoundErr=True
		ErrCodes = ErrCodes & "<li>您查寻的输入内容为空!</li><br>"
	end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Set RSche=Server.CreateObject("ADODB.RecordSet")
	if IsSqlDataBase = 2 then
		SQLche="SELECT author_Name FROM author WHERE author_Name='"&key_Name&"'"
	else
		SQLche="SELECT author_Name FROM [author] WHERE author_Name='"&key_Name&"'"
	end if
	RSche.Open SQLche,Conn,1,1
	If Not RSche.BOF Or Not RSche.BOF Then
		ErrCodes = ErrCodes & "<li>您所输入的笔名已存在,请更换重新注册!</li><br>"
		FoundErr=True
	Else
		SuccessCodes = " 您所输入的笔名 "&key_Name&" 还没有被注册,您可以使用!</li><br>"
	End If
	RSche.Close
	set RSche=nothing
conn.close
set conn=nothing
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Call ShowAdminSuccessMsg(SuccessCodes,"javascript:window.close()")
end if
end if
end sub

sub user()
key_Name=CheckSql(request("Name"))
	if key_Name="" then
		FoundErr=True
		ErrCodes = ErrCodes & "<li>您查寻的输入内容为空!</li><br>"
	end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Set RSche=Server.CreateObject("ADODB.RecordSet")
	if IsSqlDataBase = 2 then
		SQLche="SELECT Name FROM Userinfo WHERE Name='"&key_Name&"'"
	else
		SQLche="SELECT Name FROM [Userinfo] WHERE Name='"&key_Name&"'"
	end if
	RSche.Open SQLche,Conn,1,1
	If Not RSche.BOF Or Not RSche.BOF Then
		ErrCodes = ErrCodes & "<li>您所输入的昵称已存在,请更换重新注册! </li><br>"
		FoundErr=True
	Else
		SuccessCodes = "您所输入的昵称 "&key_Name&" 还没有被注册,您可以使用! </li><br>"
	End If
	RSche.Close
	set RSche=nothing
conn.close
set conn=nothing
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Call ShowAdminSuccessMsg(SuccessCodes,"javascript:window.close()")
end if
end if
end sub

sub authoradd()
key_Name=CheckSql(request("a"))
key_Names=CheckSql(request("b"))
	if key_Name="" or key_Names="" then
		FoundErr=True
		ErrCodes = ErrCodes & "<li>您查寻的输入内容为空!</li><br>"
	end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Set RSche=Server.CreateObject("ADODB.RecordSet")
	if IsSqlDataBase = 2 then
		SQLche="SELECT author_userName FROM author WHERE author_userName='"&key_Name&"'"
	else
		SQLche="SELECT author_userName FROM [author] WHERE author_userName='"&key_Name&"'"
	end if
	RSche.Open SQLche,Conn,1,1
	If Not RSche.BOF Or Not RSche.BOF Then
		ErrCodes = ErrCodes & "<li>您所输入的登陆名已存在,请更换重新注册! </li><br>"
		FoundErr=True
	Else
		Set RSche1=Server.CreateObject("ADODB.RecordSet")
		if IsSqlDataBase = 2 then
			SQLche1="SELECT author_Name FROM author WHERE author_Name='"&key_Names&"'"
		else
			SQLche1="SELECT author_Name FROM [author] WHERE author_Name='"&key_Names&"'"
		end if
		RSche1.Open SQLche1,Conn,1,1
		If Not RSche1.BOF Or Not RSche1.BOF Then
			ErrCodes = ErrCodes & "<li>您所输入的笔名已存在,请更换重新注册! </li><br>"
			FoundErr=True
		Else
			SuccessCodes = " 您所输入的登陆名 "&key_Name&" 和笔名 "&key_Names&" 还没有被注册,您可以使用!  </li><br>"
		End If
		RSche1.Close
		set RSche1=nothing
	End If
	RSche.Close
	set RSche=nothing
	conn.close
set conn=nothing
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
	Call ShowAdminSuccessMsg(SuccessCodes,"javascript:window.close()")
end if
end if
end sub%>
</body>

</html>

⌨️ 快捷键说明

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