<%response.buffer=true%>

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

<!--#include file="../conn2.asp"-->
<!--#include file="../inc/config.asp"-->
<!--#include file="set.asp"-->
 <% bid1=request.querystring("bid") 
 menu=request.querystring("menu")
    username=request.form("username")
    bid=request.form("bid")
select case menu
case ""
 username=request.querystring("username")
%>
 <style type="text/css">
<!--
.style1 {color: #000000}
-->
 </style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></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="#CCCCCC">
  <tr bgcolor="f1f1f1"> 
    <td height="25" colspan="2" class="norightbuttonborder2"><div align="center" class="style1">社区版主管理</div></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="44%" height="25"><div align="right">用户名：(必须是注册会员)：</div></td>
    <td width="56%" height="25"> <input name="username" type="text" class="wenbenkuang" value="<%=username%>" size="30" readonly="true"></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="44%" height="25"><div align="right">管理论坛：</div></td>
    <td width="56%" height="25"> <select name="bid" size="1" class="wenbenkuang">
        <option value='20000' >*论坛管理员*</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")%>' <%if int(bid1)=int(rs1("bid")) then%>selected<%end if%>>-----<%=rs1("bidname")%></option>
        <%rs1.movenext                                         
loop                        
   rs1.Close                    
set rs1=nothing %>
    </select> </td>    
  </tr>    
  <tr bgcolor="#FFFFFF">     
    <td height="25" colspan="2"> <p align="center">     
        <input name="B1" type="submit" class="go-wenbenkuang" value="提交">    
    </td>    
  </tr>    
</table>                                                   
                             
<%case "save"       
if bid=20000 then    
a="管理员"    
else    
a="斑竹"    
end if                      
Set rs = Server.CreateObject("ADODB.Recordset")                           
sql = "SELECT * FROM shop_user 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("zw")=a                     
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 shop_user where userid="&id             
rs.open sql,conn,1,3             
rs("manbid")=0    
rs("zw")="普通会员"            
rs.update            
rs.close               
set rs=nothing               
 response.redirect "admin.asp"                   
end select                         
%>                          
                             
    
    
    
