<%response.buffer=true%>

<head>
<LINK 
href="css.css" type=text/css rel=stylesheet>

<!--#include file="../conn2.asp"-->
<!--#include file="set.asp"-->
 <% menu=request.querystring("menu")

    username=request.form("username")
    bid=request.form("bid")
select case menu
case ""
 username=request.querystring("username")
%>
</head>

<body>
<br><div align="center">
<center><form method="POST" action="?menu=save"> 
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolordark="#FFFFFF" bgcolor="F6F6F6">
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" class="norightbuttonborder2"><div align="center"><font color="#FFFFFF">社区版主添加</font></div></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="44%"><div align="right">用户名：(必须是注册会员)：</div></td>
    <td width="56%"> <input name="username" type="text" class="textbox_shiixian_hui" value="<%=username%>" size="30"></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="44%"><div align="right">管理论坛：</div></td>
    <td width="56%"> <select name="bid" size="1">
        <option value='20000'>*论坛管理员*</option>
        <option value='8888'>*超级斑竹*</option>
        <option value='9999'>*论坛贵宾*</option>
        <%                               
    set rs1=server.createobject("adodb.recordset")                               
    sqlstr="select * from board order by px"                               
    rs1.open sqlstr,conn,1,1     
    do while not rs1.eof                               
    %>
        <option value='<%=rs1("bid")%>'>-----<%=rs1("bidname")%></option>
        <%rs1.movenext                                         
loop                        
   rs1.Close                    
set rs1=nothing %>
      </select> </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2"> <p align="center"> 
        <input name="B1" type="submit" class="button" value="提交">
    </td>
  </tr>
</table>                                               
                         
<%case "save"                     
Set rs = Server.CreateObject("ADODB.Recordset")                       
sql = "SELECT * FROM member where username='"&username&"'"                       
rs.open sql, conn, 1, 3                       
if rs.eof and rs.bof then                      
response.write"<script language='javascript'>alert('该用户不存在！')</script>"                     
response.write "<script language='javascript'>history.back(-1)</script>"                     
response.end                     
else                     
rs("username")=username                     
rs("manbid")=bid                        
rs.update                     
rs.close                     
set rs=nothing                     
response.redirect "admin.asp"                       
end if             
            
case "del"                
   id=request.querystring("id")        
set rs=server.createobject("adodb.recordset")         
sql="SELECT * FROM member where id="&id         
rs.open sql,conn,1,3         
rs("manbid")=bid        
rs.update        
rs.close           
set rs=nothing           
 response.redirect "admin.asp"               
end select                     
%>                      
                         
