📄 admin.login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
if Request("post")="login" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from admin where username = '"&HTMLEncode(Request("username"))&"' and userpass = '"&md5(Request("userpass"))&"' ",conn,1,3
if rs.eof or rs.bof then
error = "错误的用户名或密码!"
Else
Response.Cookies("username")=Request("username")
Response.Cookies("userpass")=md5(Request("userpass"))
Response.Redirect("admin.article.asp")
End if
End if
if Request("post")="quit" then
Response.Cookies("username")=""
Response.Cookies("userpass")=""
error = "退出成功!"
End if
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Welcome Administrator</title>
<style>
<!--
body, title, a:link, a, a:active, a:visited, main, td, tr, input { font-family: 宋体; font-size: 9pt; text-decoration: none; color: #000000 }
a:hover {color: #FF0000; font-family: 宋体; font-size: 10pt; text-decoration: none}
-->
</style>
</head>
<body>
<p align="center"> </p>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border:4px double #808080; border-collapse: collapse; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1" bordercolor="#111111" width="300" height="149">
<form method="POST" action="?post=login">
<tr>
<td width="100%" height="29" bgcolor="#F7F7F7" align="center"><b>管理员登陆</b></td>
</tr>
<tr>
<td width="100%" height="30" align="center">username:<input type="text" name="username" size="20" style="border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #000000; padding: 0"></td>
</tr>
<tr>
<td width="100%" height="30" align="center">userpass:<input type="password" name="userpass" size="20" style="border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #000000; padding: 0"></td>
</tr>
<tr>
<td width="100%" height="30" align="center">System Hint:<%
if error="" then
%>请输入用户名和密码<%
Else
Response.Write Error
End if
%></td>
</tr>
<tr>
<td width="100%" height="30" align="center">
<input type="submit" value="登陆" name="B1" style="border: 1px solid #FFFFFF; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<input type="reset" value="重置" name="B1" style="border: 1px solid #FFFFFF; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></td>
</tr>
</form>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -