alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td width="100%" nowrap> <a class="nav" href="<%=indexUrl%>"> »  <a class="nav" href="index">Admin CP »  <a class="nav" href="groupmanagement">User Management »  Member: <a class="nav" href="viewmember?memberid=<%=memberBean.getMemberID()%>"><%=memberBean.getMemberName()%> »  View Member Cumulative Permission </td> </tr> </table> <br/> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="theader"> <td colspan="2">Member Informations </tr> <tr class="trow1"> <td width="30%">Member ID <td><%=memberBean.getMemberID()%> </tr> <tr class="trow2"> <td>Member Name <td><%=memberBean.getMemberName()%> </tr> <tr class="trow1"> <td>Full Name <td><%=memberBean.getMemberFirstname()%> <%=memberBean.getMemberLastname()%> </tr> <tr class="trow2"> <td>E mail <td><%=memberBean.getMemberEmail()%> </tr> <tr class="trow2"> <td valign="top">Belong to <%=groups.size() + 1%> group(s) <td>Member (View Group)
<% for (Iterator groupIter = groups.iterator(); groupIter.hasNext(); ) { GroupsBean group = (GroupsBean)groupIter.next(); %> <b><%=group.getGroupName()%> (<a class="command" href="viewgroup?group=<%=group.getGroupID()%>">View Group - List Members in Group) <br/> <%}%> </td> </tr> </table> <br/> <table width="95%" align="center"> <tr> <td class="highlight" colspan="19">Global Permissions: </tr> </table> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="theader"> <td width="80%">Permissions <td align="center">Status (Yes/No) </tr> <tr class="tcat"> <td colspan="2">Special permissions: </tr> <tr class="trow1"> <td>Activated <td align="center"><%if (perm.isActivated()) {%>Yes<%} else {%>No<%}%> </tr> <%--tr class="trow2"> <td>Authenticated <td align="center"><%if (perm.isAuthenticated()) {%>Yes<%} else {%>No<%}%> </tr--%> <tr class="tcat"> <td colspan="2">Forum/Category permissions </tr> <tr class="trow1"> <td>Add new Category <td align="center"><%if (perm.canAddCategory()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="trow2"> <td>Edit Category <td align="center"><%if (perm.canEditCategory()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="trow1"> <td>Delete Category <td align="center"><%if (perm.canDeleteCategory()) {%> Yes<%} else {%>No<%}%> </tr> <tr class="trow2"> <td>Add new Forum <td align="center"><%if (perm.canAddForum()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="tcat"> <td colspan="2">Other permissions: </tr> <tr class="trow1"> <td>Admin System <td align="center"><%if (perm.canAdminSystem()) {%> Yes<%} else {%>No<%}%> </tr> <%--
<td align="center"><%if (perm.canLogin()) {%>Yes<%} else {%>No<%}%> </tr>--%> <tr class="trow2"> <td>Send Mail <td align="center"><%if (perm.canSendMail()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="trow1"> <td>Use Avatar <td align="center"><%if (perm.canUseAvatar()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="trow2"> <td>Use Private Message <td align="center"><%if (perm.canUseMessage()) {%>Yes<%} else {%>No<%}%> </tr> <tr class="trow1"> <td>Add Attachment in Private Message <td align="center"><%if (perm.canAddMessageAttachment()) {%>Yes<%} else {%>No<%}%> </tr> </table> <br/> <table width="95%" align="center"> <tr> <td class="highlight" colspan="19">Forum-specific Permissions: </tr> </table> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="theader" align="center"> <td>Forum <td>Edit <td>Delete <td>Assign <td>Thread <td>Add <td>Moderate <td>Post <td>Read <td>Add <td>Delete <td>Edit <td>Attachment <td>Add <td>Get <td>Poll <td>Add <td>Edit <td>Delete </tr> <% CategoryCache categoryCache = CategoryCache.getInstance(); ForumCache forumCache = ForumCache.getInstance(); Collection categoryBeans = categoryCache.getBeans(); Collection forumBeans = forumCache.getBeans(); %> <% for (Iterator catIterator = categoryBeans.iterator(); catIterator.hasNext(); ) { CategoryBean categoryBean = (CategoryBean)catIterator.next(); %> <tr class="tcat"> <%int forumCountInCurrentCategory = 0; for (Iterator forumIterator = forumBeans.iterator(); forumIterator.hasNext(); ) { ForumBean forumBean = (ForumBean)forumIterator.next(); if (forumBean.getCategoryID() == categoryBean.getCategoryID()) { forumCountInCurrentCategory++; String color = (forumCountInCurrentCategory%2 == 1) ? "trow1" : "trow2"; int forumID = forumBean.getForumID(); boolean editForum = perm.canEditForum(forumID); boolean deleteForum = perm.canDeleteForum(forumID); boolean assignForum = perm.canAssignToForum(forumID); boolean moderateThread = perm.canModerateThread(forumID); boolean addThread = perm.canAddThread(forumID); boolean readPost = perm.canReadPost(forumID); boolean addPost = perm.canAddPost(forumID); boolean deletePost = perm.canDeletePost(forumID); boolean editPost = perm.canEditPost(forumID); boolean addAttach = perm.canAddAttachment(forumID); boolean getAttach = perm.canGetAttachment(forumID); boolean addPoll = perm.canAddPoll(forumID); boolean editPoll = perm.canEditPoll(forumID); boolean deletePoll = perm.canDeletePoll(forumID); %> <tr class="<%=color%>" align="center"> <td align="left"> <%=forumBean.getForumName()%> <td><%if (editForum) {%>Yes<%} else {%>No<%}%> <td><%if (deleteForum) {%>Yes<%} else {%>No<%}%> <td><%if (assignForum) {%>Yes<%} else {%>No<%}%> <td class="messageTextBold">Thread » <td><%if (addThread) {%>Yes<%} else {%>No<%}%> <td><%if (moderateThread) {%>Yes<%} else {%>No<%}%> <td class="messageTextBold">Post » <td><%if (readPost) {%>Yes<%} else {%>No<%}%> <td><%if (addPost) {%>Yes<%} else {%>No<%}%> <td><%if (deletePost) {%>Yes<%} else {%>No<%}%> <td><%if (editPost) {%>Yes<%} else {%>No<%}%> <td class="messageTextBold">Attachment » <td><%if (addAttach) {%>Yes<%} else {%>No<%}%> <td><%if (getAttach) {%>Yes<%} else {%>No<%}%> <td class="messageTextBold">Poll » <td><%if (addPoll) {%>Yes<%} else {%>No<%}%> <td><%if (editPoll) {%>Yes<%} else {%>No<%}%> <td><%if (deletePoll) {%>Yes<%} else {%>No<%}%> </tr> <% }//if } //for forumIndex%> <% if ( forumCountInCurrentCategory == 0 ) { %> <tr class="trow1"> <% } } // for category%> <% if ( categoryBeans.size() == 0 ) { %> <tr class="trow1"> <% } %> </table> <br/> </fmt:bundle> <%@ include file="footer.jsp"%> </body> </html>

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/viewmemberpermissions.jsp,v 1.8 2005/01/18 11:01:39 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.8 $
 - $Date: 2005/01/18 11:01:39 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2005 by MyVietnam.net
 -
 - 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.
 -
 - 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 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@MyVietnam.net
 -
 - @author: Minh Nguyen  minhnn@MyVietnam.net
 - @author: Mai  Nguyen  mai.nh@MyVietnam.net
 --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*"%>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html>
<head>
  <title> - View Member Cumulative Permission
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>

<%
MemberBean memberBean = (MemberBean)request.getAttribute("MemberBean");
Collection groups = (Collection)request.getAttribute("MemberGroups");
MVNForumPermission perm = (MVNForumPermission)request.getAttribute("Permissions");
%>
<table width="95%" align="center">
  <tr class="nav">
    <td>
<%=categoryBean.getCategoryName()%>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.