check.asp

来自「新生入学查询、学生档案成绩管理系统,该系统实了不同权限者对数据库的操作和使用.有」· ASP 代码 · 共 32 行

ASP
32
字号
<!--#include file="conn.asp"-->

<%
dim admin_name,admin_pwd
admin_name=trim(request("name"))
admin_pwd=trim(request("pwd"))

if admin_name="" or admin_pwd="" then
response.write "<script>alert('对不起,用户名和密码不能为空!');document.location.href='admin_index.asp';</script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from admin where admin_name='"&admin_name&"'"
rs.open sql,conn,1,1

%>
<%
if not rs.eof then
	if rs("admin_pwd")<>admin_pwd then
		response.write "<script>alert('对不起,密码不正确,请重新输入');document.location.href='admin_index.asp';</script>"
		response.end
	else
		session("user")=admin_name
		response.redirect "info_manager.asp"
	end if
else
	response.write "<script>alert('对不起,你的用户名不存在,请与管理员联系!');document.location.href='admin_index.asp';</script>"
	response.end
end if
		
%>

⌨️ 快捷键说明

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