?? adminuser.asp
字號:
<!--#include file="head.asp" -->
<%
if session("flag")>1 then
response.write "<br><p align=center>您沒有操作的權(quán)限</p>"
response.end
end if
if request("Submit") = "修改" then
Unid = Request.Form("Unid")
UserName = Request.Form("manager")
PassWord = Request.Form("newpin")
Flag = Request.Form("flag")
Conn.Execute("Update admin set Username = '"& UserName &"',PassWord = '"& PassWord &"',Flag = "& Flag &" where id = " & Unid)
Response.Write "<script>alert(""修改管理員信息成功"");location.href=""adminuser.asp"";</script>"
response.end
elseif request("Submit") = "刪除" then
Unid = Request.Form("Unid")
Conn.Execute("Delete from admin where id = " & Unid)
Response.Write "<script>alert(""刪除管理員信息成功"");location.href=""adminuser.asp"";</script>"
response.end
end if
set rs = conn.execute("select * from admin order by id")
%>
<table width="100%" border="1" cellspacing="0" cellpadding="3" align="center" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<tr bgcolor="#eeeeee" valign="middle">
<td colspan="5" align="center" height="25">修改管理員信息 | <a href="#" OnClick="Javascript:window.open('adduser.asp','','width=350,height=300,top=10,left=180')">增加管理員</a></td>
</tr>
<tr align="center">
<td height="25">序號</td>
<td height="25">用戶名</td>
<td height="25">密碼</td>
<td height="25">權(quán)限</td>
<td height="25">操作</td>
</tr>
<%while not rs.EOF %>
<form name="form2" method="post" action="?action=edit">
<input type="hidden" name="Unid" value="<%=rs(0)%>">
<tr align="center">
<td height="25"><%=rs(0)%></td>
<td height="25"><input type="text" name="manager" value="<%=rs("username")%>" size="12" class="smallInput"></td>
<td height="25"><input type="password" name="newpin" value="<%=rs("password")%>" size="12" class="smallInput"></td>
<td height="25"><select name="flag">
<option value="1" <%if rs("flag") = 1 then response.write "selected"%>>管理員</option>
<option value="2" <%if rs("flag") = 2 then response.write "selected"%>>編輯員</option>
<option value="3" <%if rs("flag") = 3 then response.write "selected"%>>錄入員</option>
</select>
</td>
<td height="25"><input type="submit" name="Submit" value="修改" class="buttonface">
<input type="submit" name="Submit" value="刪除" class="buttonface">
</td>
</tr>
</form>
<%
rs.MoveNext
Wend
%>
</table>
<%
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
%>
<!--#include file="copy.asp" -->
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -