📄 admin_login.asp
字号:
<!--#include file="tot_conn.asp" -->
<!--#include file="md5.asp" -->
<html>
<head>
<title><%=application("TOT_Title")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(images/webbg.gif);
background-position:center 50%;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.style2 {color: #FF0000}
-->
</style></head>
<script src="js/inc.js"></script>
<SCRIPT language=JavaScript>
function b()
{
document.myform.id.src='images/img/'+document.myform.Image.value;
}
</SCRIPT>
<body>
<%
Function GetCode()
Dim TestObj
On Error Resume Next
Set TestObj = Server.CreateObject("Adodb.Stream")
Set TestObj = Nothing
If Err Then
Dim TempNum
Randomize timer
TempNum = cint(8999*Rnd+1000)
Session("GetCode") = TempNum
GetCode = Session("GetCode")
Else
GetCode = "<img src=""GetCode.asp"">"
End If
End Function
%>
<%=application("BBS_Head")%>
<table width="750" height="40" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="228"><div align="center">-=>您现在的位置:<a href="#">首页</a>-><a href="#">留言</a></div></td>
<td width="522" style="padding:0 60px 0 0; "><div align="right"><a href="admin_login.asp"><img src="images/LoginA.gif" width="71" height="26" border="0"></a> <a href="guest_add.asp"><img src="images/LoginB.gif" width="71" height="26" border="0"></a> <a href="index.asp"><img src="images/LoginC.gif" width="71" height="26" border="0"></a></div></td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif"> <span class="style1">-=>站点公告</span></td>
</tr>
<tr>
<td colspan="3"><table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td align=middle width=30 height=30><div align="center"><img src="images/b.jpg" width="16" height="18"></div></td>
<td width=470><div align="center"><%=application("TOT_Content")%></div></td>
<td width=250> <font color=#e08700>■</font> 今日留言: <%=application("TOT_TodayAddNum")%> <font color=#e08700>■</font> 留言总数: <%=application("TOT_TotalAddNum")%></td>
</tr>
</table></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE><br>
<%
dim act,a,b,c,d,e,f,randNum,rs,sql,VerifyCode,UserName,UserPass,SqlLogin
act=trim(request("act"))
if(act<>"" and act="login") then
VerifyCode =Replace(Trim(Request("VerifyCode")),"'","")
if VerifyCode <> CStr(Session("GetCode")) then
Response.Write("<script>alert(""错误:\n验证码错误"&Copyright&""");history.back();</script>")
Response.End
end if
'开始登录
UserName = Replace(Trim(Request.Form("username")),"'","''")
UserPass = Md5(Replace(Trim(Request.Form("password")),"'","''"),32)
'response.Write(UserPass)
if(len(UserName)<1) then
response.Write("用户名不正确!")
response.End()
end if
if(len(UserPass)<1) then
response.Write("密码输入不正确!")
response.End()
end if
Set rs = server.CreateObject ("ADODB.RecordSet")
SqlLogin = "select * from TOT_Admin where Admin='"&UserName&"'"
rs.Open SqlLogin,conn,3,3
if not rs.eof then
if(UserPass<>rs("Password")) then
response.Write("密码不正确!")
response.End()
end if
if(UserPass=rs("Password")) then
session("TOT_ADMIN")=UserName
if(Cint(application("TOT_CloseBook"))=1) then
response.Write("<p><div align=""center"">留言板已关闭,要开启请到<a href=""edit.asp?act=config"">信息设置</a></div></p>")
response.end()
else
response.Redirect("index.asp")
end if
end if
else
response.Write("密码不正确!")
response.End()
end if
rs.close
set rs=nothing
end if
%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif">
<div align="center"><span class="style1">-=> 管理登录 <=-</span></div></td>
</tr>
<tr>
<td colspan="3">
<FORM name=myform action="admin_login.asp?act=login" method="post">
<table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td width="267" height=30 align=middle bgcolor="#f7f7f7"><div align="right">用户名:</div></td>
<td><span class="dp"> <INPUT id="username" name="username">
<span class="style2">*</span> </span></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">密码:</div></td>
<td width="477"><div align="left"><span class="dp">
<INPUT type="password" id="password" name="password">
<span class="style2">*</span> </span></div> <div align="left"></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">验证码:</div></td>
<td><div align="left"><span class="dp">
<input name="VerifyCode" type="text" class="input" id="VerifyCode" size="9">
<% = GetCode() %>
<span class="style2">*</span> </span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right"></div></td>
<td height="40"><div align="left"><span class="dp">
<INPUT name="image" type=image
src="images/button3.gif" width="77" height="30">
</span></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE>
<%=application("BBS_Root")%>
</body>
</html>
<%call connclose()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -