📄 login.asp
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Md5.asp"-->
<%
'判断是否注销
If session("username")<>"" then
Response.Write "<script>alert('请注销后在登录!');this.location.href='Admin_index.asp';</SCRIPT>"
Response.End
End If
'登陆调用
If Request.QueryString("action")="login" then
dim sql,mRs,username,password
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
If username="" then
FoundErr=True
Response.Redirect "Index.asp"
Response.End
End If
If password="" then
FoundErr=True
Response.Redirect "Index.asp"
Response.End
End If
If FoundErr<>True then
password=Md5(password)
set mRs=server.createobject("adodb.recordset")
sql="select * from A_admin where username='"&username&"'and password='"&password&"'"
mRs.open sql,conn,1,1
If not(mRs.eof and mRs.bof) then
session("username")=mRs("username")
response.Redirect"admin_index.asp"
else
Response.Write "<script>alert('你不是管理员!');this.location.href='Index.asp';</SCRIPT>"
End If
End If
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><% =Title %></title>
<style type="text/css">
body,td,th {
font-size: 12px;
color: #666666;
}
.input {
font-size: 12px;
border: 1px solid #CCCCCC;
background-color: #FFFFFF;
width: 130px;
}
.style {
font-size: 12px;
color: #FF6600;
}
a:link {
color: #666666;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #666666;
}
a:hover {
text-decoration: none;
color: #FF6600;
border-bottom-width: 1px;
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-bottom-color: #FF6600;
}.line {
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-left-style: none;
border-bottom-color: #CCCCCC;
border-bottom-width: 1px;
font-size: 12px;
}
.button {
border: 1px solid #CCCCCC;
font-size: 12px;
background-color: #FFFFFF;
}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="230" bgcolor="#CCCCCC" align="center">
<tr valign="top" bgcolor="#FFFFFF">
<td>
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
<tr>
<td height="25" bgcolor="f3f3f3"> · 管理登陆 ·</td>
</tr>
</table>
</td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td height="107">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" bgcolor="#F3F3F3">
<tr>
<td height="103" align="center">
<form method="post" action="login.asp?action=login" style="margin:0">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="29%" height="25" align="right">用户名:</td>
<td width="71%" align="center"><input name="username" type="text" class="input"></td>
</tr>
<tr>
<td height="25" align="right">密 码:</td>
<td align="center"><input name="password" type="password" class="input"></td>
</tr>
</table>
<br><input name="Submit" type="submit" class="button" value=" 提 交 ">
</form>
</td>
</tr>
</table>
</tr>
</table>
<br>
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
<tr>
<td align="center"><% =Copyright %></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -