📄 checklogin.asp
字号:
<!--#include file=../system/include/config.asp-->
<!--#include file=../share/conn_system.asp-->
<!--#include file=../system/include/function.asp-->
<%
dim user,password,strSql,rsTmp,retValue
user=request("username")
password=request("password")
if request("username")="" then
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("用户名不能为空!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
end if
if password="" then
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("密码不能为空!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
end if
set rsTmp=Server.CreateObject("ADODB.RecordSet")
strSql = "select * from [user_zj] where username='" & convertsql(user) & "'"
strSql = strSql & " and password='" & convertsql(password) & "' and pass='是'"
rsTmp.open strSql,conn,3,3
if rsTmp.eof then
retValue=1
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("'该用户不存在' 或 '密码不正确'!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
else
retValue=0
'##设置session
session("adminlogin")=""
session("zjlogin")="ok"
session("zj_id")=rsTmp("id")
session("user_name")=rsTmp("username")
session("zj_name")=rsTmp("zj_name")
session("zj_tel")=rsTmp("tel")
session("zj_email")=rsTmp("email")
rsTmp("last_date")=now()
rsTmp.update
end if
rsTmp.close
set rsTmp=nothing
conn.close
set conn=nothing
'##跳转到另一页去
if retValue=0 then
response.redirect "index.asp"
end if
%>
<!--#include file=../system/include/foot.asp-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -