userMessage.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:6k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8"
  2.  session="true" errorPage="err.jsp" %>
  3. <%@ include file="./GVinc/gvImport.jsp" %>
  4. <jsp:useBean id="cmt" scope="page" class="com.gamvan.club.message.ClubMessageTake"/>
  5. <jsp:useBean id="cms" scope="page" class="com.gamvan.club.message.ClubMessageSend"/>
  6. <jsp:useBean id="csrs" scope="page" class="com.gamvan.club.ClubStringReplaces"/>
  7. <%
  8. String act="take";
  9. if(request.getParameter("act")!=null){
  10. act=request.getParameter("act");
  11. }
  12. if(gvUserName==null || gvUserName.equals("")){
  13. out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
  14. out.close();
  15. if(true) return;
  16. }
  17. int reID = 0;
  18. if(request.getParameter("cmReID")!=null){
  19. reID = TypeChange.stringToInt(request.getParameter("cmReID")) ;
  20. }
  21. int iPage = 1;
  22. if(request.getParameter("iPage")!=null){
  23. iPage = TypeChange.stringToInt(request.getParameter("iPage"));
  24. }
  25. int cmReID;
  26. int cmID = 0;
  27. if(request.getParameter("cmID")!=null){
  28. cmID = TypeChange.stringToInt(request.getParameter("cmID"));
  29. }
  30. String cmTakeUser=""
  31. , cmSendUser=""
  32. , cmAddTime=""
  33. , cmTopic=""
  34. , cmContent="";
  35. boolean cmIsTake = false, cmIsSend = false;
  36. int cmSendID = 0, cmTakeID = 0;
  37. boolean  bea = false;
  38. ClubMessageSendItem cmsi = null;
  39. ClubMessageTakeItem cmti = null;
  40. if(act.equals("take")){
  41. cmti = (ClubMessageTakeItem)cmt.takeMessageInfo(cmID);
  42. if(cmti!=null){
  43. cmTakeUser = cmti.getCmTakeUser();
  44. cmSendUser = cmti.getCmSendUser();
  45. cmTopic = cmti.getCmTopic();
  46. cmContent = cmti.getCmContent();
  47. cmAddTime = cmti.getCmAddTime();
  48. cmIsTake = cmti.getCmIsTake();
  49. cmSendID = cmti.getCmSendID();
  50. cmTakeID = cmti.getCmTakeID();
  51. if(!cmIsTake){
  52. cmt.takeUpdate(cmID); //更新短信状态为已查阅。
  53. }
  54. bea = true;
  55. }
  56. }else{
  57. cmsi = (ClubMessageSendItem)cms.sendMessageInfo(cmID);
  58. if(cmsi!=null){
  59. cmTakeUser = cmsi.getCmTakeUser();
  60. cmSendUser = cmsi.getCmSendUser();
  61. cmTopic = cmsi.getCmTopic();
  62. cmContent = cmsi.getCmContent();
  63. cmAddTime = cmsi.getCmAddTime();
  64. cmIsSend = cmsi.getCmIsSend();
  65. cmSendID = cmsi.getCmSendID();
  66. cmTakeID = cmsi.getCmTakeID();
  67. bea = true;
  68. }
  69. }
  70. if(!bea){
  71. out.print(prtCenter("短消息不存在或已被删除","",2));
  72. out.close();
  73. if(true) return;
  74. }
  75. //=========短消息敏感字符过滤=============
  76. //cmTopic = csrs.srMsgTopic(cmTopic,"");
  77. //cmContent = csrs.srMsgContent(cmContent,"");
  78. if(act.equals("take")){
  79. if(!gvUserName.equals(cmTakeUser.trim())){
  80. out.print(prtCenter("请不要越权查阅他人短消息!!!","",2));
  81. out.close();
  82. if(true) return;
  83. }
  84. }else{
  85. if(!gvUserName.equals(cmSendUser)){
  86. out.print(prtCenter("请不要越权查阅他人短消息!","",2));
  87. out.close();
  88. if(true) return;
  89. }
  90. }
  91. %>
  92. <html xmlns="http://www.w3.org/1999/xhtml">
  93. <head>
  94. <title><%=clubTitle%>  短消息查看</title>
  95. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  96. <link href="./GVimgs/favicon.ico" rel="Bookmark"> 
  97. <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  98. <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  99. <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
  100. </head>
  101. <body><DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 30%; TEXT-ALIGN: center">
  102. <TABLE cellPadding=6 border=0>
  103. <TBODY><TR><TD align=middle>
  104. <IMG  src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
  105. <BR>
  106. <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
  107. <IFRAME id=hiddenframe style="DISPLAY: none" src="about:blank" width=0  height=0></IFRAME>
  108. <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
  109. <script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js"></script>
  110. <SCRIPT language="javascript">gv_showWait('waitDiv', 1); </SCRIPT>
  111. <%@ include file="./GVinc/userMenu.jsp" %>
  112. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
  113. <tr class="tab1"><td>
  114. <%=com.gamvan.club.ClubHtmlConst.gamvan_menu("<a href="userBox.jsp?act="+act+"">我的工具箱</a>&gt;&gt;短消息查看")%>
  115. </td></tr></table>
  116. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
  117. <tr class="tr">
  118. <td width="128">
  119. <%if(act.equals("take")){%>
  120. <club:users type="userName" idIs="<%=cmSendID%>" value="<%=cmSendUser%>"/>
  121. <%}else{%>
  122. <club:users type="userName" idIs="<%=cmTakeID%>" value="<%=cmTakeUser%>"/>
  123. <%}%>
  124. </td>
  125. <td>
  126. <strong>
  127. <club:message type="topic"  value="<%=cmTopic%>"/>
  128. </strong>
  129. </td>
  130. </tr>
  131. <tr class="tab2"><td valign="top">
  132. <club:message type="datetime"  value="<%=cmAddTime%>"/>
  133. <br>
  134. <%if(act.equals("take")){%>
  135. <club:message type="htmlReImg" idIs="<%=cmID%>" linkId="<%=reID%>" />
  136. <%}%>
  137. </td>
  138. <td>
  139. <club:message type="content" value="<%=cmContent%>" />
  140. </td>
  141. </tr>
  142. </table>
  143. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
  144. <tr class="tab1"><td>
  145. <strong> 聊天记录&gt;&gt;</strong>
  146. </td></tr>
  147. </table>
  148. <% 
  149. if(reID > 0 ){
  150. %>
  151. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
  152. <%
  153. cmt.setCmReID(reID);
  154. int totalPage = cmt.takeCount();
  155. ///out.print(totalPage);
  156. %>
  157. <c:forEach var="mt" items="<%=cmt.takeReList(iPage,25)%>">
  158. <tr class="tr">
  159. <td width="128">
  160. <club:users type="userName" idIs="${mt.cmSendID}" value="${mt.cmSendUser}"/>
  161. </td>
  162. <td>
  163. <strong>
  164. <club:message type="topic" idIs="${mt.cmID}" linkId="${mt.cmReID}" value="${mt.cmTopic}" property="<%=act%>"/>
  165. <strong>
  166. </td>
  167. </tr>
  168. <tr class="tab2"><td valign="top">
  169. <club:message type="datetime"  value="${mt.cmAddTime}"/>
  170. </td><td>
  171. <club:message type="content" value="${mt.cmContent}" />
  172. </td>
  173. </tr>
  174. </c:forEach>
  175. </table>
  176. <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  177.   <tr>
  178.     <td>
  179. <%=OutPrint.pageJump(totalPage,25, iPage, "userMessage.jsp?cmID="+cmID+"&cmReID="+reID+"&act="+act+"&")%>
  180. </td>
  181.   </tr>
  182. </table>
  183. <%}%>
  184. <%=Gfoot()%>
  185. </body>
  186. </html>