?? loginchick.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
dim admin,password
admin=request.Form("admin")
password=md5(request.Form("password"))
if admin="" or request.Form("password")="" then
response.Write("<script>alert('用戶名密碼不能為空');window.location.href('login.asp')</script>")
response.End()
end if
set rs=server.createobject("adodb.recordset")
cmd="select * from admin where username like '"&admin&"' and password like '"&password&"'"
rs.open cmd,conn,1,3
if not rs.eof then
session("admin")=rs("username")
session("key")=rs("key")
response.Write("<script>alert('用戶登陸成功');window.location.href('main.asp')</script>")
else
response.Write("<script>alert('用戶登陸失敗');window.location.href('login.asp')</script>")
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
</head>
<body>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -