📄 adminlogin.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="sub/config.asp"-->
<!--#include file="sub/conn.asp"-->
<!--#include file="sub/md5.asp"-->
<!--#include file="sub/inc.asp"-->
<!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" />
<title><%=Sitename%>-后台登录</title>
<link href="img/dex.css" rel="stylesheet" type="text/css" />
<link href="img/dex2.css" rel="stylesheet" type="text/css" />
<script language=javascript>
function login(){
if (document.form1.adname.value==""){alert("请输入用户名?");document.form1.adname.focus();return false}
if (document.form1.adpwd.value==""){alert("请输入密码?");document.form1.adpwd.focus();return false}
if (document.form1.code.value==""){alert("请输入认证码?");document.form1.code.focus();return false}
return true}
</script>
</head>
<body>
<!--#include file="top.asp"-->
<table width="780" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height="4" background="images/index_11.gif"></td>
</tr>
<%
if request("denglu")<>"" then
if int(request("code"))<>int(Session("code")) then
Response.Write("<script language=javascript>alert('请输入正确的认证码!');this.location.href='adminlogin.asp';</script>")
Response.End
end if
dim rs,sql
set rs=server.createobject("adodb.recordset") '创建纪录集
sql="select * from ax_admin where admin_name='"&trim(HTMLEncode(request("adname")))&"'" '查找用户信息
rs.open sql,cn,1,2 '执行SQL语句
if not rs.eof then
if rs("admin_pass")=trim(md5(HTMLEncode(request("adpwd")))) then '判断密码是否正确
session("admin")="axsj" '标记登录
session("adminname")=trim(rs("admin_name"))
session("adminsuper")=trim(rs("admin_super"))
session("adminjj")=trim(rs("admin_super"))
session.timeout=30
Response.Redirect "admin.asp"
else
response.Write("<p> </P><p align=center>用户名或密码错误,<a href='adminlogin.asp'>返回</a></p><p> </p>")
end if
else
response.Write("<p> </P><p align=center>用户名或密码错误,<a href='adminlogin.asp'>返回</a></p><p> </p>")
end if
set rs=nothing '关闭纪录集,释放所占资源
else
%>
<tr>
<td align="center"><p> </p>
<table width="495" height="205" border="0" cellpadding="0" cellspacing="0" background="images/myclose.jpg">
<form id="form1" name="form1" method="post" action="adminlogin.asp" onsubmit="return login()"><tr>
<td width="200" rowspan="6" align="center"><p> <img src="images/lydzlogo.gif" width="165" height="60" /></p> </td>
<td height="50" colspan="2" align="left" valign="bottom" class="menuD">后台管理登录</td>
</tr>
<tr>
<td>用户名:</td>
<td height="25" align="left">
<label>
<input name="adname" type="text" class="wubian" id="adname" size="16" maxlength="20" />
</label></td>
</tr>
<tr>
<td>密__码:</td>
<td height="25" align="left"><input name="adpwd" type="password" class="wubian" id="adpwd" size="16" maxlength="20" /></td>
</tr>
<tr>
<td width="50">认证码:</td>
<td width="200" height="25" align="left"><input name="code" type="text" class="wubian" size="7" maxlength="4" /> <img src="sub/code.asp" style="width:40;height=15" border=0 align=absmiddle/></td>
</tr>
<tr>
<td rowspan="2"> </td>
<td align="left" valign="top"><label>
<input name="denglu" type="submit" class="wubian" value="登 录" />
<input name="Submit2" type="reset" class="wubian" value="清 空" />
</label></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
</form>
</table></td>
</tr>
</table>
<%end if%>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -