📄 admin_login.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="../inc/pwwd.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
BotList = "Google,Isaac,SurveyBot,Baiduspider,yahoo,yisou,3721,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir"
Botlist = Split(Botlist,",")
For i = 0 To Ubound(Botlist)
If InStr(Lcase(Request.ServerVariables("HTTP_USER_AGENT")),Lcase(Botlist(i))) > 0 Then
response.write" - Powered By FYPost - 枫叶贴吧"
response.End()
Exit For
End If
Next
'/*不让搜索引擎收录*/
action = ReplaceBadWord(Request.QueryString("action"))
Select Case action
Case ""
Call post_index()
Case "admin_login"
Call admin_login()
Case Else
Call Post_err()
End Select
sub post_index()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>枫叶贴吧 ——管理员登录</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<br>
<br>
<br>
<table align=center width=380 style="border: outset 3px;" cellpadding=0 cellspacing=0 ID="Table1">
<tr>
<td bgcolor="#3256EF" style="padding:3px;color:white;FONT-SIZE:13px;">管理员登录--枫叶贴吧
Powered By <strong><A href="http://www.fywen.com/post" target="_blank" ><font color="#FF9900">FYPost</font></A></strong> Svex1.0</td>
</tr>
<tr valign=top>
<td><img src="../image/admin_title.gif" width="100%"></td>
</tr>
<tr>
<td style="padding:15px;">
<script language="Javascript">
<!--
function VF_loginform(){
var theForm = document.loginform;
var numRE = /^\d+$/;
var errMsg = "";
var setfocus = "";
if (theForm['userpassword'].value == ""){
errMsg = "请填写登录密码!";
setfocus = "['userpassword']";
}
if (theForm['username'].value == ""){
errMsg = "请填写登录用户名!";
setfocus = "['username']";
}
if (errMsg != ""){
alert(errMsg);
eval("theForm" + setfocus + ".focus()");
}
else theForm.submit();
}//-->
</script>
<table border="0">
<form action="?action=admin_login" method="post" name="loginform" onSubmit="VF_loginform();return false;">
<tr>
<td><span style="width:80px;">用户名:</span></td>
<td><input maxlength="8" type="text" name="username" style="width:200px; height:20px;" class="input" ></td>
</tr>
<tr>
<td><span style="width:80px;">密 码:</span></td>
<td><input maxlength="20" type="password" name="userpassword" class="input" style="width:200px; height:20px;"></td>
</tr>
<tr>
<td> </td>
<td align="right"> </td>
</tr>
<tr>
<td> </td>
<td align="right"><input type="submit" value="登 录" name="btnSubmit" class="buttion" height="20" style="height:25px; width:55px; ">
<input type="reset" value="撤 消" name="Submit" class="buttion" height="20" style="height:25px; width:55px; "></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td style="padding:10px;FONT-SIZE:13px;"> 客户端操作系统: <%=GetOpInfo(Request.ServerVariables("HTTP_USER_AGENT"),2)%>
<%=GetOpInfo(Request.ServerVariables("HTTP_USER_AGENT"),1)%></td>
</tr>
</table>
<br><br>
</body>
</html>
<%
End Sub
Sub admin_login()
UserName=ReplaceBadWord(request.form("UserName"))
password=ReplaceBadWord(request.form("userpassword"))
Logindate=date() & Chr(32) & time()
If Username="" Or password="" Then
%>
<script language="javascript">
alert("用户名和登陆密码必须填写!")
document.location="javascript:history.back(-1)"
</script>
<%
Response.End()
Else
password=md5(password)
Dim checkrsobj,sql
Sql="select * from [user] where [username]='"&Username&"' And [userpwd]='"&password&"' And [adminuser]='1'"
Set Rs=Server.CreateObject("adodb.recordset")
Rs.open Sql,conn,1,1
If Rs.eof Then
%>
<script language="javascript">
alert("用户名不存在或密码错误")
document.location="javascript:history.back(-1)"
</script>
<%
Else
Firstdate = Rs("lastdate")
useip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If useip = "" Then
useip = Request.ServerVariables("REMOTE_ADDR")
End If
set rs= server.createobject("adodb.recordset")
sql1= "update [user] set [firstdate]='"&Firstdate&"',[lastdate]='"&Logindate&"',[userip]='"&useip&"' where [username]='"&Username&"'"
Rs.Open sql1,conn
session("uesrname") = username
session("userpwd") = password
Response.Redirect("admin_menu.Asp")
End If
End If
Call fywencl()
End Sub
Sub Post_err()
%>
<html>
<head>
<title>非法登陆</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="364" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="354" colspan="3"> </td>
</tr>
<tr>
<td height="128" colspan="3">
<div align="center"><font color="#FF0000" size="4"><strong><img src="../image/posterr.gif"> 请不要非法登陆</strong></font></div></td>
</tr>
</table>
</body>
</html>
<%
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -