⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_login.asp

📁 后台管理系统
💻 ASP
字号:
<!--#include file="Inc/Inc.asp"-->
<!--#include file="../Include/MD5.asp"-->
<html>
<head>
<title><%=CN_VersionName%>--系统管理登陆</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/Admin_Css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
Action=ClsPub.SafeRequest(3,"Action",1,0,0)
Select Case Action
	Case "Login"
		Call Login()
	Case "Logout"
		Call Logout()
	Case Else
		Call ShowLogin()
End Select
Sub Login()
	ClsPub.Chk_Post()
	If ClsAdmin.CheckManager(1,0)<>"" Then
		SysMsg="系统提示:\n\n 您已经登陆系统,请勿重复登陆!"
		Call ClsPub.Alert("Index.asp",0)
	End If
	Dim Username,Password,TempValue,LoginTime,LoginIp
	Username=ClsPub.SafeRequest(2,"Username",1,"",0)
	Password=ClsPub.SafeRequest(2,"Password",1,"",0)
	Call ClsPub.CodeIsTrue()
	If Username="" Or Password="" Then
		FoundErr=True
		SysMsg="系统提示:\n\n帐号和密码均不能为空,请填写完整!"
	End If
	If FoundErr=True Then Call ClsPub.Alert("Back",0):Exit Sub
	TempValue=ClsPub.DB_Query("Select AdminId,AdminName,AdminPwd,AdminPower,IsLock From TW_Admin Where AdminName='"&Username&"'")
	If Not IsArray(TempValue) Then
		FoundErr=True
		SysMsg="系统提示:\n\n 该帐号不存在!"
	Else
		If TempValue(4,0) Then
			FoundErr=True
			SysMsg="系统提示:\n\n 您的帐号已被锁定,请联系管理员!"
		Else
			If TempValue(2,0)<>MD5(Password) Then
				FoundErr=True
				SysMsg="系统提示:\n\n 密码错误!"
			Else
				LoginTime=Now()
				LoginIp=ClsPub.Get_UserIp()
				ClsPub.DB_Execute("Update TW_Admin Set LoginIp='"&LoginIp&"',LoginTime='"&LoginTime&"' Where AdminId="&TempValue(0,0))
				Session(CahceName&"_Admin")=TempValue(1,0)
				Session(CacheName&"_Power")=TempValue(3,0)
				Response.Redirect("Index.asp")
			End If
		End If
	End If
	If FoundErr=True Then Call ClsPub.Alert("Back",0):Exit Sub
End Sub
Sub Logout()
	Session.Contents.Remove(CahceName&"_Admin")
	Session.Contents.Remove(CacheName&"_Power")
	SysMsg="系统提示:\n\n 退出系统成功!"
	Call ClsPub.Alert("Admin_Login.asp",0)
End Sub
Sub ShowLogin()
%>
<table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="ffffff">
  <tr>
    <td><form action="Admin_Login.asp?Action=Login" method="post" name="Login" onSubmit='return CheckForm();'>
      <table width="582" height="285" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="157" colspan="2" background="images/login2_1.gif"> </td>
        </tr>
        <tr>
          <td width="449" height="91" background="images/login2_2.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="60" rowspan="2">&nbsp;&nbsp;&nbsp;</td>
                <td width="120" align="left" valign="middle"><img src="Images/user.gif" width="31" height="24" align="absmiddle">用户名称:</td>
                <td width="120" align="left"><img src="Images/password.gif" width="31" height="24" align="absmiddle">用户密码:</td>
                <td width="120" align="left"><img src="Images/yzm.gif" width="31" height="24" align="absmiddle">验证码:</td>
                <td rowspan="2"> </td>
              </tr>
              <tr>
                <td height="26"><table width="85%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="26" background="Images/user2.gif"><input name='UserName' type='text' id='UserName' maxlength='20' style='width:110px; BORDER-RIGHT: #F7F7F7 0px solid; BORDER-TOP: #F7F7F7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #F7F7F7 0px solid; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #F7F7F7' onMouseOver="this.style.background='#ffffff';" onMouseOut="this.style.background='#F7F7F7'" onFocus='this.select();'></td>
                    </tr>
                </table></td>
                <td><table width="85%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="26" background="Images/user2.gif"><input name='Password'  type='password' id="Password" style='width:110px; BORDER-RIGHT: #F7F7F7 0px solid; BORDER-TOP: #F7F7F7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #F7F7F7 0px solid; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #F7F7F7' onFocus='this.select();' onMouseOver="this.style.background='#ffffff';" onMouseOut="this.style.background='#F7F7F7'" maxLength='20'></td>
                    </tr>
                </table></td>
                <td><table width="85%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="26" background="Images/user2.gif"><input name='CodeStr' size='6' maxlength='6' style='width:50px; BORDER-RIGHT: #F7F7F7 0px solid; BORDER-TOP: #F7F7F7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #F7F7F7 0px solid; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #F7F7F7' onMouseOver="this.style.background='#ffffff';" onMouseOut="this.style.background='#F7F7F7'" onFocus='this.select();'><%=ClsPub.GetCode%>
					  </td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
          <td width="133"><input type='image' name='Submit' src="images/login2_3.gif"></td>
        </tr>
        <tr>
          <td height="37" colspan="2" background="images/login2_4.gif"><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center"><b><%=CN_VersionName%></b></div></td>
              </tr>
          </table></td>
        </tr>
      </table>
    </form>
	</td>
  </tr>
</table>
<%End Sub%>
<%CloseAll%>
</body>
</html>

⌨️ 快捷键说明

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