📄 admin_login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin_error.asp"-->
<!--#include file="md5.asp"-->
<title><%=sitename%></title>
<%
if request("action")="checkadmin" then
call checkadmin()
elseif request("action")="logout" then
call logout()
else
call login()
end if
sub login()
%>
<form method="POST" action="?action=checkadmin">
<table width="<%=width%>" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" height="25">管理员登陆</td>
</tr>
<tr>
<td width="100%" align="center">
<table border="0" width="100%" cellpadding="2">
<tr>
<td width="50%" height="25" align="right">帐 号</td>
<td width="50%"><input type="text" name="admin" size="20"></td>
</tr>
<tr>
<td width="50%" height="25" align="right">密 码</td>
<td width="50%"><input type="password" name="pwd" size="20"></td>
</tr>
</table> </td>
</tr>
<tr>
<td width="100%" align="center" height="35"><input type="submit" value="登 陆" name="B1">
<input type="reset" value="重 写" name="B2"></td>
</tr>
</table>
</form>
<%
end sub
sub checkadmin()
dim admin,pwd
admin=request.form("admin")
pwd=request.form("pwd")
if admin="" then
founderr=true
errinfo="<li>请输入管理员帐号<br>"
end if
if pwd="" then
founderr=true
errinfo=errinfo&"<li>请输入管理员密码<br>"
end if
if admin<>"" and pwd<>"" then
set rs=conn.execute("select admin from admin where admin='"&admin&"' and pwd='"&md5(pwd)&"'")
if rs.eof and rs.bof then
founderr=true
errinfo=errinfo&"<li>管理员帐号或管理员密码错误<br>"
end if
set rs=nothing
end if
if founderr then
call errweb()
else
session("master_address_list")=admin
conn.execute("update admin set loginnum=loginnum+1,logindate=now() where admin='"&admin&"'")
response.redirect"admin_index.asp"
end if
end sub
sub logout()
session("master_address_list")=""
response.redirect"login.asp"
end sub
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -