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

📄 man_user.asp

📁 党委网站 党委网站党委网站党委网站党委网站党委网站
💻 ASP
字号:
<%
if session("username")="" or session("usertype")="" then
response.Write"<script>"
response.Write"parent.location.href='default.asp';"
response.Write"</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("act")="edit" then
set rst=server.CreateObject("adodb.recordset")
strsql="select * from net_admin where id="&request("id")&""
rst.open strsql,conn,3,2
rst("users")=request("user")
rst("passwd")=request("password")
rst("types")=request("types")
rst.update
rst.close
response.Redirect("man_user.asp")
response.End()
end if
%>
<%
if request("act")="del" then
conn.execute "delete * from net_admin where id="&request("id")&""
response.Redirect("man_user.asp")
response.End()
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户管理</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<TABLE cellSpacing=0 cellPadding=0 width=99% align=center border=0>
  <TR> 
    <TD height="25" style="HEIGHT: 16px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="77%"><SPAN class=heading>管理用户</SPAN></td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD height=12 colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td bgcolor="#CCCCCC" height="1"></td>
              </tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD colSpan=2 vAlign=top> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td> <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td height="52" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td bgcolor="#CCCCCC"> <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                <%
							  set rs=server.CreateObject("adodb.recordset")
			                  sql="select * from net_admin order by id asc"
                              rs.open sql,conn,1,1
							  if rs.eof then
							  response.Write("<tr>")
							  response.Write("</td>")
							  response.Write("<div align='center'>暂时没有内容!</div>")
							  response.Write("</td>")
							  response.Write("</tr>")
							  rs.close
							  else
							  i=1
							  do while not rs.eof							  
				    		  %>
                                <form action="man_user.asp?act=edit&id=<%=rs("id")%>" name="post<%=i%>" id="post<%=i%>" method="post">
                                  <tr> 
                                    <td width="10%" height="25" bgcolor="#FFFFFF"> 
                                      <div align="center">用户名称:</div></td>
                                    <td width="17%" bgcolor="#FFFFFF"> 
                                      <div align="center"> 
                                        <input name="user" type="text"  class="input_main" id="user" value="<%=rs("users")%>" size="15">
                                      </div></td>
                                    <td width="7%" align="center" bgcolor="#FFFFFF">密码:</td>
                                    <td width="17%" align="center" bgcolor="#FFFFFF"> 
                                      <input name="password" type="password" id="password" value="<%=rs("passwd")%>" class="input_main" size="15"></td>
                                    <td width="7%" align="center" bgcolor="#FFFFFF">级别:</td>
                                    <td width="18%" align="center" bgcolor="#FFFFFF"> 
                                      <select name="types" id="types">
                                        <option value="0" <%if rs("types")=0 then%>selected<%end if%>>管理员</option>
                                        <option value="1" <%if rs("types")=1 then%>selected<%end if%>>超级管理员</option>
                                      </select></td>
                                    <td width="24%" bgcolor="#FFFFFF"> 
                                      <div align="center"> 
                                        <input type="submit" name="Submit" value="修 改" class="sub">
                                          
                                        <input type="button" name="Submit2" value="删除" class="sub" onClick="javascript:window.location.href='man_user.asp?id=<%=rs("id")%>&act=del';" <%if i<=1 then%>disabled<%end if%>>
                                      </div></td>
                                  </tr>
                                </form>
                                <%
							i=i+1
							rs.movenext
							if rs.eof then exit do
							loop
							rs.close
							end if
							%>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
</TABLE>
</body>
</html>

⌨️ 快捷键说明

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