<%! XMLPropertyResourceBundle chatroomBundle = new XMLPropertyResourceBundle(); %> <%@ page import="jChatBox.Util.*,jChatBox.Chat.*,java.util.*,java.text.SimpleDateFormat" %> <% jChatBox.Chat.ChatroomManager ChatroomManager = jChatBox.Chat.ChatroomManager.getInstance(); String chatroomTotalUsers = "", chatroomMaxUsers = "", chatroomName = "", chatroomSubject = "", chatroomDate = ""; /* I18N support since Servlets 2.3. */ //try //{ // request.setCharacterEncoding(chatroomBundle.getString("global.encoding")); //} catch (Exception e) {} String chatroomID = request.getParameter("id"); int ID = -1; if ( (chatroomID != null) && (!chatroomID.equals("")) ) { try { ID = Integer.parseInt(chatroomID); Chatroom chatroom = ChatroomManager.getChatroom(ID); chatroomName = chatroom.getParams().getName(); chatroomBundle = (XMLPropertyResourceBundle) XMLConfig.RESOURCES.get(chatroom.getParams().getLanguage()); chatroomSubject = chatroom.getParams().getSubject(); chatroomMaxUsers = ""+chatroom.getParams().getMaxUsers(); chatroomTotalUsers = ""+chatroom.getTotalUsers(); chatroomDate = (new SimpleDateFormat(chatroomBundle.getString("login.date.format"))).format(chatroom.getDate()); } catch (Exception e) {} } else { Vector vChat = ChatroomManager.getChatrooms(); if (vChat.size() > 0) { Chatroom chatroom = (Chatroom) vChat.elementAt(0); ID = chatroom.getParams().getID(); chatroomName = chatroom.getParams().getName(); chatroomBundle = (XMLPropertyResourceBundle) XMLConfig.RESOURCES.get(chatroom.getParams().getLanguage()); chatroomSubject = chatroom.getParams().getSubject(); chatroomMaxUsers = ""+chatroom.getParams().getMaxUsers(); chatroomTotalUsers = ""+chatroom.getTotalUsers(); chatroomDate = (new SimpleDateFormat(chatroomBundle.getString("login.date.format"))).format(chatroom.getDate()); } else { chatroomBundle = (XMLPropertyResourceBundle) XMLConfig.RESOURCES.get(XMLConfig.DEFAULTLANGUAGE); } } response.setContentType("text/html; charset="+chatroomBundle.getString("global.encoding")); String jspDisplay = UserLogin.doLogin(request, session); if (jspDisplay != null) { //response.sendRedirect(response.encodeRedirectURL(jspDisplay)); %><% } %> <%= chatroomBundle.getString("login.title") %> " />
" method="post" name="chat" id="chat">
<% if (UserLogin.getSysMessage()==Conf.CHATROOMNOTFOUND) out.print(""); else if (UserLogin.getSysMessage()==Conf.CLOSED) out.print(""); else if (UserLogin.getSysMessage()==Conf.NOVACANCIES) out.print(""); else if (UserLogin.getSysMessage()==Conf.NAMENOTAVAILABLE) out.print(""); else if (UserLogin.getSysMessage()==Conf.BANNED) out.print(""); %>
<%= chatroomBundle.getString("login.username.label") %>
"+chatroomBundle.getString("login.chatroomnotfound.error")+"
"+chatroomBundle.getString("login.closed.error")+"
"+chatroomBundle.getString("login.novacancies.error")+"
"+chatroomBundle.getString("login.namenotavailable.error")+"
"+chatroomBundle.getString("login.banned.error")+"
<%= chatroomBundle.getString("login.join.link") %><%= chatroomBundle.getString("login.join.label") %>
<%= chatroomBundle.getString("login.chatroom.label") %><%= chatroomName %>
<%= chatroomBundle.getString("login.subject.label") %><%= chatroomSubject %>
<%= chatroomBundle.getString("login.open.label") %><%= chatroomDate %>
<%= chatroomBundle.getString("login.useramount.label") %><%= chatroomTotalUsers %>
<%= chatroomBundle.getString("login.userlimit.label") %><%= chatroomMaxUsers %>