admin_login.asp

来自「CityCN V2.1 是自主开发的基于ASP+Access的新型资讯信息系统。」· ASP 代码 · 共 73 行

ASP
73
字号
<!--#include file="config.asp"-->
<!--#include file="admin_admininfo.asp"-->
<!--#include file="sub_change.asp" -->
<!--#include file="sub_md5.asp"-->
<%
dim ok
ok=left(trim(request.QueryString("ok")),1)

if ok="y" then
  dim adname,adpwd,code,error
  adname=strchange(trim(request.form("adminname")))
  adpwd=strchange(trim(request.form("adminpwd")))
  code=strchange(trim(request.form("code")))

  if cstr(code)=cstr(session("GetCode")) then
    if adname=adminname and md5(adpwd)=adminpwd then
      session.Contents.Remove("GetCode")
      session("adminname")=adname
      session("adminpwd")=md5(adpwd)
      session.timeout=60
      response.write "<center style='font-size: 12pt; line-height:20pt'>您现在正已管理员身份登陆系统!登陆成功!<br>系统正在加载管理页,请稍候...<br><br><a href=admin_index.asp>点击登陆</a></center><meta http-equiv=refresh content=3;URL='admin_index.asp'>" 
      response.end
      'response.Redirect("admin_index.asp")
    else
      error="用户名或密码不正确!请检查!您的每次操作系统都会记录!<br>"
      error=error&"登陆时间:"&now()&"  "&"操作IP:"&Request.ServerVariables("REMOTE_ADDR")
    end if
  else
    error="验证码错误!请刷新重新填写!"
  end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>【后台管理】管理登陆 --  <%=sitename%></title>
<link href="admin.css" rel="stylesheet" type="text/css">
</head>

<body>
<div align="center">
<table width="720" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr>
    <td height="40" align="center">管理员登陆[<a href="<%=siteurl%>">返回<%=sitesname%></a>]</td>
  </tr>
</table>
<table width="720" border="0" cellpadding="5" cellspacing="0">
  <tr>
    <td width="100%" height="40" align="left" colspan="2" style="padding-left: 100px; color:#FF0000"><%=error%></td>
  </tr>
  <form action="admin_login.asp?ok=y" method="post">
  <tr>
    <td width="300" height="30" align="right">管理员名称:</td>
    <td width="410">
	<input name="adminname" type="text" id="adminname" style="width:150px;" size="18"></td>
  </tr>
  <tr>
    <td height="30" align="right">管理员密码:</td>
    <td>
	<input name="adminpwd" type="password" id="adminpwd" style="width:150px;" size="18"></td>
  </tr>
  <tr>
    <td height="30" align="right">验&nbsp;&nbsp; 证&nbsp;&nbsp; 码:</td>
    <td><input name="code" type="text" id="code" style="width:60px;"> <img src="sub_iCode.asp"></td>
  </tr>
  <tr>
    <td height="30" align="center" colspan="2"><input type="submit" name="Submit" value="  管 理 登 陆  "></td>
  </tr>
  </form>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?