?? editmemberpermission.jsp
字號:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/editmemberpermission.jsp,v 1.34 2006/04/14 18:02:17 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.34 $
- $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="net.myvietnam.mvncore.MVNCoreConfig" %>
<%@ 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="mvnforum.admin.viewmember.editGlobalMemberPermissions"/><!--Edit Global 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");
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> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.admin.index.title_name"/><!--Admin CP--></a> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "usermanagement")%>"><fmt:message key="mvnforum.admin.header.usermanagement"/><!--User Management--></a> »
<fmt:message key="mvnforum.admin.common.member"/><!--Member-->: <a class="nav" href="<%=urlResolver.encodeURL(request, response, "viewmember?memberid=" + memberBean.getMemberID())%>"><%=memberBean.getMemberName()%></a> »
<fmt:message key="mvnforum.admin.viewmember.editGlobalMemberPermissions"/><!--Edit Global 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="mvnforum.admin.viewmember.changeGlobalMemberPermissions"/><!--Change Global 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>
</table>
<br/>
<form name="form1" action="<%=urlResolver.encodeURL(request, response, "updatememberpermission" , URLResolver.ACTION_URL)%>" method="post">
<%=urlResolver.generateFormAction(request, response, "updatememberpermission")%>
<input type="hidden" name="memberid" value="<%=memberBean.getMemberID()%>">
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="portlet-section-header">
<td><fmt:message key="mvnforum.admin.common.permissions"/><!--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.globalCombinedPermissionArray;
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.globalIndividualPermissionArray;
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
%>
<% if (MVNCoreConfig.getEnableMVNCMS()) {%>
<tr class="portlet-section-subheader">
<td colspan="4" align="center"><b>CMS Individual Permissions</b></td>
</tr>
<%
int[] allCMSIndividualPerms = AbstractPermission.globalCMSIndividualPermissionArray;
for (int i = 0; i < allCMSIndividualPerms.length; i++) {
int perm = allCMSIndividualPerms[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
} //if enable CMS
%>
<tr class="portlet-section-footer">
<td colspan="2"> </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 + -