<%@ page contentType="text/html;charset=UTF-8" errorPage="../error.jsp"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="com.hongshee.ejforum.util.PageUtils"%>
<%@ page import="com.hongshee.ejforum.common.CacheManager"%>
<%@ page import="com.hongshee.ejforum.data.UserDAO.UserInfo"%>
<%@ page import="com.hongshee.ejforum.data.GroupDAO.GroupVO"%>
<%
	UserInfo userinfo = PageUtils.getAdminUser(request, response);
	if (userinfo == null) return;
	String fromPath = PageUtils.getPathFromReferer(request);
	
	String groupID = request.getParameter("id");
	CacheManager cache = CacheManager.getInstance();
	GroupVO aGroup = cache.getGroup(groupID.charAt(0));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="../style/admin.css" type=text/css rel=stylesheet>
<SCRIPT src="../../js/common.js" type=text/javascript></SCRIPT>
<SCRIPT src="../js/admin.js" type=text/javascript></SCRIPT>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A onclick="parent.location='../index.htm'; return false;" 
            href="#">后台管理首页</A>&nbsp;&raquo;&nbsp;编辑用户组权限</TD></TR></TBODY></TABLE><BR>
      <FORM id="settings" name="settings" onSubmit="checkfields(this); return false;" action="../perform.jsp" method=post>
	  <INPUT type=hidden name="act" value="users_group_info">
	  <INPUT type=hidden name="groupID" value="<%= groupID %>">
	  <INPUT type=hidden name="fromPath" value="<%= fromPath %>">
      <A name=tb01></A>
      <TABLE class=info_tb cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR class=header>
          <TD colSpan=2>基本权限<A onClick="collapse_change('tb01','../images')" href="#">
		  	<IMG id=menuimg_tb01 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px" 
            src="../images/menu_reduce.gif" border=0></A> </TD></TR>
        <TBODY id=menu_tb01>
        <TR>
          <TD class=altbg1 width="45%"><B>允许访问论坛:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_1") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="A" name="VISIT_FORUM" id="A[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="VISIT_FORUM" id="A[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许查看会员列表:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_2") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="B" name="VIEW_MEMBERS" id="B[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="VIEW_MEMBERS" id="B[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许查看用户信息:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_3") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="C" name="VIEW_USERINFO" id="C[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="VIEW_USERINFO" id="C[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许查看统计数据:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_4") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="D" name="VIEW_STAT" id="D[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="VIEW_STAT" id="D[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许使用高级搜索:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_5") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="" CHECKED name="NOT_SEARCH" id="Z[0]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio value="Z" name="NOT_SEARCH" id="Z[1]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许上传头像:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_6") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="E" name="UPLOAD_AVATAR" id="E[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="UPLOAD_AVATAR" id="E[0]"> 否 </TD></TR>
		</TBODY></TABLE>
      <BR><A name=tb02></A>
      <TABLE class=info_tb cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR class=header>
          <TD colSpan=2>帖子相关<A onClick="collapse_change('tb02','../images')" href="#">
		  	<IMG id=menuimg_tb02 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px" 
            src="../images/menu_reduce.gif" border=0></A> </TD></TR>
        <TBODY id=menu_tb02>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发新话题:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_7") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="F" name="NEW_TOPIC" id="F[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="NEW_TOPIC" id="F[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发布悬赏主题:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_8") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="W" name="NEW_REWARD" id="W[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="NEW_REWARD" id="W[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发布投票主题:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_9") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="X" name="NEW_VOTE" id="X[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="NEW_VOTE" id="X[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发匿名贴:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_10") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="H" name="HIDE_POST" id="H[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="HIDE_POST" id="H[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发表回复:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_11") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="G" name="NEW_REPLY" id="G[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="NEW_REPLY" id="G[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许使用&nbsp;HTML&nbsp;代码:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_12") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="I" name="USE_HTML" id="I[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="USE_HTML" id="I[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发置顶帖子:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_13") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="T" name="TOP_POST" id="T[1]"> 是 &nbsp; &nbsp;
		  	<INPUT class=radio type=radio CHECKED value="" name="TOP_POST" id="T[0]"> 否 </TD></TR>
        </TBODY></TABLE>
      <BR><A name=tb03></A>
      <TABLE class=info_tb cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR class=header>
          <TD colSpan=2>附件相关<A onClick="collapse_change('tb03','../images')" href="#">
		  	<IMG id=menuimg_tb03 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px" 
            src="../images/menu_reduce.gif" border=0></A> </TD></TR>
        <TBODY id=menu_tb03>
        <TR>
          <TD class=altbg1 width="45%"><B>允许下载/查看附件:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_14") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="J" name="DOWNLOAD" id="J[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="DOWNLOAD" id="J[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许发布附件:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_15") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="K" name="UPLOAD" id="K[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="UPLOAD" id="K[0]"> 否 </TD></TR>
        </TBODY></TABLE><BR>
<%
	if (aGroup.groupType == 'S' && aGroup.groupID != 'G')
	{
%>		
	  <A name=tb04></A>
      <TABLE class=info_tb cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR class=header>
          <TD colSpan=2>管理权限<A onclick="collapse_change('tb04','../images')" href="#">
			<IMG id=menuimg_tb04 style="MARGIN-TOP: -12px; FLOAT: right; MARGIN-RIGHT: 8px" 
            src="../images/menu_reduce.gif" border=0></A> </TD></TR>
        <TBODY id=menu_tb04>
        <TR>
          <TD class=altbg1 width="45%"><B>允许全局置顶主题:</B><BR><SPAN 
      class=smalltxt><%= PageUtils.getString("group_info_16") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="V" name="TOP_GLOBAL" id="V[1]"> 是 &nbsp; &nbsp;
		  	<INPUT class=radio type=radio CHECKED value="" name="TOP_GLOBAL" id="V[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许编辑帖子:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_17") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="L" name="EDIT_POST" id="L[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="EDIT_POST" id="L[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许删除帖子:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_18") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="M" name="DELETE_POST" id="M[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="DELETE_POST" id="M[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许关闭主题:</B><BR>
            <SPAN class=smalltxt><%= PageUtils.getString("group_info_19") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="N" name="CLOSE_POST" id="N[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="CLOSE_POST" id="N[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许移动主题:</B><BR>
            <SPAN class=smalltxt><%= PageUtils.getString("group_info_20") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="O" name="MOVE_POST" id="O[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="MOVE_POST" id="O[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许编辑主题分类:</B><BR>
            <SPAN class=smalltxt><%= PageUtils.getString("group_info_21") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="Y" name="EDIT_CATS" id="Y[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="EDIT_CATS" id="Y[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许编辑用户:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_22") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="P" name="EDIT_USER" id="P[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="EDIT_USER" id="P[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许执行积分奖惩:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_23") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="Q" name="EDIT_CREDITS" id="Q[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="EDIT_CREDITS" id="Q[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许禁止用户:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_24") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="R" name="BAN_USER" id="R[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="BAN_USER" id="R[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许审核用户:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_25") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="S" name="AUDIT_USER" id="S[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="AUDIT_USER" id="S[0]"> 否 </TD></TR>
        <TR>
          <TD class=altbg1 width="45%"><B>允许删除用户:</B><BR><SPAN 
            class=smalltxt><%= PageUtils.getString("group_info_26") %></SPAN></TD>
          <TD class=altbg2>
		  	<INPUT class=radio type=radio value="U" name="DELETE_USER" id="U[1]"> 是 &nbsp; &nbsp; 
			<INPUT class=radio type=radio CHECKED value="" name="DELETE_USER" id="U[0]"> 否 </TD></TR>
        </TBODY></TABLE><BR>
<%
	}
%>		
      <CENTER><INPUT class=button type=submit value="提 交"></CENTER></FORM></TD></TR></TBODY></TABLE><BR><BR>
<script language="javascript">
function checkfields(theform) {
	theform.submit();
}
<%
	char right = ' ';
	String elemID = "";
	for (int i=0; i<aGroup.rights.length(); i++)
	{
		right = aGroup.rights.charAt(i);
		elemID = String.valueOf(right) + "[1]";
%>
$('<%= elemID %>').checked = "true";
<%
	}
%>
</script>	  
<%= PageUtils.getAdminFooter(request) %>
</BODY></HTML>