1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<%@ page import="org.jivesoftware.util.ParamUtils,
org.jivesoftware.messenger.PresenceManager,
org.jivesoftware.messenger.user.*"
%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%-- Define Administration Bean --%>
<jsp:useBean id="ad" class="org.jivesoftware.util.WebManager" />
<% ad.init(request, response, session, application, out ); %>
<c:set var="username" value="${param.username}" />
<c:set var="tabName" value="${pageScope.tab}" />
<jsp:useBean id="tabName" type="java.lang.String" />
<% // Get params
String uname = ParamUtils.getParameter(request,"username");
// Load the user
User foundUser = ad.getUserManager().getUser(uname);
// Get a presence manager
PresenceManager presenceManager = ad.getPresenceManager();
%>
<table class="jive-tabs" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<c:set var="tabCount" value="1" />
<td class="jive-<%= (("props".equals(tabName)) ? "selected-" : "") %>tab" width="1%" nowrap>
<a href="user-properties.jsp?username=<c:out value="${username}"/>"><fmt:message key="user.tabs.properties" /></a>
</td>
<td class="jive-tab-spacer" width="1%"><img src="images/blank.gif" width="5" height="1" border="0"></td>
<c:set var="tabCount" value="${tabCount + 1}" />
<td class="jive-<%= (("edit".equals(tabName)) ? "selected-" : "") %>tab" width="1%" nowrap>
<a href="user-edit-form.jsp?username=<c:out value="${username}"/>"><fmt:message key="user.tabs.edit" /></a>
</td>
<td class="jive-tab-spacer" width="1%"><img src="images/blank.gif" width="5" height="1" border="0"></td>
<c:set var="tabCount" value="${tabCount + 1}" />
<% // Only show the message tab if the user is online
if (presenceManager.isAvailable(foundUser)) {
%>
<td class="jive-<%= (("message".equals(tabName)) ? "selected-" : "") %>tab" width="1%" nowrap>
<a href="user-message.jsp?username=<c:out value="${username}"/>"><fmt:message key="user.tabs.send" /></a>
</td>
<td class="jive-tab-spacer" width="1%"><img src="images/blank.gif" width="5" height="1" border="0"></td>
<c:set var="tabCount" value="${tabCount + 1}" />
<% } %>
<td class="jive-<%= (("pass".equals(tabName)) ? "selected-" : "") %>tab" width="1%" nowrap>
<a href="user-password.jsp?username=<c:out value="${username}"/>"><fmt:message key="user.tabs.change_pwd" /></a>
</td>
<td class="jive-tab-spacer" width="1%"><img src="images/blank.gif" width="5" height="1" border="0"></td>
<c:set var="tabCount" value="${tabCount + 1}" />
<td class="jive-<%= (("delete".equals(tabName)) ? "selected-" : "") %>tab" width="1%" nowrap>
<a href="user-delete.jsp?username=<c:out value="${username}"/>"><fmt:message key="user.tabs.delete_user" /></a>
</td>
<td class="jive-tab-spacer" width="1%"><img src="images/blank.gif" width="5" height="1" border="0"></td>
<c:set var="width" value="${100-(tabCount*2)}" />
<td class="jive-tab-spring" width="<c:out value="${width}" />%" align="right" nowrap>
</td>
</tr>
<tr>
<td class="jive-tab-bar" colspan="99">
</td>
</tr>
</table>
<table bgcolor="#dddddd" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="1%"><img src="images/blank.gif" width="1" height="1" border="0"></td></tr>
</table>
<table bgcolor="#eeeeee" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="1%"><img src="images/blank.gif" width="1" height="1" border="0"></td></tr>
</table>