?? checklogin.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../include/conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登錄驗證</title>
</head>
<body>
<%
on error resume next
userid=Trim(Request("userid")) '提交用戶ID號
userpwd=Request("userpwd") '提交用戶密碼
If userid="" Then
Session("msg")="用戶ID不能為空"
ElseIf userpwd="" Then
Session("msg")="用戶密碼不能為空"
end if
%>
<%
Set rs=Server.CreateObject("ADODB.Recordset")
Strsql="Select * from tb_User where UserID='"&userid&"'"
rs.open Strsql,conn,3,3
if not isnumeric(userid) then '如果不存在該ID號
Session("msg")="請輸入正確ID"
else
If rs.Eof Then '如果用戶不存在
Session("msg")="不存在此用戶"
Else
If rs("UserPass")<>userpwd Then
Session("msg")="密碼錯誤"
Else
Session("msg")=""
Session("UserID")=userid
Session("flag")=rs("Flag")
Session("passed")=true
Session("Timeout")=90
Session("username")=rs("UserName")
Response.Redirect("../default.htm") '登錄成功跳轉(zhuǎn)到后臺管理首頁
End If
End If
End If
If Session("msg")<>"" Then
Response.Redirect("../default.asp") '密碼錯誤跳轉(zhuǎn)到后臺登錄頁面
End If
Rs.close '關(guān)閉記錄集
Set Rs=Nothing '將記錄集在系統(tǒng)內(nèi)存中清除
%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -