<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/cook1.asp"-->
<!--#include file="inc/dimflag.asp"-->
<!--#include file="top.asp"-->
<%
if request("action")="save" then
for i=0 to 15
b=request(i)
if b="" then b=0
a=a&","&b
next
a=replace(a," ","")
a=right(a,31)

set rs=server.createobject("adodb.recordset")
sql="select * from com_admin where adminid="&request("userid")
rs.open sql,conn,1,3
rs("flag")=a
rs.update
rs.close
set rs=nothing
response.redirect "db_flag.asp?action=reh"

elseif request("action")="reh" then
response.redirect"db_flag.asp"
response.end
end if
%>
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
</div>
<%if request("action")="flag1" then
response.write"<meta http-equiv=""refresh"" content=""0;URL=db_flag.asp?action=flag&id="&request("id")&""">"
response.end
elseif request("action")="flag" then
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from com_admin where vip<>1 and adminid="&id
rs.open sql,conn,1,1
flag=rs("flag")
rs.close
set rs=nothing

fla=split(flag,",")
fla0=fla(0)
fla1=fla(1)
fla2=fla(2)
fla3=fla(3)
fla4=fla(4)
fla5=fla(5)
fla6=fla(6)
fla7=fla(7)
fla8=fla(8)
fla9=fla(9)
fla10=fla(10)
fla11=fla(11)
fla12=fla(12)
fla13=fla(13)
fla14=fla(14)
fla15=fla(15)
%>

<form name="form1" id="form1" method="post" action="db_flag.asp?action=save">
<div class="tableAll titlebgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:700px">管理员权限<input name="userid" type="hidden" value="<%=id%>"></li>
</div>
 <div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
  <li style="width:100px;"><input type="checkbox" name="0" value="1"<%if fla0=1 then%> checked<%end if%> >修改密码</li>
  <li style="width:100px;"><input type="checkbox" name="1" value="1"<%if fla1=1 then%> checked<%end if%> >产品管理</li>
  <li style="width:100px;"><input type="checkbox" name="2" value="1"<%if fla2=1 then%> checked<%end if%> >新闻管理</li>
  <li style="width:100px;"><input type="checkbox" name="3" value="1"<%if fla3=1 then%> checked<%end if%> >人才招聘</li>
  
  
  
 </div>
 
 <div class="tableAll trbgcolor">
   <li style="width:30px;">&nbsp;</li>
  <li style="width:100px;"><input type="checkbox" name="4" value="1"<%if fla4=1 then%> checked<%end if%> ></li>
  <li style="width:100px;"><input type="checkbox" name="5" value="1"<%if fla5=1 then%> checked<%end if%> ></li>
  <li style="width:100px;"><input type="checkbox" name="6" value="1"<%if fla6=1 then%> checked<%end if%> ></li>
  <li style="width:100px;"><input type="checkbox" name="7" value="1"<%if fla7=1 then%> checked<%end if%> ></li>
 </div>
 
 <div class="tableAll trbgcolor">
   <li style="width:30px;">&nbsp;</li>
  <li style="width:100px;"><input type="checkbox" name="8" value="1"<%if fla8=1 then%> checked<%end if%> ><%if Const_Flash=1 then%>FLASH动画<%end if%></li>
  <li style="width:100px;"><input type="checkbox" name="9" value="1"<%if fla9=1 then%> checked<%end if%> >客户留言</li>
  <li style="width:100px;"><input type="checkbox" name="10" value="1"<%if fla10=1 then%> checked<%end if%> >友情链接</li>
  <li style="width:100px;"><input type="checkbox" name="11" value="1"<%if fla11=1 then%> checked<%end if%> >资料下载</li>
 </div>
 
 <div class="tableAll trbgcolor">
   <li style="width:30px;">&nbsp;</li>
  <li style="width:100px;"><input type="checkbox" name="12" value="1"<%if fla12=1 then%> checked<%end if%> ><%if Const_QQ=1 then%>即时在线<%end if%></li>
  <li style="width:100px;"><input type="checkbox" name="13" value="1"<%if fla13=1 then%> checked<%end if%> ><%if Const_User=1 then%>会员管理<%end if%></li>
  <li style="width:100px;"><input type="checkbox" name="14" value="1"<%if fla14=1 then%> checked<%end if%> ><%if Const_Shop=1 then%>购物系统<%end if%></li>
  <li style="width:100px;"><input type="checkbox" name="15" value="1"<%if fla15=1 then%> checked<%end if%> ><%if Const_Html=1 then%>生成静态<%end if%></li>
 </div>
 <div class="tableAll trbgcolor">
   <li style="width:30px;">&nbsp;</li>
  <li ><input type="submit" name="Submit" value=" 确认修改 " class=button ></li>
 </div>

</form>
</div>

<%else%>
<div class="tableAll titlebgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:700px">管理员权限</li>
</div>
<%set rs=server.createobject("adodb.recordset")
sql="select * from com_admin where adminid>5 and vip<>1 order by adminid desc"
rs.open sql,conn,1,1
do while not rs.eof%>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px"><input type="radio" onClick="javascript:window.open('db_flag.asp?action=flag1&id=<%=rs("adminid")%>','_self')"><%=rs("com_xxx_admin")%>&nbsp;
      <%if rs("admin")=1 then response.write "<font color=#4D9DFF>网站CEO</font>" else response.write "普通管理" %></li>
</div>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>

<%end if%>
</div>
<!--#include file="footer.asp"-->