userBox.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. <%
  7. if(gvUserID<=0){
  8. out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
  9. out.close();
  10. if(true)return;
  11. }
  12. String act="take";
  13. if(request.getParameter("act")!=null){
  14. act=request.getParameter("act");
  15. }
  16. String action="";
  17. if(request.getParameter("action")!=null){
  18. action=request.getParameter("action");
  19. }
  20. String userNames = "";
  21. int userID = TypeChange.stringToInt(request.getParameter("userID"));
  22. if(userID>0){
  23. cuc.setUserID(userID);
  24. cui = cuc.userInfo();
  25. if(cui!=null)
  26. userNames = cui.getUserName();
  27. }else{
  28. userNames = com.gamvan.net.URL.urlDecoder(request.getParameter("userName"),"UTF-8");
  29. userNames = com.gamvan.tools.Gb.toUTF8(userNames);
  30. }
  31. int reID = 0;
  32. if(request.getParameter("reID")!=null){
  33. reID = TypeChange.stringToInt(request.getParameter("reID")) ;
  34. }
  35. int rcmID = 0;
  36. if(request.getParameter("cmID")!=null){
  37. rcmID = TypeChange.stringToInt(request.getParameter("cmID")) ;
  38. }
  39. int iPage = TypeChange.stringToInt(request.getParameter("iPage"));
  40. if(iPage<1){iPage = 1;}
  41. int cmID, cmReID, cmIsTake, cmIsSend, cmOrder, cmSendID, cmTakeID;
  42. String cmTakeUser, cmSendUser, cmAddTime, cmTopic, cmContent, cmUserIp;
  43. String isNow1 = "";
  44. String isNow2 = "";
  45. if(act.equals("write")){
  46. if(request.getMethod().equals("POST")){
  47. if(session.getAttribute("gvPost")==null){
  48. session.setAttribute("gvPost",now);
  49. }else{
  50. isNow1 = FormatDateTime.dateAdd("s", -15);
  51. isNow2 = String.valueOf(session.getAttribute("gvPost")); //第一次提交时间
  52. if(FormatDateTime.secondCompare(isNow1, isNow2)){
  53. out.print(prtCenter("短消息发送过于频繁,请稍候再发!","",2));
  54. out.close();
  55. if(true)return;
  56. }else{
  57. session.setAttribute("gvPost",now);
  58. }
  59. }
  60. cms.setIsPost(TypeChange.stringToInt(request.getParameter("isPost")));
  61. //cms.setCmTakeUser(request.getParameter("utTakeUser").trim());
  62. cms.setCmSendUser(gvUserName);
  63. cms.setCmTopic(request.getParameter("utTopic").trim());
  64. cms.setCmContent(request.getParameter("utContent"));
  65. cms.setCmUserIp(request.getRemoteAddr());
  66. cms.setCmIsSend(true);
  67. cms.setCmOrder((short)0);
  68. cms.setCmReID(reID);
  69. cms.setCmSendID(gvUserID);
  70. cms.sendMessages(request.getParameter("utTakeUser").trim());
  71. out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
  72. out.close();
  73. if(true)return;
  74. }
  75. }
  76. else if(act.equals("send")||act.equals("save")){
  77. if(request.getMethod().equals("POST")){
  78. cms.sendDel(request.getParameterValues("cmID"));
  79. out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
  80. out.close();
  81. if(true)return;
  82. }
  83. if(action.equals("send")){ //执行发件箱草稿箱文件发送
  84. if(session.getAttribute("gvPost")==null){
  85. session.setAttribute("gvPost",now);
  86. }else{
  87. isNow1 = FormatDateTime.dateAdd("s", -15);
  88. isNow2 = String.valueOf(session.getAttribute("gvPost")); //第一次提交时间
  89. if(FormatDateTime.secondCompare(isNow1, isNow2)){
  90. out.print(prtCenter("短消息发送过于频繁,请稍候再发!","",2));
  91. out.close();
  92. if(true)return;
  93. }else{
  94. session.setAttribute("gvPost",now);
  95. }
  96. }
  97. boolean bea = false;
  98. cms.sendToTake(rcmID);
  99. out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
  100. out.close();
  101. if(true)return;
  102. }
  103. }
  104. else if(act.equals("take")){
  105. if(request.getMethod().equals("POST")){
  106. cmt.takeDel(request.getParameterValues("cmID"));
  107. out.print(prtCenter(cmt.getMessage(),"userBox.jsp?act="+act+"",1));
  108. out.close();
  109. if(true)return;
  110. }
  111. }
  112. %>
  113. <html xmlns="http://www.w3.org/1999/xhtml">
  114. <head>
  115. <title><%=clubTitle%></title>
  116. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  117. <link href="./GVimgs/favicon.ico" rel="Bookmark"> 
  118. <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  119. <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  120. <STYLE type=text/css media=screen>
  121. @import url(./GVinc/main.css);
  122. </STYLE>
  123. <style type="text/css">
  124. <!--
  125. .style1 {color: #FF0000}
  126. -->
  127. </style>
  128. </head>
  129. <body><DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 30%; TEXT-ALIGN: center">
  130. <TABLE cellPadding=6 border=0>
  131. <TBODY><TR><TD align=middle>
  132. <IMG  src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
  133. <BR>
  134. <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
  135. <IFRAME id=hiddenframe style="DISPLAY: none" src="about:blank" width=0  height=0></IFRAME>
  136. <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
  137. <script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js"></script>
  138. <SCRIPT language="javascript">gv_showWait('waitDiv', 1); </SCRIPT>
  139. <script language="javascript" type="text/javascript">
  140. prtie2('<%=clubTitle%>__我的工具箱');
  141. </script>
  142. <%@ include file="./GVinc/userMenu.jsp" %>
  143. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
  144. <tr class="tab2"><td>
  145. <%
  146. out.print(com.gamvan.club.ClubHtmlConst.gamvan_menu("<a href="userBox.jsp">我的工具箱</a>&gt;&gt;"));
  147. if(act.equals("save")){
  148. out.print("草稿箱");
  149. }else if(act.equals("take")){
  150. out.print("收件箱");
  151. }else if(act.equals("send")){
  152. out.print("发件箱");
  153. }else if(act.equals("write")){
  154. out.print("写短信");
  155. }
  156. %></td></tr></table>
  157. <%if(act.equals("write")){%>
  158. <%@ include file="./GVinc/userWrite.jsp" %>
  159. <%}else if(act.equals("send")){%>
  160. <%@ include file="./GVinc/userSend.jsp" %>
  161. <%}else if(act.equals("save")){%>
  162. <%@ include file="./GVinc/userSave.jsp" %>
  163. <%}else if(act.equals("take")){%>
  164. <%@ include file="./GVinc/userTake.jsp" %>
  165. <%}%>
  166. <%@ include file="./GVinc/gvOnlineArea.jsp" %>
  167. <%=Gfoot()%>
  168. </body>
  169. </html>