sender_do.jsp
资源名称:JSP-OA.rar [点击查看]
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- <%@ page contentType="text/html; charset=utf-8"
- import = "java.io.*"
- import = "cn.js.fan.util.*"
- import = "com.redmoon.chat.*"
- %>
- <%
- String mode = ParamUtil.get( request, "mode" );
- ChatClient cc = new ChatClient();
- String room = ParamUtil.get( request, "room" );
- String user = ParamUtil.get( request, "user" );
- %>
- <script>
- function showmsg(msg) {
- if (typeof(window.parent.chatappletarea.showmsg)=="function")
- window.parent.chatappletarea.showmsg(msg);
- }
- </script>
- <%
- if ( mode.equals("send") ) {
- String message = ParamUtil.get( request, "message" );
- out.print(message);
- String ret = cc.send(user, room, message);
- %>
- <script>
- <%=ret%>
- </script>
- <%}%>
- <%
- if ( mode.equals("jumptoroom") ) {
- String newroom = ParamUtil.get( request, "newroom" );
- String ret = cc.jumptoroom(user, room, newroom);
- %>
- <script>
- <%=ret%>
- window.parent.chatappletarea.location.href = "chatapplet.jsp?nick=<%=StrUtil.UrlEncode(user)%>&room=<%=StrUtil.UrlEncode(newroom)%>&reloadreason=jumptoroom";
- </script>
- <%}%>
- <%
- if ( mode.equals("rename") ) {
- String newuser = ParamUtil.get( request, "newuser" );
- String ret = cc.ReName(user, room, newuser);
- if ( ret==newuser ) {
- %>
- <script>
- window.parent.chatappletarea.location.href = "chatapplet.jsp?nick=<%=StrUtil.UrlEncode(newuser)%>&room=<%=StrUtil.UrlEncode(room)%>";
- </script>
- <%
- }
- else {
- %>
- <script>
- <%=ret%>
- </script>
- <%
- }
- }%>
- <%
- if ( mode.equals("roominfo") ) {
- String ret = cc.getRoomInfo(user, room);
- %>
- <script>
- <%=ret%>
- </script>
- <%}%>
- <%
- if ( mode.equals("getuserinfo") ) {
- String whichuser = ParamUtil.get(request, "nick");
- String ret = cc.getUserInfo(user, room, whichuser);
- %>
- <script>
- <%=ret%>
- </script>
- <%}%>
- <%
- if ( mode.equals("sendAnnounce") ) {
- String announce = ParamUtil.get(request, "announce");
- String ret = cc.sendAnnounce(user, room, announce);
- %>
- <script>
- <%=ret%>
- </script>
- <%}%>
- <%
- if ( mode.equals("kicksb") ) {
- String sb = ParamUtil.get(request, "sb");
- String ret = cc.kicksb(user, room, sb);
- %>
- <script>
- <%=ret%>
- </script>
- <%}%>