<%@language=vbscript%>
<!--#include file="../../inc/md5.asp"-->
<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla11<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>

<%
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 dlxf_admin where dlxf_id="&request("userid")
rs.open sql,conn,1,3
rs("dlxf_flag")=a
rs.update
rs.close
set rs=nothing
response.redirect "flag.asp?action=reh"

elseif request("action")="reh" then
response.write"<meta http-equiv=""refresh"" content=""0;URL=flag.asp"">"
response.end
end if
%>
<%=citycss%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<br>
<%if request("action")="flag1" then
response.write"<meta http-equiv=""refresh"" content=""0;URL=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 dlxf_admin where dlxf_id="&id
rs.open sql,conn,1,1
flag=rs("dlxf_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)
%>
<table width="95%" height="0" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#6C90D1">
<tr bgcolor="#D6DFF7" align="center"><td colspan=5 height="30"><strong>操 作 状 态</strong></td></tr>
<form name="form1" method="post" action="flag.asp?action=save">
<input name="userid" type="hidden" value="<%=id%>">
<!--=============================-->
<tr bgcolor="#ffffff">
<td height="30"><input type="checkbox" name="0" value="1"<%if fla0=1 then%> checked<%end if%> class=radio>系统设置</td>
<td><input type="checkbox" name="1" value="1"<%if fla1=1 then%> checked<%end if%> class=radio>诚信通会员</td>
<td><input type="checkbox" name="2" value="1"<%if fla2=1 then%> checked<%end if%> class=radio>普通会员</td>
<td><input type="checkbox" name="3" value="1"<%if fla3=1 then%> checked<%end if%> class=radio>商贸机会</td>
<td><input type="checkbox" name="4" value="1"<%if fla4=1 then%> checked<%end if%> class=radio>产品管理</td>
</tr>
<tr bgcolor="#ffffff">
<td height="30"><input type="checkbox" name="5" value="1"<%if fla5=1 then%> checked<%end if%> class=radio>企业新闻</td>
<td><input type="checkbox" name="6" value="1"<%if fla6=1 then%> checked<%end if%> class=radio>招聘信息</td>
<td><input type="checkbox" name="7" value="1"<%if fla7=1 then%> checked<%end if%> class=radio>展会管理</td>
<td><input type="checkbox" name="8" value="1"<%if fla8=1 then%> checked<%end if%> class=radio>模版管理</td>
<td><input type="checkbox" name="9" value="1"<%if fla9=1 then%> checked<%end if%> class=radio>意见反馈</td>
</tr>
<tr bgcolor="#ffffff">
<td height="30"><input type="checkbox" name="10" value="1"<%if fla10=1 then%> checked<%end if%> class=radio>帮助文档</td>
<td><input type="checkbox" name="11" value="1"<%if fla11=1 then%> checked<%end if%> class=radio>管理员管理</td>
<td><input type="checkbox" name="12" value="1"<%if fla12=1 then%> checked<%end if%> class=radio>数据管理</td>
<td><input type="checkbox" name="13" value="1"<%if fla13=1 then%> checked<%end if%> class=radio>广告管理</td>
<td><input type="checkbox" name="14" value="1"<%if fla14=1 then%> checked<%end if%> class=radio>编辑器管理</td>
</tr>
<tr bgcolor="#ffffff">
<td height="30"><input type="checkbox" name="15" value="1"<%if fla15=1 then%> checked<%end if%> class=radio>行业新闻</td>
<td colspan=4></td>
</tr>
<!--=============================-->
<tr bgcolor="#ffffff">
<td height=30 align=center colspan=5><input type="submit" name="Submit" value=" 确 认 修 改 " class=input1></td></tr>
</form>
</table>
<%else%>
<table width="95%" height="0" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6C90D1">
    <tr bgcolor="#D6DFF7"> 
      <td width="26%" align="right"><strong>权限操作</strong>&nbsp;</td>
      <td width="37%" height="30" align="left">&nbsp;<strong>用户名</strong></td>
    </tr>
<%set rs=server.createobject("adodb.recordset")
sql="select * from dlxf_admin order by dlxf_id desc"
rs.open sql,conn,1,1
do while not rs.eof%>
    <tr bgcolor="#ffffff"> 
      <td align="right"><input type="radio" title="点击操作" class=radio onclick="javascript:window.open('flag.asp?action=flag1&id=<%=rs("dlxf_id")%>','_self')">&nbsp;</td>
      <td height="30" align="left">&nbsp;<%=rs("dlxf_nick")%></td>
    </tr>
<%rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%end if%>
</body>
</html>
