<%
/**
 *	$RCSfile: sidebar.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:30 $
 */
%>

<%@ page import="com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*" %>

<%@ include file="include/global.jsp" %>

<%	// Get parameters
	
	// "sidebar" (tells which sidebar to display)
	String sidebar = ParamUtils.getParameter(request,"sidebar");
    if (sidebar == null) {
        sidebar = "system";
    }
%>

<html>
<head>
<title>Jive Forums Admin Tool</title>
<%@ include file="include/global.css" %>
</head>

<body background="images/sidebar_back.gif" text="#000000" link="#0000ff" vlink="#0000ff" alink="#6699cc">

<img src="images/blank.gif" width="50" height="5" border="0"><br>

<%  if ("system".equals(sidebar)) { %>

    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%"><font size="-1" color="#333333"><b>System Settings</b></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="forumPerms.jsp" target="main">Global Permissions</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="filters.jsp" target="main">Global Filters</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="searchSettings.jsp" target="main">Search Settings</a></font></td>
    </tr>
    <tr><td width="1%">&nbsp;</td>
        <td width="1%">&#149;</td>
        <td width="97%"><font size="-1"><a href="cache.jsp" target="main">Cache Settings</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="database.jsp" target="main">Database Settings</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="locale.jsp" target="main">Locale Settings</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="data.jsp" target="main">Data Import/Export</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="stats.jsp" target="main">Basic Stats</a></font></td>
    </tr>
    <tr><td colspan="3">&nbsp;</td>
    </tr>
    <tr><td colspan="3"><font size="-1" color="#333333"><b>Watches</b></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="editWatches.jsp" target="main">Configure Watches</a></font></td>
    </tr>
    <tr><td colspan="3">&nbsp;</td>
    </tr>
    <tr><td colspan="3"><font size="-1" color="#333333"><b>Rewards</b></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="manageRewards.jsp" target="main">Manage Points</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="editRewards.jsp" target="main">Configure Points</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="rewardReports.jsp" target="main">Reports</a></font></td>
    </tr>
    </table>
    
<%  } else if ("users".equals(sidebar)) { 
        // Get a user object out of the session. The existence of this object
        // means we need to display more links specific to the user
        User user = (User)session.getAttribute("admin.sidebar.users.currentUser");
        boolean showUserLinks = (user != null);
        
        // Get a group object out of the session. The existence of this object
        // means we need to display more links specific to the group
        Group group = (Group)session.getAttribute("admin.sidebar.groups.currentGroup");
        boolean showGroupLinks = (group != null);
%>
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%"><font size="-1"><b>Users</b></font></td>
    </tr>
    <tr><td width="1%">&nbsp;</td>
        <td width="1%">&#149;</td>
        <td width="97%"><font size="-1"><a href="users.jsp" target="main">User Summary</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="createUser.jsp" target="main">Create User</a></font></td>
    </tr>
    </table>
    
    <%  if (showUserLinks) {
            long userID = user.getID();
    %>
    <p>
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%">
        
        <table bgcolor="#a5abc0" cellpadding="1" cellspacing="0" border="0" width="100%">
        <tr><td>
        <table bgcolor="#d1d9e2" cellpadding="2" cellspacing="0" border="0" width="100%">
        <tr>
            <td colspan="3"><font size="-1"><b>User: <%= user.getUsername() %></b></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="editUser.jsp?user=<%= userID %>" target="main">User Properties</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="removeUser.jsp?user=<%= userID %>" target="main">Delete User</a></font></td>
        </tr>
        </table>
        </td></tr>
        </table>
        
        </td>
    </tr>
    </table>
    <%  } %>
    
    <p>
    
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3"><font size="-1"><b>Groups</b></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="groups.jsp" target="main">Group Summary</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="createGroup.jsp" target="main">Create Group</a></font></td>
    </tr>
    </table>
    
    <%  if (showGroupLinks) {
            long groupID = group.getID();
    %>
    <p>
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%">
        
        <table bgcolor="#a5abc0" cellpadding="1" cellspacing="0" border="0" width="100%">
        <tr><td>
        <table bgcolor="#d1d9e2" cellpadding="2" cellspacing="0" border="0" width="100%">
        <tr>
            <td colspan="3"><font size="-1"><b>Group: <%= group.getName() %></b></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="editGroup.jsp?group=<%= groupID %>" target="main">Group Properties</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="groupMembers.jsp?group=<%= groupID %>" target="main">Group Members</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="removeGroup.jsp?group=<%= groupID %>" target="main">Delete Group</a></font></td>
        </tr>
        </table>
        </td></tr>
        </table>
        
        </td>
    </tr>
    </table>
    <%  } %>

<%  } else if ("forum".equals(sidebar)) {
        // Get a forum object out of the session. The existence of this object
        // means we need to display more links specific to the forum
        Forum forum = (Forum)session.getAttribute("admin.sidebar.forums.currentForum");
        boolean showForumLinks = (forum != null);
%>

    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%"><font size="-1"><b>Forums</b></font></td>
    </tr>
    <tr><td width="1%">&nbsp;</td>
        <td width="1%">&#149;</td>
        <td width="97%"><font size="-1"><a href="forums.jsp" target="main">Forums Summary</a></font></td>
    </tr>
    <tr><td>&nbsp;</td>
        <td>&#149;</td>
        <td><font size="-1"><a href="createForum.jsp" target="main">Create New Forum</a></font></td>
    </tr>
    <tr><td colspan="3">&nbsp;</td>
    </tr>
    </table>
    
    <%  if (showForumLinks) {
            long forumID = forum.getID();
    %>
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%">
        
        <table bgcolor="#a5abc0" cellpadding="1" cellspacing="0" border="0" width="100%">
        <tr><td>
        <table bgcolor="#d1d9e2" cellpadding="2" cellspacing="0" border="0" width="100%">
        <tr>
            <td colspan="3"><font size="-1"><b><%= forum.getName() %></b></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="editForum.jsp?forum=<%= forumID %>" target="main">Forum Properties</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="forumPerms.jsp?forum=<%= forumID %>" target="main">Permissions</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="filters.jsp?forum=<%= forumID %>" target="main">Message Filters</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="moderation.jsp?forum=<%= forumID %>" target="main">Moderation</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="forumContent.jsp?forum=<%= forumID %>" target="main">Manage Content</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="gateways.jsp?forum=<%= forumID %>" target="main">Gateways</a></font></td>
        </tr>
        <tr bgcolor="#eeeeee">
            <td>&nbsp;</td>
            <td>&#149;</td>
            <td><font size="-1"><a href="removeForum.jsp?forum=<%= forumID %>" target="main">Delete Forum</a></font></td>
        </tr>
        </table>
        </td></tr>
        </table>
        
        </td>
    </tr>
    </table>
    <%  } %>

<% } else if ("moderation".equals(sidebar)) { %>

    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr><td rowspan="99" width="1%">&nbsp;</td>
        <td colspan="3" width="99%"><font size="-1"><b>Moderation</b></font></td>
    </tr>
    <tr><td width="1%">&nbsp;</td>
        <td width="1%">&#149;</td>
        <td width="97%"><font size="-1"><a href="moderation.jsp" target="main">Moderation</a></font></td>
    </tr>
    </table>
    
<%  } %>

<br><br>

</body>
</html>

