?? 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>您輸入的用戶名和密碼不正確或者您不是系統(tǒng)管理員。<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>系統(tǒng)管理員并沒有賦予您登陸本版面的權利。"
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 + -