⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminuser.asp

📁 新的文章管理系统
💻 ASP
字号:
<!--#include file="head.asp" -->
      <%
if session("flag")>1 then
		response.write "<br><p align=center>您没有操作的权限</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">权限</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">
                  &nbsp;
               <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" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -