userMessage.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:6k
- <%@ page language="java" contentType="text/html;charset=UTF-8"
- session="true" errorPage="err.jsp" %>
- <%@ include file="./GVinc/gvImport.jsp" %>
- <jsp:useBean id="cmt" scope="page" class="com.gamvan.club.message.ClubMessageTake"/>
- <jsp:useBean id="cms" scope="page" class="com.gamvan.club.message.ClubMessageSend"/>
- <jsp:useBean id="csrs" scope="page" class="com.gamvan.club.ClubStringReplaces"/>
- <%
- String act="take";
- if(request.getParameter("act")!=null){
- act=request.getParameter("act");
- }
- if(gvUserName==null || gvUserName.equals("")){
- out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
- out.close();
- if(true) return;
- }
- int reID = 0;
- if(request.getParameter("cmReID")!=null){
- reID = TypeChange.stringToInt(request.getParameter("cmReID")) ;
- }
- int iPage = 1;
- if(request.getParameter("iPage")!=null){
- iPage = TypeChange.stringToInt(request.getParameter("iPage"));
- }
- int cmReID;
- int cmID = 0;
- if(request.getParameter("cmID")!=null){
- cmID = TypeChange.stringToInt(request.getParameter("cmID"));
- }
- String cmTakeUser=""
- , cmSendUser=""
- , cmAddTime=""
- , cmTopic=""
- , cmContent="";
-
- boolean cmIsTake = false, cmIsSend = false;
- int cmSendID = 0, cmTakeID = 0;
- boolean bea = false;
- ClubMessageSendItem cmsi = null;
- ClubMessageTakeItem cmti = null;
- if(act.equals("take")){
- cmti = (ClubMessageTakeItem)cmt.takeMessageInfo(cmID);
- if(cmti!=null){
- cmTakeUser = cmti.getCmTakeUser();
- cmSendUser = cmti.getCmSendUser();
- cmTopic = cmti.getCmTopic();
- cmContent = cmti.getCmContent();
- cmAddTime = cmti.getCmAddTime();
- cmIsTake = cmti.getCmIsTake();
- cmSendID = cmti.getCmSendID();
- cmTakeID = cmti.getCmTakeID();
- if(!cmIsTake){
- cmt.takeUpdate(cmID); //更新短信状态为已查阅。
- }
- bea = true;
- }
- }else{
- cmsi = (ClubMessageSendItem)cms.sendMessageInfo(cmID);
- if(cmsi!=null){
- cmTakeUser = cmsi.getCmTakeUser();
- cmSendUser = cmsi.getCmSendUser();
- cmTopic = cmsi.getCmTopic();
- cmContent = cmsi.getCmContent();
- cmAddTime = cmsi.getCmAddTime();
- cmIsSend = cmsi.getCmIsSend();
- cmSendID = cmsi.getCmSendID();
- cmTakeID = cmsi.getCmTakeID();
- bea = true;
- }
-
- }
- if(!bea){
- out.print(prtCenter("短消息不存在或已被删除","",2));
- out.close();
- if(true) return;
- }
- //=========短消息敏感字符过滤=============
- //cmTopic = csrs.srMsgTopic(cmTopic,"");
- //cmContent = csrs.srMsgContent(cmContent,"");
- if(act.equals("take")){
- if(!gvUserName.equals(cmTakeUser.trim())){
- out.print(prtCenter("请不要越权查阅他人短消息!!!","",2));
- out.close();
- if(true) return;
- }
- }else{
-
- if(!gvUserName.equals(cmSendUser)){
- out.print(prtCenter("请不要越权查阅他人短消息!","",2));
- out.close();
- if(true) return;
- }
- }
- %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title><%=clubTitle%> 短消息查看</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="./GVimgs/favicon.ico" rel="Bookmark">
- <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
- </head>
- <body><DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 30%; TEXT-ALIGN: center">
- <TABLE cellPadding=6 border=0>
- <TBODY><TR><TD align=middle>
- <IMG src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
- <BR>
- <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
- <IFRAME id=hiddenframe style="DISPLAY: none" src="about:blank" width=0 height=0></IFRAME>
- <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
- <script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js"></script>
- <SCRIPT language="javascript">gv_showWait('waitDiv', 1); </SCRIPT>
- <%@ include file="./GVinc/userMenu.jsp" %>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr class="tab1"><td>
- <%=com.gamvan.club.ClubHtmlConst.gamvan_menu("<a href="userBox.jsp?act="+act+"">我的工具箱</a>>>短消息查看")%>
- </td></tr></table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
- <tr class="tr">
- <td width="128">
- <%if(act.equals("take")){%>
- <club:users type="userName" idIs="<%=cmSendID%>" value="<%=cmSendUser%>"/>
- <%}else{%>
- <club:users type="userName" idIs="<%=cmTakeID%>" value="<%=cmTakeUser%>"/>
- <%}%>
- </td>
- <td>
- <strong>
- <club:message type="topic" value="<%=cmTopic%>"/>
- </strong>
- </td>
- </tr>
- <tr class="tab2"><td valign="top">
- <club:message type="datetime" value="<%=cmAddTime%>"/>
- <br>
- <%if(act.equals("take")){%>
- <club:message type="htmlReImg" idIs="<%=cmID%>" linkId="<%=reID%>" />
- <%}%>
- </td>
- <td>
- <club:message type="content" value="<%=cmContent%>" />
- </td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
- <tr class="tab1"><td>
- <strong> 聊天记录>></strong>
- </td></tr>
- </table>
- <%
- if(reID > 0 ){
- %>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
- <%
- cmt.setCmReID(reID);
- int totalPage = cmt.takeCount();
- ///out.print(totalPage);
- %>
- <c:forEach var="mt" items="<%=cmt.takeReList(iPage,25)%>">
- <tr class="tr">
- <td width="128">
- <club:users type="userName" idIs="${mt.cmSendID}" value="${mt.cmSendUser}"/>
- </td>
- <td>
- <strong>
- <club:message type="topic" idIs="${mt.cmID}" linkId="${mt.cmReID}" value="${mt.cmTopic}" property="<%=act%>"/>
- <strong>
- </td>
- </tr>
- <tr class="tab2"><td valign="top">
- <club:message type="datetime" value="${mt.cmAddTime}"/>
- </td><td>
- <club:message type="content" value="${mt.cmContent}" />
- </td>
- </tr>
- </c:forEach>
- </table>
- <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <%=OutPrint.pageJump(totalPage,25, iPage, "userMessage.jsp?cmID="+cmID+"&cmReID="+reID+"&act="+act+"&")%>
- </td>
- </tr>
- </table>
- <%}%>
- <%=Gfoot()%>
- </body>
- </html>