📄 userindex.asp
字号:
<%
dim pathlevel,username,passowrd,rs,sql,updatesql
pathlevel="../"
%>
<!--#include file="../share/checkinput.asp" -->
<!--#include file="../database/conn.asp" -->
<!--#include file="../share/md5.asp" -->
<%
username=trim(request.Form("username"))
password=trim(request.Form("password"))
if username="" or password="" then
response.Redirect("userlogin.asp?ec=1")
end if
call checkinput(username&password)
password=MD5(password)
set rs=server.CreateObject("adodb.recordset")
sql="select top 1 u_id,username,state from userinfo where username='"&username&"' and password='"&password&"'"
rs.open sql,cn,1,3
if rs.eof then
response.redirect("userlogin.asp?ec=2")
else
if rs("state")=1 then
else
response.Redirect("userlogin.asp?ec=4")
end if
session("logined")=rs("u_id")
session("username")=rs("username")
updatesql="update userinfo set loginamout=loginamout+1,logindate='"&now()&"' where u_id="&rs("u_id")
cn.execute(updatesql)
end if
rs.close
set rs=nothing
cn.close
set cn=nothing
response.Redirect("../survey/index.asp")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -