📄 login.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<html>
<head>
<%
username=request("username") '获取管理员用户名
password=request("password") '获取管理员密码
keys=request("keys")
mm=0
%>
<!--#include file="conn.asp"-->
<%
if username<>"" and password<>"" then
set rs=conn.execute("select * from admin where username='"& username & "'") '判断是否存在该用户
if not (rs.bof and rs.eof) then '判断是否有登陆权限
if rs("password")=password then
session("password")=rs("password")
session("username")=rs("username")
Response.Redirect "admin.asp"
else
mm=1
end if
else
mm=2
end if
elseif keys="submit" then
mm=3
end if
%>
<title>管理登陆</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
color: #FFFFFF;
font-weight: bold;
}
body {
background-color: #99CC00;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
.STYLE1 {font-size: 24px}
.STYLE3 {
font-size: 18px;
color: #666666;
}
-->
</style></head>
<body>
<table width="400" border="0" align="center">
<tr>
<td height="46"> <form name="form2" action="login.asp" method="post">
<%
if mm=1 then
Response.Write "对不起,您输入的密码有误!"
elseif mm=2 then
Response.Write "您没有登陆的权限!"
elseif mm=3 then
Response.Write "请输入完整的用户名和密码!"
end if
%>
<table width="400" border="0" cellpadding="0" cellspacing="0" bgcolor="#CECF63">
<tr>
<td height="98" colspan="2" bgcolor="#3333FF"><div align="center"><span class="STYLE1">学生简历生成系统管理登陆</span></div></td>
</tr>
<tr bgcolor="#CCCC66">
<td width="100" height="40"> <span class="STYLE3"> 账号:</span></td>
<td width="273" height="40" bgcolor="#CCCC66">
<input name="keys" type="hidden" value="submit">
<input name="username" type="text" id="username" /></td>
</tr>
<tr bgcolor="#CCCC66">
<td width="100" height="40"> <span class="STYLE3">密码:</span></td>
<td height="40">
<input name="ok" type="hidden" value="submit">
<input name="password" type="text" id="password" /></td>
</tr>
<tr bgcolor="#3130FF">
<td height="40"> </td>
<td height="40">
<input type="submit" name="submit" value="登陆" />
<input type="reset" name="Submit2" value="取消" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -