⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editmemberforumpermission.jsp

📁 解觖java技术中后台无法上传数给的情况
💻 JSP
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/editmemberforumpermission.jsp,v 1.33 2006/04/14 18:02:17 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.33 $
 - $Date: 2006/04/14 18:02:17 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2006 by MyVietnam.net
 -
 - All copyright notices regarding mvnForum MUST remain 
 - intact in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - http://www.mvnForum.com and http://www.MyVietnam.net in 
 - the footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 -
 - This program is free software; you can redistribute it and/or modify
 - it under the terms of the GNU General Public License as published by
 - the Free Software Foundation; either version 2 of the License, or
 - any later version.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -
 - Support can be obtained from support forums at:
 - http://www.mvnForum.com/mvnforum/index
 -
 - Correspondence and Marketing Questions can be sent to:
 - info at MyVietnam net
 -
 - @author: Minh Nguyen  
 - @author: Mai  Nguyen  
 --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.auth.AbstractPermission" %>
<%@ page import="com.mvnforum.auth.LocalizedPermission" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html>
<head>
  <title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mnvforum.admin.editmemberforumpermission"/><!--Edit Forum-Specific Member Permissions--></title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
<%--Added by Wangyi--%>
<%--for localize submit button--%>
<script type="text/javascript">
function addprom(){
document.forms.form1.elements['btnAdd'].value="Add";
document.forms.form1.submit();
}
function removeprom(){
document.forms.form1.elements['btnRemove'].value="Remove";
document.forms.form1.submit();
}
</script>
<%--End added by Wangyi--%>
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>

<%
MemberBean memberBean = (MemberBean)request.getAttribute("MemberBean");
ForumBean forumBean = (ForumBean)request.getAttribute("ForumBean");
int[] currentPerms = (int[])request.getAttribute("CurrentPermissions");
%>

<table width="98%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" nowrap>
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index", URLResolver.RENDER_URL, "view")%>"><fmt:message key="mvnforum.common.nav.index"/></a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.admin.index.title_name"/><!--Admin CP--></a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "usermanagement")%>"><fmt:message key="mvnforum.admin.header.usermanagement"/><!--User Management--></a>&nbsp;&raquo;&nbsp;
    <fmt:message key="mvnforum.admin.common.member"/><!--Member-->: <a class="nav" href="<%=urlResolver.encodeURL(request, response, "viewmember?memberid=" + memberBean.getMemberID())%>"><%=memberBean.getMemberName()%></a>&nbsp;&raquo;&nbsp;
    <fmt:message key="mnvforum.admin.editmemberforumpermission"/><!--Edit Forum-Specific Member Permissions-->
    </td>
  </tr>
</table>
<br/>

<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td colspan="2"><fmt:message key="mnvforum.admin.editmemberforumpermission"/><!--Edit Forum-Specific Member Permissions--></td>
  </tr>
  <tr class="portlet-section-body">
    <td width="30%"><fmt:message key="mnvforum.admin.editmemberforumpermission.currentMember"/><!--Current Member-->:</td>
    <td><b><%=memberBean.getMemberName()%></b></td>
  </tr>
  <tr class="portlet-section-alternate">
    <td width="30%"><fmt:message key="mnvforum.admin.editgroupforumpermission.currentForum"/><!--Current Forum-->:</td>
    <td><b><%=forumBean.getForumName()%></b></td>
  </tr>
</table>
<br/>
<form name="form1" action="<%=urlResolver.encodeURL(request, response, "updatememberforumpermission" , URLResolver.ACTION_URL)%>" method="post">
<%=urlResolver.generateFormAction(request, response, "updatememberforumpermission")%>
<input type="hidden" name="memberid" value="<%=memberBean.getMemberID()%>">
<input type="hidden" name="forum" value="<%=forumBean.getForumID()%>">
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td><fmt:message key="mvnforum.admin.common.permission"/><!--Permissions--></td>
    <td width="20%" align="center"><fmt:message key="mvnforum.admin.common.currentStatus"/><!--Current Status--></td>
    <td width="20%" align="center"><fmt:message key="mvnforum.admin.common.add"/><!--add--></td>
    <td width="20%" align="center"><fmt:message key="mvnforum.admin.common.remove"/><!--Remove--></td>
  </tr>
  <tr class="portlet-section-subheader">
    <td colspan="4" align="center"><b><fmt:message key="mvnforum.admin.common.combinedPermission"/><!--Combined Permissions--></b></td>
  </tr>
<%
int[] allCombinedPerms = AbstractPermission.forumCombinedPermissionArray;

for (int i = 0; i < allCombinedPerms.length; i++) {
    int perm = allCombinedPerms[i];

    boolean havePerm = false;
    for (int j = 0; j < currentPerms.length; j++) {
        if (currentPerms[j] == perm) {
            havePerm = true;
            break;
        }
    }
%>
  <tr class="<%=MyUtil.getRowCSS(i)%>">
    <td nowrap><%=LocalizedPermission.getDescription(perm, currentLocale)%></td>
    <% if (havePerm == true) {%>
    <td align="center"><font color="#008000"><fmt:message key="mvnforum.admin.common.has"/></font></td>
    <td align="center"></td>
    <td align="center"><input type="checkbox" name="remove" value="<%=perm%>" class="noborder"></td>
    <% } else {%>
    <td align="center"><font color="#FF0080"><fmt:message key="mvnforum.admin.common.hasno"/></font></td>
    <td align="center"><input type="checkbox" name="add" value="<%=perm%>" class="noborder"></td>
    <td align="center"></td>
    <% }%>
  </tr>
<%
} //for
%>
  <tr class="portlet-section-subheader">
    <td colspan="4" align="center"><b><fmt:message key="mvnforum.admin.common.individualPermission"/><!--Individual Permissions--></b></td>
  </tr>
<%
int[] allIndividualPerms = AbstractPermission.forumIndividualPermissionArray;

for (int i = 0; i < allIndividualPerms.length; i++) {
    int perm = allIndividualPerms[i];

    boolean havePerm = false;
    for (int j = 0; j < currentPerms.length; j++) {
        if (currentPerms[j] == perm) {
            havePerm = true;
            break;
        }
    }
%>
  <tr class="<%=MyUtil.getRowCSS(i)%>">
    <td nowrap><%=LocalizedPermission.getDescription(perm, currentLocale)%></td>
    <% if (havePerm == true) {%>
    <td align="center"><font color="#008000"><fmt:message key="mvnforum.admin.common.has"/></font></td>
    <td align="center"></td>
    <td align="center"><input type="checkbox" name="remove" value="<%=perm%>" class="noborder"></td>
    <% } else {%>
    <td align="center"><font color="#FF0080"><fmt:message key="mvnforum.admin.common.hasno"/></font></td>
    <td align="center"><input type="checkbox" name="add" value="<%=perm%>" class="noborder"></td>
    <td align="center"></td>
    <% }%>
  </tr>
<%
} //for
%>
  <tr class="portlet-section-footer">
    <td colspan="2">&nbsp;</td>
    <!--
    DO NOT use onclick="disabled=true; submit();" with 2 button below, because it will remove the 'name' attribute
    -->
    <%--Modified by Wangyi --%>
    <%--for localize submit button--%>
    <input type="hidden" name="btnAdd" value="">
    <input type="hidden" name="btnRemove" value="">
    <td align="center"><input type="submit" name="btnAdd2" value="<fmt:message key="mvnforum.admin.common.add"/>" onclick="addprom();" class="portlet-form-button"></td>
    <td align="center"><input type="submit" name="btnRemove2" value="<fmt:message key="mvnforum.admin.common.remove"/>" onclick="removeprom();" class="portlet-form-button"></td>
    <%--End modified by Wangyi--%>
  </tr>
</table>
</form>

<br/>
</fmt:bundle>
<%@ include file="footer.jsp"%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -