?? admpost.asp
字號(hào):
<!-- #include file="inc/md5.asp" -->
<%
username=request("username") '接受管理員用戶(hù)名
password=md5(request("password"),16) '接受管理員密碼
keys=request("keys")
mm=0
%>
<!--#include file="inc/conn1.asp"-->
<%
if username<>"" or password<>"" then
set rs=newconn.execute("select * from admin where username='"& username & "'") '判斷是否存在該用戶(hù)
if not (rs.bof and rs.eof) then '判斷是否有該權(quán)限
if rs("password")=password then
session("password")=rs("password")
session("username")=rs("username")
'為真則將該用戶(hù)的該權(quán)限放入SESSION中
Response.Redirect "admin.asp" '跳轉(zhuǎn)到管理員管理頁(yè)面
else
mm=1
session("username")=""
session("Password")=""
end if
else
mm=2
session("username")=""
session("Password")=""
end if
elseif keys="submit" then
mm=3
session("username")=""
session("Password")=""
end if
%>
<!-- #include file="inc/top.asp" -->
<!-- #include file="inc/adminmenu.asp" -->
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#97C4CA">
<tr>
<td valign='top'><div align=center>
<form action="admpost.asp" method="post" name="form2" id="form2">
<table width="300" border="0">
<tr align="center"> </tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"> </td>
<td width="85%"><%
if mm=1 then
Response.Write "對(duì)不起,您輸入的密碼有誤!"
elseif mm=2 then
Response.Write "您沒(méi)有登陸的權(quán)限!"
elseif mm=3 then
Response.Write "請(qǐng)輸入完整的用戶(hù)名和密碼!"
end if
%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="197" align="right"> 管理員帳號(hào):</td>
<td width="205"><input name="keys" type="hidden" value="submit">
<input name="username" type="text" class="editbox1" id="username" size="20" maxlength="20"></td>
</tr>
<tr>
<td align="right">管理員密碼:</td>
<td><input name="password" type="password" class="editbox1" size="20" maxlength="20"></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" name="Reg2" value="登錄" class="bottom">
<input type="reset" name="Submit32" value="重填" class="bottom">
</td>
</tr>
</table>
</form>
<p>
</div></td>
</tr>
</table>
<!-- #include file="inc/copyr.asp" -->
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -