<!-- #include file="include/onlogin.asp" -->
<!-- #include file="include/conn.asp" -->
<%
dim tit_menu,popedoms,usernames,username,frm_view,popedom
tit_menu="<a href='?'>权限管理</a>"
response.write header (6,tit_menu)

frm_view="no"
username=trim(request.querystring("username"))
response.write admin_bar(titt,1,"450")
%>
<table width='100%' border=0 align=center cellpadding=2 cellspacing=1>
<tr align=center class=tdbg-tree>
<td width='30%'>现任管理员</td>
<td width='35%'>系统管理权限</td>
<td width='35%'>版面管理权限</td>
</tr>
<tr align=center valign=top class=tdbg-dark><td>
<table border=0>
<%
sql="select username,popedom from user_data where power='"&objv7.format_power2(user_power,1,1)&"' order by id"
set rs=conn.execute(sql)
do while not rs.eof
  usernames=rs("username")
  response.write vbcrlf&"<tr><td align=center><a href='?username="&server.urlencode(usernames)&"'"
  if username=usernames then
    popedoms=rs("popedom")
    popedom=right(popedoms,30)
    response.write " class=time"
    frm_view="yes"
  end if
  response.write ">"&usernames&"</a></td></tr>"
  rs.movenext
loop
rs.close:set rs=nothing

if frm_view="yes" and trim(request.querystring("chk"))="yes" then
  popedom=popedom_frm(1)&popedom_frm(2)&popedom_frm(3)&popedom_frm(4)&popedom_frm(5)&popedom_frm(6)&popedom_frm(7)&popedom_frm(8)&popedom_frm(9)&popedom_frm(10) & _
	  popedom_frm(11)&popedom_frm(12)&popedom_frm(13)&popedom_frm(14)&popedom_frm(15)&popedom_frm(16)&popedom_frm(17)&popedom_frm(18)&popedom_frm(19)&popedom_frm(20)&popedom
  popedoms=popedom
  sql="update user_data set popedom='"&popedom&"' where username='"&username&"' and power='"&objv7.format_power2(user_power,1,1)&"'"
  conn.execute(sql)
  response.write "<script language=javascript>alert("""&username&" 的权限修改成功！"");</script>"
end if
%>
</table>
</td>
<%
if frm_view="yes" then
  response.write "<form action='?username="&server.urlencode(username)&"&chk=yes' method=post>"
end if
%>
<td>
<table border=0>
<tr><td><input type=checkbox name=popedom_cb18 value='1'<% if popedom_formated(popedoms,18,0)=1 then response.write " checked" %>></td><td>电影管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb1 value='1'<% if popedom_formated(popedoms,1,0)=1 then response.write " checked" %>></td><td>用户管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb2 value='1'<% if popedom_formated(popedoms,2,0)=1 then response.write " checked" %>></td><td>执行SQL</td></tr>
<tr><td><input type=checkbox name=popedom_cb3 value='1'<% if popedom_formated(popedoms,3,0)=1 then response.write " checked" %>></td><td>配置修改</td></tr>
<tr><td><input type=checkbox name=popedom_cb4 value='1'<% if popedom_formated(popedoms,4,0)=1 then response.write " checked" %>></td><td>广告管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb5 value='1'<% if popedom_formated(popedoms,5,0)=1 then response.write " checked" %>></td><td>分类管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb6 value='1'<% if popedom_formated(popedoms,6,0)=1 then response.write " checked" %>></td><td>权限管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb7 value='1'<% if popedom_formated(popedoms,7,0)=1 then response.write " checked" %>></td><td>更新公告</td></tr>
<tr><td><input type=checkbox name=popedom_cb8 value='1'<% if popedom_formated(popedoms,8,0)=1 then response.write " checked" %>></td><td>调查管理</td></tr>
<input type=hidden name=popedom_cb10 value='0'>
</table>
</td><td>
<table border=0>
<tr><td><input type=checkbox name=popedom_cb11 value='1'<% if popedom_formated(popedoms,11,0)=1 then response.write " checked" %>></td><td>论坛管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb12 value='1'<% if popedom_formated(popedoms,12,0)=1 then response.write " checked" %>></td><td>行业动态</td></tr>
<tr><td><input type=checkbox name=popedom_cb13 value='1'<% if popedom_formated(popedoms,13,0)=1 then response.write " checked" %>></td><td>文栏管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb14 value='1'<% if popedom_formated(popedoms,14,0)=1 then response.write " checked" %>></td><td>下载栏目</td></tr>
<tr><td><input type=checkbox name=popedom_cb15 value='1'<% if popedom_formated(popedoms,15,0)=1 then response.write " checked" %>></td><td>网站推荐</td></tr>
<tr><td><input type=checkbox name=popedom_cb16 value='1'<% if popedom_formated(popedoms,16,0)=1 then response.write " checked" %>></td><td>图库管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb17 value='1'<% if popedom_formated(popedoms,17,0)=1 then response.write " checked" %>></td><td>友情链接</td></tr>
<tr><td><input type=checkbox name=popedom_cb19 value='1'<% if popedom_formated(popedoms,19,0)=1 then response.write " checked" %>></td><td>IP管理</td></tr>
<tr><td><input type=checkbox name=popedom_cb9 value='1'<% if popedom_formated(popedoms,9,0)=1 then response.write " checked" %>></td><td>上传管理</td></tr>
<input type=hidden name=popedom_cb20 value='0'>
</table>
</td>
</tr>
<tr class=tdbg-dark><td colspan=3 align=center height=30>
<% if frm_view="yes" then %>
<input type=submit value='提 交 修 改'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type=reset value=' 重 置 '>
</td></form>
<% else %>
<font class=time>请点选左边的管理员以进行下一步操作</font></td>
<% end if %>
</tr>
</table>
<%
close_conn
response.write admin_bar("",2,"450")
'response.write ender()

function popedom_frm(pnums)
  dim pnum:pnum=trim(request.form("popedom_cb"&pnums))
  if not(isnumeric(pnum)) then pnum=0
  if int(pnum)<>0 then pnum=1
  popedom_frm=pnum
end function
%>