📄 admin_login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!-- #include file="chkuser.asp" -->
<!-- #include file="md5.asp" -->
<!--#include file="inc/theme.asp"-->
<!--#include file="inc/char.asp"-->
<%
stats="论坛管理登陆"
call nav()
call headline(1)
if founderr then
call error()
else
if request("action")="chklogin" then
call chklogin()
if founderr then call error()
else
call main()
end if
end if
call endline()
sub chklogin()
username=trim(replace(request("username"),"'",""))
password=md5(trim(replace(request("password"),"'","")))
if username="" or password="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请输入您的用户名或密码。"
exit sub
end if
set rs=conn.execute("select u.username,u.userpassword,a.* from [user] u inner join admin a on u.username=a.username where u.username='"&username&"' and u.userpassword='"&password&"' and u.userclass=20")
if rs.eof and rs.bof then
rs.close
set rs=nothing
founderr=true
Errmsg=Errmsg+"<br>"+"<li>您输入的用户名和密码不正确或者您不是系统管理员。<br><li>请<a href=admin_login.asp>重新输入</a>您的密码。"
exit sub
else
if rs("flag")="" or isnull(rs("flag")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>系统管理员并没有赋予您登陆本版面的权利。"
rs.close
set rs=nothing
exit sub
else
session("flag")=rs("flag")
session.timeout=45
conn.execute("update admin set LastLogin=Now(),LastLoginIP='"&Request.ServerVariables("REMOTE_ADDR")&"' where username='"&username&"'")
rs.close
set rs=nothing
response.redirect "admin_main.asp"
end if
end if
end sub
sub main()
%>
<form action="admin_login.asp?action=chklogin" method="post">
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=aTablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center>
<font color="<%=TablefontColor%>"><b>请输入您的用户名、密码登陆</b>(如果您不是总版主请勿登陆)</font></td></tr>
<tr bgcolor=<%=Tablebodycolor%>>
<td valign=middle><font color="<%=TableContentColor%>">请输入您的用户名</font></td>
<td valign=middle><INPUT name=username type=text> <a href="reg.asp"><font color="<%=TableContentColor%>">没有注册?</font></a></td></tr>
<tr bgcolor=<%=Tablebodycolor%>>
<td valign=middle><font color="<%=TableContentColor%>">请输入您的密码</font></td>
<td valign=middle><INPUT name=password type=password> <a href="lostpass.asp"><font color="<%=TableContentColor%>">忘记密码?</font></a></td></tr>
<tr>
<td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center><input type=submit name="submit" value="登 陆"></td></tr></table></td></tr></table>
</form>
<%end sub%>
<!--#include file="footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -