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

📄 admin_login.asp

📁 一套六合彩投注程序
💻 ASP
字号:
<!--#include file="mConn.asp"-->
<!--#include file="mConst.asp"-->
<%
'取随机数用来作验证码
 dim s
randomize timer
s=Int((8999)*Rnd +1000)
%>
<%A_name=checkstr(request.form("Login_name"))
A_password=checkstr(request.form("Login_pwd"))
A_check=checkstr(request.form("A_check"))
if A_name<>"" and A_password<>"" then
	A_check2=Request.Form("A_check2")
		If A_check<>A_check2 Then
			Response.Write("<script language=javascript>alert('请输入正确的认证码!');history.go(-1);</script>")
			Response.End
		end if
'判断登陆是否跨站提交
server_vv=len(Request.ServerVariables("SERVER_NAME"))
server_v1=left(Cstr(Request.ServerVariables("HTTP_REFERER")),server_vv)
server_v2=left(Cstr("http://"&Request.ServerVariables("SERVER_NAME")),server_vv)
if server_v1<>server_v2 and server_v1<>"" and server_v2<>"" then
response.write("<script>alert('错误:禁止从站点外部提交数据!.')</script>")
response.end
end if
end if%>
<%

  Select Case Request("GetKey")
    Case "ChkLogin"

	  ChkLogin
	Case Else
	  Login
  End Select


Sub ChkLogin

    If Not ChkPost Then
	  Response.Redirect "a.htm"
	  Response.End
	End If

	If CheckStr(Request.Form("login_name"))="" Then
      Response.Redirect "a.htm"
	  Response.End
	End If

	If CheckStr(Request.Form("login_pwd"))="" Then
	  Response.Redirect "a.htm"
	  Response.End
	End If	


   Dim UserName,Password
	  UserName=CheckStr(Request.Form("login_name"))
	  Password=CheckStr(Request.Form("login_pwd"))

	  
	 Dim mRs
	    Set mRs=Server.CreateObject("Adodb.RecordSet")
		Set mRs=Conn.Execute("Select adminpwd From m_admin Where adminuser='"&UserName&"' Order By ID Desc")
		If mRs.Eof Then
		  Set mRs=Nothing
		  Response.Redirect "system_user.asp"
	      Response.End
		End If

		If Not mRs("adminpwd")=Password Then
		  Set mRs=Nothing
		  Response.End
		  Response.Redirect "system_user.asp"
	      Response.End
		End If
        Dim TrueIP
		TrueIP=Cstr(Request.ServerVariables("REMOTE_ADDR"))
		Session("Sk2Admin")=UserName
		'Session.Timeout=60
		Set mRs=Conn.Execute("Update m_admin Set adminlogintime=GetDate(),adminloginip='"&TrueIP&"' Where adminuser='"&UserName&"'")
		Set mRs=Nothing
		Response.Redirect "system_user.asp"

End Sub

Sub Login
%>


<HTML><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.style1 {color: #FFFF00}
.unnamed1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	text-decoration: none;
	background-color: #FFCC00;
	border: 1px solid #000000;
}
-->
</style></head>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=100>
<table width="98%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="395" valign="top"><div align="center">
      <table width="410" height="247" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="middle" background="images/LOGIN.gif"><br>
            <br>
            <br>            <br>            <form name="form1" method="post" action=admin_Login.Asp?GetKey=ChkLogin>
              <table width="300" border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="63" height="30"><div align="center"><span class="style1">用户名:</span></div></td>
                  <td width="237" height="30"><div align="left">
                    <input name="Login_name" type="text" class="unnamed1" id="A_name">
                  </div></td>
                </tr>
                <tr>
                  <td height="30"><div align="center"><span class="style1">密&nbsp;&nbsp;码:</span></div></td>
                  <td height="30"><div align="left">
                    <input name="Login_pwd" type="password" class="unnamed1" id="A_Password">
                  </div></td>
                </tr>
                <tr>
                  <td height="30"><div align="center"><span class="style1">验证码:</span></div></td>
                  <td height="30"><div align="left">
                    <input name="A_check" type="password" class="unnamed1" id="A_check" size="10">
                    <%=s%>
                    <input name="A_check2" type=hidden id="A_check2" value="<%=s%>" size=12 maxlength=20>
                  </div></td>
                </tr>
                <tr>
                  <td height="35" colspan="2"><input type="submit" name="Submit" value="提交">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="reset" name="Submit2" value="重置"></td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>
<P>&nbsp;</P></BODY></HTML>
<%
End Sub
%>

⌨️ 快捷键说明

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