📄 checklogin.asp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!--#include file="conn.asp"-->
<%
user_name=trim(request("name"))
user_psw=request("psw")
session("user_name")=""
'session("logtime")=now()
session("logdate")=date()
session("logtime")=time()
if user_name="" then
session("msg")="用户名不能为空!"
'msgbox session("msg")
'<script language=vbscript>
'msgbox "用户名不能为空!"
elseif user_psw="" then
session("msg")="用户密码不能为空!"
end if
set rs=createobject("adodb.recordset")
sql="select user_psw from users where user_name='"&user_name&"'"
rs.open sql,conn,1,3
if rs.eof then
session("msg")="该用户名不存在!"
else
if rs("user_psw")<>user_psw then
session("msg")="密码错误!"
else
session("msg")=""
session("user_name")=user_name
session("user_passed")=true
response.redirect("jiaoliu.asp")
end if
end if
rs.close
'set rs=nothing
if session("msg")<>"" then
response.redirect("login.asp")
end if
%>
<script language=vbscript>
<!--
msgbox( "用户名不能为空!")
-->
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -