📄 admin_login.asp
字号:
<!--#include file="Include/Tyi86_Setup.asp" -->
<!--#include file="Conn.asp"-->
<!--#include file=Include/check.asp-->
<!--#include file="other/Tyi86_Md5.asp" -->
<%
response.expires = -1
if request("Action")="Tyi86Sys_LoginCheck" then
username=Checkin(trim(Request.form("username")))
password=Checkin(replace(trim(Request.Form("password")),"'","''"))
Md5_Pass=md5(password)
if username="" or password="" 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(Tyi86ManageAdminID)=Rs("id")
Session(Tyi86ManageUser)=Rs("username")
Session(Tyi86ManageSession)=true
Session(Tyi86ManageKey)=Rs("Oskey")
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(Tyi86ManageSession)
If IsAdmin=true Then
set rs=server.createobject("adodb.recordset")
AdminID=session(Tyi86ManageAdminID)
sql="select * from admin where id="&AdminID
rs.open sql,conn,1,3
if not rs.EOF then
rs("LogoutTime")=now()
rs.Update
Session(Tyi86ManageAdminID)=""
Session(Tyi86ManageUser)=""
Session(Tyi86ManageSession)=""
Session(Tyi86ManageKey)=""
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>"
end if
%>
<head>
<title>通盈系统--后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.unnamed1 {
color: #FFFFFF;
font-family: "Arial";
font-size: 12px;
text-decoration: none;
}
.unnamed2 {
font-family: "Arial";
font-size: 12px;
color: #0033CC;
text-decoration: none;
}
-->
</style>
<script language="javascript">
function check()
{
varParam=document.Login.UserName.value
if (varParam.length==0)
{
window.alert("请输入管理员!");
document.Login.UserName.focus();
return false;
}
varParam=document.Login.Password.value
if (varParam.length==0)
{
window.alert("请输入密码!");
document.Login.Password.focus();
return false;
}
}
</script>
</head>
<body background="iamges/bac.gif">
<form name="login" method="post" action="Admin_login.asp?Action=Tyi86Sys_LoginCheck" target="_top">
<p> </p>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/manager_1.gif" width="400" height="108"></td>
</tr>
<tr>
<td background="images/manager_2.gif"><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60" height="18"> </td>
<td> </td>
<td width="30"> </td>
</tr>
<tr>
<td width="60"> </td>
<td>
<p class="unnamed1">用户名:
<input name="UserName" type="text" class="unnamed2" size="20">
<br>
密 码:
<input name="Password" type="password" class="unnamed2" size="20">
</p>
</td>
<td width="30"> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="400" height="31" valign="top" background="images/manager_3.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="67%"> </td>
<td width="33%"><input type="image" src="images/001.gif" width="57" height="22"></td>
</tr>
</table>
</td>
</tr>
</table>
<p class="unnamed2"> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -