📄 admin_login.asp
字号:
<!--#include file="Include/xbqq_Setup.asp" -->
<!--#include file="Conn.asp"-->
<!--#include file=Include/check.asp-->
<!--#include file="other/xbqq_Md5.asp" -->
<%
response.expires = -1
if request("Action")="xbqqSys_LoginCheck" then
username=Checkin(trim(Request.form("username")))
password=Checkin(replace(trim(Request.Form("password")),"'","''"))
Md5_Pass=md5(password)
xbqqSys_CheckCode=replace(trim(Request("xbqqSys_CheckCode")),"'","")
if username="" or password="" then
Response.write"<script>alert(""用户名和密码不能为空! "&Copyright&" "");location.href=""Admin_login.asp"";</script>"
Response.end
end if
if xbqqSys_CheckCode<>CStr(session("CheckCode")) then
Response.write"<script>alert(""验证码不正确,请刷新后重新登陆 "&Copyright&" "");location.href=""Admin_login.asp"";</script>"
Response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&username&"'and password='"&Md5_Pass&"'"
rs.open sql,conn,1,3
if not rs.EOF then
rs("LoginTimes")=rs("LoginTimes")+1
rs("LoginTime")=now()
rs("LoginIP")=Request.ServerVariables("REMOTE_ADDR")
rs.Update
Session(xbqqManageAdminID)=Rs("id")
Session(xbqqManageUser)=Rs("username")
Session(xbqqManageSession)=true
Session(xbqqManageKey)=Rs("Oskey")
'Session("Admin") = "Login"
Response.Redirect ("Admin.asp")
else
errmsg="请输入正确的管理员名字和密码!"
call error()
Response.End
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
if request("Action")="LoginOut" then
IsAdmin=session(xbqqManageSession)
If IsAdmin=true Then
set rs=server.createobject("adodb.recordset")
AdminID=session(xbqqManageAdminID)
sql="select * from admin where id="&AdminID
rs.open sql,conn,1,3
if not rs.EOF then
rs("LogoutTime")=now()
rs.Update
Session(xbqqManageAdminID)=""
Session(xbqqManageUser)=""
Session(xbqqManageSession)=""
Session(xbqqManageKey)=""
'Session("Admin")=""
rs.Close
set rs=nothing
else
response.write"数据出错!"
Response.end
end if
end if
conn.close
set conn=nothing
Response.Write "<script>location.href=""javascript:window.close()"";</script>"
'response.redirect ("Index.asp")
'Response.Write "<script>alert(""退出成功!"");location.href=""javascript:window.close()"";</script>"
end if
%>
<link href="other/Admin.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>酷航网站管理系统V1.0 >> 后台管理</title>
<style type="text/css">
<!--
-->
</style>
<form name="login" method="post" action="Admin_login.asp?Action=xbqqSys_LoginCheck" target="_top">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<TABLE cellSpacing=0 cellPadding=0 width=372 align=center border=0>
<TBODY>
<TR>
<TD colSpan=3>
<img border="0" src="xbqq_img/admin1.gif" width="372" height="45"></TD>
</TR>
<TR>
<TD vAlign=top align=left width=16 rowSpan=2>
<img border="0" src="xbqq_img/admin2.gif" width="16" height="187"></TD>
<TD height=175> <TABLE cellSpacing=0 cellPadding=0 width=348 border=0>
<TBODY>
<TR>
<TD height=144> <DIV align=center>
<CENTER>
<table id=AutoNumber1 style="BORDER-COLLAPSE: collapse"
bordercolor=#e0e1db height=107 cellspacing=0 cellpadding=0 width=314
border=1>
<tbody>
<tr>
<td bgcolor=#EFEFEF>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38%" height="30" align="right">管理帐号:</td>
<td width="62%" height="30"> <input name="username" type="text" id="UserName5" maxlength="20" class="login"></td>
</tr>
<tr>
<td height="30" align="right">管理密码:</td>
<td height="30"> <INPUT class=Bsbttn id=pwd type=password maxLength=25 size=14 name=password onFocus="this.select();" readOnly onKeyDown="Calc.pwd.value=this.value" onChange="Calc.pwd.value=this.value" onclick= "pwd1=this;showkeyboard();this.readOnly=1;Calc.pwd.value=''"></td>
</tr>
<tr>
<td height="30" align="right"><font color="#000000">验证码</font>:</td>
<td height="30"> <input name="xbqqSys_CheckCode" type="text" class="login" id="xbqqSys_CheckCode" size=12 maxlength="20">
<img src="other/xbqq_GetCode.asp"></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</CENTER>
</DIV></TD>
</TR>
<TR>
<TD vAlign="top" align="center" height=31> <input type="submit" name="Submit3" value=" 登陆 ">
<A href="GetPassWd.jsp">
<input type="reset" name="Submit2" value=" 重置 ">
</A> </TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=top width=8 rowSpan=2>
<img border="0" src="xbqq_img/admin3.gif" width="8" height="187"></TD>
</TR>
<TR>
<TD width=348 height=12>
<img border="0" src="xbqq_img/admin4.gif" width="348" height="12"></TD>
</TR>
</TABLE></td>
</tr>
</table>
</form>
<script language="JavaScript" src="pass.js"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -