.
BIN
WebRoot/chartroom/arclist/1.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/10.gif
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
WebRoot/chartroom/arclist/11.gif
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
WebRoot/chartroom/arclist/12.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
WebRoot/chartroom/arclist/13.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
WebRoot/chartroom/arclist/14.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
WebRoot/chartroom/arclist/15.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/16.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
WebRoot/chartroom/arclist/17.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
WebRoot/chartroom/arclist/18.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
WebRoot/chartroom/arclist/19.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/2.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/20.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/21.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
WebRoot/chartroom/arclist/22.gif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WebRoot/chartroom/arclist/23.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
WebRoot/chartroom/arclist/24.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
WebRoot/chartroom/arclist/25.gif
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
WebRoot/chartroom/arclist/26.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
WebRoot/chartroom/arclist/27.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
WebRoot/chartroom/arclist/28.gif
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
WebRoot/chartroom/arclist/29.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
WebRoot/chartroom/arclist/3.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/30.gif
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
WebRoot/chartroom/arclist/31.gif
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
WebRoot/chartroom/arclist/32.gif
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
WebRoot/chartroom/arclist/33.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
WebRoot/chartroom/arclist/34.gif
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
WebRoot/chartroom/arclist/35.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
WebRoot/chartroom/arclist/36.gif
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
WebRoot/chartroom/arclist/37.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/38.gif
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
WebRoot/chartroom/arclist/39.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
WebRoot/chartroom/arclist/4.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WebRoot/chartroom/arclist/40.gif
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
WebRoot/chartroom/arclist/41.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/42.gif
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
WebRoot/chartroom/arclist/43.gif
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
WebRoot/chartroom/arclist/44.gif
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
WebRoot/chartroom/arclist/45.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
WebRoot/chartroom/arclist/46.gif
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
WebRoot/chartroom/arclist/47.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
WebRoot/chartroom/arclist/48.gif
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
WebRoot/chartroom/arclist/49.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/5.gif
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
WebRoot/chartroom/arclist/50.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
WebRoot/chartroom/arclist/51.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
WebRoot/chartroom/arclist/52.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/53.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
WebRoot/chartroom/arclist/54.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
WebRoot/chartroom/arclist/55.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
WebRoot/chartroom/arclist/56.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
WebRoot/chartroom/arclist/57.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
WebRoot/chartroom/arclist/58.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
WebRoot/chartroom/arclist/59.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
WebRoot/chartroom/arclist/6.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
WebRoot/chartroom/arclist/60.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
WebRoot/chartroom/arclist/61.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
WebRoot/chartroom/arclist/62.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
WebRoot/chartroom/arclist/63.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/64.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/65.gif
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
WebRoot/chartroom/arclist/66.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
WebRoot/chartroom/arclist/67.gif
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
WebRoot/chartroom/arclist/68.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
WebRoot/chartroom/arclist/69.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
WebRoot/chartroom/arclist/7.gif
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
WebRoot/chartroom/arclist/70.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
WebRoot/chartroom/arclist/71.gif
Normal file
|
After Width: | Height: | Size: 971 B |
BIN
WebRoot/chartroom/arclist/72.gif
Normal file
|
After Width: | Height: | Size: 988 B |
BIN
WebRoot/chartroom/arclist/73.gif
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
WebRoot/chartroom/arclist/74.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
WebRoot/chartroom/arclist/75.gif
Normal file
|
After Width: | Height: | Size: 654 B |
BIN
WebRoot/chartroom/arclist/8.gif
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
WebRoot/chartroom/arclist/9.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
39
WebRoot/chartroom/content.jsp
Normal file
@@ -0,0 +1,39 @@
|
||||
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="" %>
|
||||
<% request.setCharacterEncoding("gb2312"); %>
|
||||
<%
|
||||
if(session.getAttribute("actualuser").equals("null")){
|
||||
out.println("<script language='javascript'>alert('您还没有登录不能进入本聊天室');parent.location.href='login.html';</script>");
|
||||
}
|
||||
if(session.getAttribute("actualuser").equals("request.getParameter("+request.getParameter("tempuser")+")")){
|
||||
out.println("<script language='javascript'>alert('请重新选择聊天对象');</script>");
|
||||
}
|
||||
String message=request.getParameter("message");
|
||||
String select=request.getParameter("select");
|
||||
String tempuser=request.getParameter("tempuser");
|
||||
String color=request.getParameter("color");
|
||||
if(message!=null&&tempuser!=null){
|
||||
if(message.startsWith("<F1")){
|
||||
out.print("<marquee direction='left' scrollamount='23'>"+
|
||||
"<font color='blue'>"+"请不要输入带有标记的特殊符号"+"</font>"+"</marquee>");
|
||||
return;
|
||||
}else if(message.endsWith("F1>")){
|
||||
out.print("<marquee direction='left' scrollamount='25'>"+
|
||||
"<font color='blue'>"+"请不要输入带有标记的特殊符号"+"</font>"+"</marquee>");
|
||||
return;
|
||||
}
|
||||
if(application.getAttribute("message")==null){ //第一个人说话时
|
||||
application.setAttribute("message","<br>"+"<font color='blue'>"+
|
||||
"<strong>"+session.getAttribute("actualuser")+"</strong>"+"</font>"+"<font color='#CC0000'>"+select+"</font>"+"对"+"<font color='green'>"+"["+tempuser+"]"+"</font>"+"说:"+"<font color="+color+">"+message);
|
||||
}else{
|
||||
application.setAttribute("message","<br>"+"<font color='blue'>"+"<strong>"+session.getAttribute("actualuser")+"</strong>"+"</font>"+"<font color='#CC0000'>"+select+"</font>"+"对"+"<font color='green'>"+"["+tempuser+"]"+"</font>"+"说:"+"<font color="+color+">"+message+"</font>"+application.getAttribute("message"));
|
||||
}
|
||||
out.println("<p>"+application.getAttribute("message")+"<p>");
|
||||
}else{
|
||||
if(application.getAttribute("message")==null){
|
||||
out.println("<font color='#cc0000'>"+application.getAttribute("ul")+"</font>"+"<font color='green'>"+"走进了网络聊天室"+"</font>");
|
||||
out.println("<br>"+"<center>"+"<font color='#aa0000''>"+"请各位聊友注意聊天室的规则,不要在本聊天室内发表反动言论及对他人进行人身攻击,不要随意刷屏。"+"</font>"+"</center>");
|
||||
}else{
|
||||
out.println(application.getAttribute("message")+"<br>");
|
||||
}
|
||||
}
|
||||
%>
|
||||
BIN
WebRoot/chartroom/images/bg.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
WebRoot/chartroom/images/go.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
WebRoot/chartroom/images/index(1).bmp
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
WebRoot/chartroom/images/index.bmp
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
WebRoot/chartroom/images/login.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
WebRoot/chartroom/images/login1改(1).psd
Normal file
BIN
WebRoot/chartroom/images/login3.jpg
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
WebRoot/chartroom/images/top.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
WebRoot/chartroom/images/top1.jpg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
WebRoot/chartroom/images/用户登录.jpg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
WebRoot/chartroom/images/用户登录1.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
WebRoot/chartroom/images/聊天室主页.jpg
Normal file
|
After Width: | Height: | Size: 429 KiB |
33
WebRoot/chartroom/index.jsp
Normal file
@@ -0,0 +1,33 @@
|
||||
<%@ page contentType="text/html;charset=gb2312" language="java" %>
|
||||
<html>
|
||||
<title>
|
||||
聊天室
|
||||
</title>
|
||||
<link href="../css/chart_style.css" rel="stylesheet">
|
||||
<link href="../css/bootstrap.css" rel="stylesheet">
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
if(form1.username.value==""){
|
||||
alert("请输入用户名!");form1.username.focus();return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form role="form" name="form1" method="post" action="login.jsp" onSubmit="return check()">
|
||||
<div class="form-group">
|
||||
<table width="363" height="224" border="0" align="center" cellpadding="0" cellspacing="0" background="images/login.png">
|
||||
<tr>
|
||||
<td height="121" colspan="3" class="word_dark"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="53" align="center" valign="top" class="word_dark"> </td>
|
||||
<td width="216" align="center" valign="top" class="word_dark">用户名:
|
||||
<input type="text" name="username"></td>
|
||||
<td width="94" valign="top" class="word_dark"><input type="image" name="imageField" src="images/go.jpg"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
18
WebRoot/chartroom/leave.jsp
Normal file
@@ -0,0 +1,18 @@
|
||||
<%@ page contentType="text/html; charset=gb2312" language="java"%>
|
||||
<% request.setCharacterEncoding("gb2312"); %>
|
||||
<%@ page import="java.util.Vector"%>
|
||||
<%@ page import="com.wgh.UserForm"%>
|
||||
<%
|
||||
Vector temp=(Vector)application.getAttribute("myuser");
|
||||
for(int i=0;i<temp.size();i++){
|
||||
UserForm mylist=(UserForm)temp.elementAt(i);
|
||||
if(mylist.username.equals(session.getAttribute("actualuser"))){
|
||||
temp.removeElementAt(i);
|
||||
/* session.setAttribute("actualuser","null"); */
|
||||
}
|
||||
if(temp.size()==0){
|
||||
application.removeAttribute("message");
|
||||
}
|
||||
}
|
||||
response.sendRedirect("../mainframe.jsp");
|
||||
%>
|
||||
26
WebRoot/chartroom/login.jsp
Normal file
@@ -0,0 +1,26 @@
|
||||
<%@ page contentType="text/html;charset=gb2312" language="java"%>
|
||||
<%@ page import="java.util.Vector"%>
|
||||
<%@ page import="com.wgh.UserForm"%>
|
||||
<%
|
||||
request.setCharacterEncoding("gb2312");
|
||||
Object username = session.getAttribute("actualuser");
|
||||
boolean flag = true;
|
||||
Vector temp = (Vector) application.getAttribute("myuser");
|
||||
if (application.getAttribute("myuser") == null) {
|
||||
temp = new Vector();
|
||||
}
|
||||
UserForm mylist = new UserForm();
|
||||
mylist.username = (String) username;
|
||||
//±£´æµ±Ç°µÇ¼µÄÓû§Ãû
|
||||
|
||||
Vector myuser = (Vector) application.getAttribute("myuser");
|
||||
if (myuser == null) {
|
||||
myuser = new Vector();
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
myuser.addElement(mylist);
|
||||
}
|
||||
application.setAttribute("myuser", myuser);
|
||||
response.sendRedirect("main.jsp");
|
||||
%>
|
||||
191
WebRoot/chartroom/main.jsp
Normal file
@@ -0,0 +1,191 @@
|
||||
<%@ page contentType="text/html; charset=gb2312" language="java"
|
||||
import="java.sql.*"%>
|
||||
<%
|
||||
request.setCharacterEncoding("gb2312");
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<title>聊天室</title>
|
||||
<link href="../css/chart_style.css" rel="stylesheet">
|
||||
<link href="../css/bootstrap.css" rel="stylesheet">
|
||||
<script language="javascript" src="../js/AjaxRequest.js"></script>
|
||||
<link rel="stylesheet" href="。。/css/emoji.css">
|
||||
<script language="javascript">
|
||||
window.setInterval("showContent();", 1000);
|
||||
window.setInterval("showOnline();", 10000);
|
||||
//此处需要加&nocache="+new Date().getTime(),否则将出现在线人员列表不更新的情况
|
||||
function showOnline() {
|
||||
var loader = new net.AjaxRequest("online.jsp?nocache=" + new Date().getTime(), deal_online, onerror, "GET");
|
||||
}
|
||||
function showContent() {
|
||||
var loader1 = new net.AjaxRequest("content.jsp?nocache=" + new Date().getTime(), deal_content, onerror, "GET");
|
||||
}
|
||||
function onerror() {
|
||||
alert("很抱歉,服务器出现错误,当前窗口将关闭!");
|
||||
window.opener = null;
|
||||
window.close();
|
||||
}
|
||||
function deal_online() {
|
||||
online.innerHTML = this.req.responseText;
|
||||
}
|
||||
function deal_content() {
|
||||
content.innerHTML = this.req.responseText;
|
||||
}
|
||||
</script>
|
||||
<script language="javascript">
|
||||
function check() { //验证聊天信息
|
||||
if (form1.tempuser.value == "") {
|
||||
alert("请选择聊天对象!");return false;
|
||||
}
|
||||
if (form1.message.value == "") {
|
||||
alert("发送信息不可以为空!");form1.message.focus();return false;
|
||||
}
|
||||
}
|
||||
function Exit() {
|
||||
window.location.href = "leave.jsp";
|
||||
}
|
||||
</script>
|
||||
<script language="javascript">
|
||||
function set(selectPerson){ //自动添加聊天对象
|
||||
if(selectPerson!="<%=session.getAttribute("actualuser")%>"){
|
||||
form1.tempuser.value=selectPerson;
|
||||
}else{
|
||||
alert("请重新选择聊天对象!");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script language="jscript">
|
||||
window.onbeforeunload = function() { //当用户单击浏览器中的“关闭”按钮时,执行退出操作
|
||||
if (event.clientY < 0 && event.clientX > document.body.scrollmax - width) {
|
||||
Exit(); //执行退出操作
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onLoad="showContent();showOnline();set('所有人');" onbeforeunload="Exit()">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="chatTop"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="online" class="col-xs-3 col-sm-3 list">在线人员列表</div>
|
||||
<div id="content" class="col-xs-9 col-sm-9 chat">聊天内容</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="chatsent">
|
||||
<form role="form" action="send.jsp" name="form1" method="post"
|
||||
onSubmit="return check()">
|
||||
|
||||
|
||||
<p>
|
||||
<span class="emotion glyphicon glyphicon-heart"></span>
|
||||
</p>
|
||||
|
||||
<div class="chatsentinput">
|
||||
[<%=session.getAttribute("actualuser")%>
|
||||
]对 <input name="tempuser" type="text" value="" size="35"
|
||||
readonly="readonly"> 表情 <select name="select"
|
||||
class="wenbenkuang">
|
||||
<option value="无表情的">无表情的</option>
|
||||
<option value="微笑着" selected>微笑着</option>
|
||||
<option value="笑呵呵地">笑呵呵地</option>
|
||||
<option value="热情的">热情的</option>
|
||||
<option value="温柔的">温柔的</option>
|
||||
<option value="红着脸">红着脸</option>
|
||||
<option value="幸福的">幸福的</option>
|
||||
<option value="嘟着嘴">嘟着嘴</option>
|
||||
<option value="热泪盈眶的">热泪盈眶的</option>
|
||||
<option value="依依不舍的">依依不舍的</option>
|
||||
<option value="得意的">得意的</option>
|
||||
<option value="神秘兮兮的">神秘兮兮的</option>
|
||||
<option value="恶狠狠的">恶狠狠的</option>
|
||||
<option value="大声的">大声的</option>
|
||||
<option value="生气的">生气的</option>
|
||||
<option value="幸灾乐祸的">幸灾乐祸的</option>
|
||||
<option value="同情的">同情的</option>
|
||||
<option value="遗憾的">遗憾的</option>
|
||||
<option value="正义凛然的">正义凛然的</option>
|
||||
<option value="严肃的">严肃的</option>
|
||||
<option value="慢条斯理的">慢条斯理的</option>
|
||||
<option value="无精打采的">无精打采的</option>
|
||||
</select> 说: <input id="message" name="message" type="text" width="100px">
|
||||
字体颜色: <select name="color" size="1" class="wenbenkuang"
|
||||
id="select">
|
||||
<option selected>默认颜色</option>
|
||||
<option style="color:#FF0000" value="FF0000">红色热情</option>
|
||||
<option style="color:#0000FF" value="0000ff">蓝色开朗</option>
|
||||
<option style="color:#ff00ff" value="ff00ff">桃色浪漫</option>
|
||||
<option style="color:#009900" value="009900">绿色青春</option>
|
||||
<option style="color:#009999" value="009999">青色清爽</option>
|
||||
<option style="color:#990099" value="990099">紫色拘谨</option>
|
||||
<option style="color:#990000" value="990000">暗夜兴奋</option>
|
||||
<option style="color:#000099" value="000099">深蓝忧郁</option>
|
||||
<option style="color:#999900" value="999900">卡其制服</option>
|
||||
<option style="color:#ff9900" value="ff9900">镏金岁月</option>
|
||||
<option style="color:#0099ff" value="0099ff">湖波荡漾</option>
|
||||
<option style="color:#9900ff" value="9900ff">发亮蓝紫</option>
|
||||
<option style="color:#ff0099" value="ff0099">爱的暗示</option>
|
||||
<option style="color:#006600" value="006600">墨绿深沉</option>
|
||||
<option style="color:#999999" value="999999">烟雨蒙蒙</option>
|
||||
</select> <input name="Submit2" type="submit" class="btn btn-default send"
|
||||
value="发送">
|
||||
</div>
|
||||
<input name="button_exit" type="button" class="btn_orange"
|
||||
value="退出聊天室" onClick="Exit()">
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jquery.qqFace.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function(){
|
||||
|
||||
$('.emotion').qqFace({
|
||||
|
||||
id : 'facebox',
|
||||
|
||||
assign:'message',
|
||||
|
||||
path:'arclist/' //表情存放的路径
|
||||
|
||||
});
|
||||
|
||||
$(".send").click(function(){
|
||||
|
||||
var str = $("#message").val();
|
||||
|
||||
$("#show").html(replace_em(str));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//查看结果
|
||||
|
||||
function replace_em(str){
|
||||
|
||||
str = str.replace(/\</g,'<');
|
||||
|
||||
str = str.replace(/\>/g,'>');
|
||||
|
||||
str = str.replace(/\n/g,'<br/>');
|
||||
|
||||
str = str.replace(/\[em_([0-9]*)\]/g,'<img src="arclist/$1.gif" border="0" />');
|
||||
|
||||
return str;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
33
WebRoot/chartroom/online.jsp
Normal file
@@ -0,0 +1,33 @@
|
||||
<%@ page contentType="text/html; charset=gb2312" language="java"
|
||||
import="java.util.*"%>
|
||||
<%@ page import="com.wgh.UserForm"%>
|
||||
<%
|
||||
request.setCharacterEncoding("gb2312");
|
||||
%>
|
||||
<%
|
||||
Vector myuser = (Vector) application.getAttribute("myuser");
|
||||
%>
|
||||
<link href="../css/bootstrap.css" rel="stylesheet">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<td height="32" align="center" class="word_orange disabled">欢迎来到VANTEN聊天室!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="23" align="center"><a href="#" onclick="set('所有人')">所有人</a></td>
|
||||
</tr>
|
||||
<%
|
||||
for (int i = 0; i < myuser.size(); i++) {
|
||||
UserForm mylist = (UserForm) myuser.elementAt(i);
|
||||
%>
|
||||
<tr>
|
||||
<td height="23" align="center"><a href="#"
|
||||
onclick="set('<%=mylist.username%>')"><%=mylist.username%></a></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td height="30" align="center">当前在线[<font color="#FF6600"><%=myuser.size()%></font>]人
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
3
WebRoot/chartroom/send.jsp
Normal file
@@ -0,0 +1,3 @@
|
||||
<%@ page contentType="text/html; charset=gb2312" language="java"%>
|
||||
<%@ include file="content.jsp"%>
|
||||
<%response.sendRedirect("main.jsp");%>
|
||||