⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manage.jsp

📁 java 数据库编程实例 经过反复调试 保证可以运行 是学习java网络编程的绝佳资料
💻 JSP
字号:
<%@ page errorPage="ErrorPage.jsp" %>
<%@ page contentType="text/html;charset=gb2312" %>
<HTML>
   <BODY>
<jsp:useBean id="thisUser" scope="session" class="chatroom.oneUser" />
<jsp:useBean id="thischatroom" scope="application" class="chatroom.ChatRoom" />
<%
  if (thisUser.getUserName() != null)
    {
%>
<form method="post" action="../servlet/chatroom.Chat" target="onechat">
<table width="699" border="0" cellspacing="0" cellpadding="5" align="center">
   <tr>
      <td>
         <p><font size="2" >聊天内容:
            <input type="text" name="txtword" size="40" maxlength="40">
            &nbsp;&nbsp;&nbsp;&nbsp;对象:
            <select name="seluser">
               <option value="all" selected>大家</option>
               <%
                 int intchatroom=Integer.parseInt(thisUser.getUserPosion());
                 int i;
                 for(i=1;i<=thischatroom.returnUserCount(intchatroom);i++){
                    String theUserName=thischatroom.returnUserName(intchatroom,i);
                     String theUserId=thischatroom.returnUserId(intchatroom,i);
                     if (!thisUser.getUserId().equals(theUserId))
                        out.print("<option value=\""+theUserId+"\">"+theUserName+"</option>");
                    }
               %>
            </select>
            &nbsp;&nbsp;&nbsp;&nbsp;颜色:
            <select name="selcolor">
               <option value="red">红色</option>
               <option value="blue">蓝色</option>
            </select>
         </p><p>表情:
            <select name="selface">
               <option value="0" selected>无</option>
               <option value="1">笑</option>
            </select>
            &nbsp;聊天刷新:
            <select name="selre1">
               <option value="5"
               <%
               if (thisUser.getRetimeChat(intchatroom)==5) out.print("selected");
               %>
               >5秒</option>
               <option value="10"
               <%
               if (thisUser.getRetimeChat(intchatroom)==10) out.print("selected");
               %>
               >10秒</option>
               <option value="20"
               <%
               if (thisUser.getRetimeChat(intchatroom)==20) out.print("selected");
               %>
               >20秒</option>
               <option value="30"
               <%
               if (thisUser.getRetimeChat(intchatroom)==30) out.print("selected");
               %>
               >30秒</option>
               <option value="60"
               <%
               if (thisUser.getRetimeChat(intchatroom)==60) out.print("selected");
               %>
               >1分钟</option>
            </select>
            &nbsp;用户刷新:
            <select name="selre2">
               <option value="5"
               <%
               if (thisUser.getRetimeUser(intchatroom)==5) out.print("selected");
               %>
               >5秒</option>
               <option value="10"
               <%
               if (thisUser.getRetimeUser(intchatroom)==10) out.print("selected");
               %>
               >10秒</option>
               <option value="20"
               <%
               if (thisUser.getRetimeUser(intchatroom)==20) out.print("selected");
               %>
               >20秒</option>
               <option value="30"
               <%
               if (thisUser.getRetimeUser(intchatroom)==30) out.print("selected");
               %>
               >30秒</option>
               <option value="60"
               <%
               if (thisUser.getRetimeUser(intchatroom)==60) out.print("selected");
               %>
               >1分钟</option>
            </select>
            &nbsp;
            <input type="checkbox" name="radprivate" value="yes">
            私聊
            &nbsp;
            <input type="submit" name="cmdok" value="发送">
            &nbsp;
            <a href="Bye" target="_parent">离开聊天室</a>
            &nbsp;
            <a href="manage.jsp">刷新</a>
            </font></p>
         </td>
      </tr>
   </table>
   <input type="hidden" name="isret" value="no">
</form>
<% } else out.print("尚未登录,进入<a href='/mytest/jsp/login.jsp'>用户登录</a>");
%>
   </BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -