📄 login.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")<>"" then
response.redirect "index.asp"
end if
name=replace(request.form("name"),"'","")
pass=replace(request.form("pass"),"'","")
if name<>"" then
sql="select * from admin where 帐号='"&name&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if not rs.eof then
if pass=rs("密码") then
session("admin")=name
response.redirect "index.asp"
end if
end if
end if
%>
<html>
<head>
<style type="text/css">
<!--
td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
p { margin-top: 1; margin-bottom: 1 }
a:link { text-decoration: none; color: black }
a:visited { text-decoration: none; color: black }
a:active { text-decoration: none }
a:hover { text-decoration: underline; color: red }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>管理员登录</title>
</head>
<body background="images/bg3.gif">
<form action="" method="post">
<table border="0" width="100%" height="137">
<tr>
<td width="78%" height="45" colspan="9">
</td>
<td width="37%" height="45" colspan="3"></td>
</tr>
<tr>
<td width="8%" height="46">
</td>
<td width="8%" height="46">
</td>
<td width="8%" height="46">
</td>
<td width="8%" height="46">
</td>
<td width="6%" height="46">
<p align="right"><b>帐号:</b></td>
<td width="10%" height="46">
<input type="text" name="name" size="20" style="border: 1 solid #000000"></td>
<td width="6%" height="46">
<p align="right"><b>密码:</b></td>
<td width="11%" height="46"><input type="password" name="pass" size="20" style="border: 1 solid #000000"></td>
<td width="9%" height="46"></td>
<td width="9%" height="46"></td>
<td width="9%" height="46"></td>
<td width="9%" height="46"></td>
</tr>
<tr>
<td width="121%" colspan="12" height="46">
<p align="center"><input type="submit" value="进入" name="enter">
<input type="reset" value="取消" name="reset"></p>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -