📄 checkuser.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
dim uid ,upwd
uid=trim(Request.Form("uid"))
upwd=trim(Request.Form("pwd"))
if uid= "管理员" or uid= "会长" then
response.write "<script language=JavaScript>{window.alert('提示: 非法呢称!');window.history.go(-1)}</script>"
response.end
else
set rs=server.createobject("adodb.recordset")
sqltext="select * from hydsh where hy_nch='" & uid & "' and hy_pwd='" & upwd & "'"
rs.open sqltext,conn,1,1
'查找数据库,检查用户名是否存在
if rs.recordcount >= 1 then
response.cookies("user") = rs("hy_nch")
rs.close
set rs=server.createobject("adodb.recordset")
sqltext="select * from hyinfor where hy_nch='" & uid & "' and hy_pwd='" & upwd & "'"
rs.open sqltext,conn,1,1
if rs.recordcount >= 1 then
response.cookies("stname") = rs("hy_st")
else
response.cookies("stname")=""
end if
Response.Redirect "default.asp"
else
response.write "<script language=JavaScript>{window.alert('输入的账户或密码错误,请重新输入!');window.history.go(-1);}</script>"
end if
response.end
rs.close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -