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

📄 login.asp

📁 视频点播系统
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理登陆</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #0000FF;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50">&nbsp;</td>
  </tr>
</table>
<%
action_e=request.Querystring("action")
Select Case action_e
	Case ""
	  Call main()
	Case "chklogin"
	  Call chklogin()
	Case "logout"
	  Call logout()
end select
%>
<%
sub main
%>
<table width="400" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong>后台管理登陆</strong></td>
  </tr>
</table>
<table width="400" height="150" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
   <form name="form1" method="post" action="login.asp?action=chklogin">
    <td align="center" bgcolor="#F7F7F7"><table width="300" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100" height="25" align="right">管理账号:</td>
        <td align="left"><input name="username" type="text" class="input1" id="username"></td>
      </tr>
      <tr>
        <td height="25" align="right">管理密码:</td>
        <td align="left"><input name="password" type="password" class="input1" id="password"></td>
      </tr>
      <tr>
        <td height="25" align="right">验证码:</td>
        <td align="left"><input name="vcode" type="text" class="input1" id="vcode" size="4" maxlength="4">
            <img src="../inc/vcode.asp"></td>
      </tr>
    </table>
      <table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40" align="center"> 
              <input name="Submit" type="submit" class="button1" value="登 陆">
       
      <input name="Submit" type="reset" class="button1" value="重 写">
          </td>
        </tr>
      </table></td>
    </form>
  </tr>
</table>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="400" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7" class="font2">Powered By www.cnlong.cn</td>
  </tr>
</table>
<%
end sub

sub chklogin


call myobj.chkrq()

if request.Form("vcode")="" or myobj.ChkLen(request.Form("vcode"))>4 then
response.write"<script language=vbscript>"&vbcrlf&"msgbox ""验证码格式错误"""&vbcrlf&"history.back()"&vbcrlf&"</Script>"
response.end
end if
if UCase(request.Form("vcode"))<>session("vcode") then
response.write"<script language=vbscript>"&vbcrlf&"msgbox ""验证码错误"""&vbcrlf&"history.back()"&vbcrlf&"</Script>"
response.end
end if
if request.Form("username")="" or request.Form("password")="" or myobj.ChkLen(request.Form("username"))<3 or myobj.ChkLen(request.Form("username"))>12 or myobj.ChkLen(request.Form("password"))<6 or myobj.ChkLen(request.Form("password"))>24 or myobj.ChkID(request.Form("username"))=false then
response.write"<script language=vbscript>"&vbcrlf&"msgbox ""账号或密码格式错误"""&vbcrlf&"history.back()"&vbcrlf&"</Script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
if request.Form("username")<>rs("manage_username") or md5(request.Form("password"))<>rs("manage_password") then
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<script language=vbscript>"&vbcrlf&"msgbox ""账号或密码不正确"""&vbcrlf&"history.back()"&vbcrlf&"</Script>"
response.end
else
session("login")="ok"
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect ("admin_index.asp")
end if
end sub

sub logout


call myobj.chkrq()

Session.Contents.Remove("login")
%>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50">&nbsp;</td>
  </tr>
</table>

<table width="400" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong>退出后台管理</strong></td>
  </tr>
</table>
<table width="400" height="150" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <form name="form1" method="post" action="login.asp?action=chklogin">
      <td align="center" bgcolor="#F7F7F7"><p>已经安全退出后台管理</p>
      <p><a href="login.asp">重新登陆</a></p></td>
    </form>
  </tr>
</table>
<%
end sub
%>
</body>
</html>

⌨️ 快捷键说明

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