<%@ page contentType="text/html; charset=UTF-8" %> <%-- - - Copyright (C) 2004-2008 Jive Software, 2017-2025 Ignite Realtime Foundation. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --%> <%@ page import="org.jivesoftware.util.LocaleUtils, org.jivesoftware.util.ParamUtils, org.jivesoftware.util.StringUtils" %><%@ page import="org.xmpp.packet.JID"%> <%@ page import="java.net.URLEncoder" %> <%@ page import="org.jivesoftware.openfire.muc.MultiUserChatService" %> <%@ page import="java.util.List" %> <%@ page import="java.nio.charset.StandardCharsets" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib prefix="admin" uri="admin" %> <%! final int DEFAULT_RANGE = 15; final int[] RANGE_PRESETS = {15, 25, 50, 75, 100}; %> <% webManager.init(request, response, session, application, out ); %> <fmt:message key="muc.service.summary.title"/> <% // Get parameters int start = ParamUtils.getIntParameter(request,"start",0); int range = ParamUtils.getIntParameter(request,"range",webManager.getRowsPerPage("muc-service-summary", DEFAULT_RANGE)); if (request.getParameter("range") != null) { webManager.setRowsPerPage("muc-service-summary", range); } // Get the number of registered services int servicesCount = webManager.getMultiUserChatManager().getServicesCount(false); // paginator vars int numPages = (int)Math.ceil((double)servicesCount/(double)range); int curPage = (start/range) + 1; %> <% if (request.getParameter("deletesuccess") != null) { %> <% } %> <% if (webManager.getMultiUserChatManager().getMultiUserChatServicesCount() < 1) { %>

<% } %>

: <%= LocaleUtils.getLocalizedNumber(servicesCount) %> -- <% if (numPages > 1) { %> <%= LocaleUtils.getLocalizedNumber(start+1) %>-<%= LocaleUtils.getLocalizedNumber(Math.min(start + range, servicesCount)) %>, <% } %> -- :

<% if (numPages > 1) { %>

: [ <% int num = 15 + curPage; int s = curPage-1; if (s > 5) { s -= 5; } if (s < 5) { s = 0; } if (s > 2) { %> 1 ... <% } int i; for (i=s; i " ><%= (i+1) %><%= sep %> <% } %> <% if (i < numPages) { %> ... <%= numPages %> <% } %> ]

<% } %>
<% // Print the list of users List services = webManager.getMultiUserChatManager().getMultiUserChatServices(); if (services.isEmpty()) { %> <% } int i = start; for (MultiUserChatService service : services) { if (service.isHidden()) { // Private and hidden, skip it. continue; } i++; %> <% } %>
 
<%= i %> <%= StringUtils.escapeHTMLTags(JID.unescapeNode(service.getServiceName())) %> <%= StringUtils.escapeHTMLTags(service.getDescription()) %>   <%= service.getNumberChatRooms() %> <%= service.getNumberConnectedUsers() %> " ><fmt:message key="> " ><fmt:message key=">
<% if (numPages > 1) { %>

: [ <% int num = 15 + curPage; int s = curPage-1; if (s > 5) { s -= 5; } if (s < 5) { s = 0; } if (s > 2) { %> 1 ... <% } for (i=s; i " ><%= (i+1) %><%= sep %> <% } %> <% if (i < numPages) { %> ... <%= numPages %> <% } %> ]

<% } %>