checkuser.asp
来自「一、一般游客: 1.查看论坛资料 二、注册会员: 1.修改本人资料 」· ASP 代码 · 共 35 行
ASP
35 行
<%@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 + =
减小字号Ctrl + -
显示快捷键?