userBox.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"/>
- <%
- if(gvUserID<=0){
- out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
- out.close();
- if(true)return;
- }
- String act="take";
- if(request.getParameter("act")!=null){
- act=request.getParameter("act");
- }
- String action="";
- if(request.getParameter("action")!=null){
- action=request.getParameter("action");
- }
- String userNames = "";
- int userID = TypeChange.stringToInt(request.getParameter("userID"));
- if(userID>0){
- cuc.setUserID(userID);
- cui = cuc.userInfo();
- if(cui!=null)
- userNames = cui.getUserName();
- }else{
- userNames = com.gamvan.net.URL.urlDecoder(request.getParameter("userName"),"UTF-8");
- userNames = com.gamvan.tools.Gb.toUTF8(userNames);
- }
- int reID = 0;
- if(request.getParameter("reID")!=null){
- reID = TypeChange.stringToInt(request.getParameter("reID")) ;
- }
- int rcmID = 0;
- if(request.getParameter("cmID")!=null){
- rcmID = TypeChange.stringToInt(request.getParameter("cmID")) ;
- }
- int iPage = TypeChange.stringToInt(request.getParameter("iPage"));
- if(iPage<1){iPage = 1;}
- int cmID, cmReID, cmIsTake, cmIsSend, cmOrder, cmSendID, cmTakeID;
- String cmTakeUser, cmSendUser, cmAddTime, cmTopic, cmContent, cmUserIp;
- String isNow1 = "";
- String isNow2 = "";
- if(act.equals("write")){
- if(request.getMethod().equals("POST")){
- if(session.getAttribute("gvPost")==null){
- session.setAttribute("gvPost",now);
- }else{
- isNow1 = FormatDateTime.dateAdd("s", -15);
- isNow2 = String.valueOf(session.getAttribute("gvPost")); //第一次提交时间
- if(FormatDateTime.secondCompare(isNow1, isNow2)){
- out.print(prtCenter("短消息发送过于频繁,请稍候再发!","",2));
- out.close();
- if(true)return;
- }else{
- session.setAttribute("gvPost",now);
- }
-
- }
- cms.setIsPost(TypeChange.stringToInt(request.getParameter("isPost")));
- //cms.setCmTakeUser(request.getParameter("utTakeUser").trim());
- cms.setCmSendUser(gvUserName);
- cms.setCmTopic(request.getParameter("utTopic").trim());
- cms.setCmContent(request.getParameter("utContent"));
- cms.setCmUserIp(request.getRemoteAddr());
- cms.setCmIsSend(true);
- cms.setCmOrder((short)0);
- cms.setCmReID(reID);
- cms.setCmSendID(gvUserID);
- cms.sendMessages(request.getParameter("utTakeUser").trim());
- out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
- out.close();
- if(true)return;
- }
- }
- else if(act.equals("send")||act.equals("save")){
- if(request.getMethod().equals("POST")){
- cms.sendDel(request.getParameterValues("cmID"));
- out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
- out.close();
- if(true)return;
- }
- if(action.equals("send")){ //执行发件箱草稿箱文件发送
- if(session.getAttribute("gvPost")==null){
- session.setAttribute("gvPost",now);
- }else{
- isNow1 = FormatDateTime.dateAdd("s", -15);
- isNow2 = String.valueOf(session.getAttribute("gvPost")); //第一次提交时间
- if(FormatDateTime.secondCompare(isNow1, isNow2)){
- out.print(prtCenter("短消息发送过于频繁,请稍候再发!","",2));
- out.close();
- if(true)return;
- }else{
- session.setAttribute("gvPost",now);
- }
- }
- boolean bea = false;
- cms.sendToTake(rcmID);
- out.print(prtCenter(cms.getMessage(),"userBox.jsp?act="+act+"",1));
- out.close();
- if(true)return;
- }
-
- }
- else if(act.equals("take")){
- if(request.getMethod().equals("POST")){
- cmt.takeDel(request.getParameterValues("cmID"));
- out.print(prtCenter(cmt.getMessage(),"userBox.jsp?act="+act+"",1));
- 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" />
- <STYLE type=text/css media=screen>
- @import url(./GVinc/main.css);
- </STYLE>
- <style type="text/css">
- <!--
- .style1 {color: #FF0000}
- -->
- </style>
- </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>
- <script language="javascript" type="text/javascript">
- prtie2('<%=clubTitle%>__我的工具箱');
- </script>
- <%@ include file="./GVinc/userMenu.jsp" %>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr class="tab2"><td>
- <%
- out.print(com.gamvan.club.ClubHtmlConst.gamvan_menu("<a href="userBox.jsp">我的工具箱</a>>>"));
- if(act.equals("save")){
- out.print("草稿箱");
- }else if(act.equals("take")){
- out.print("收件箱");
- }else if(act.equals("send")){
- out.print("发件箱");
- }else if(act.equals("write")){
- out.print("写短信");
- }
- %></td></tr></table>
- <%if(act.equals("write")){%>
- <%@ include file="./GVinc/userWrite.jsp" %>
- <%}else if(act.equals("send")){%>
- <%@ include file="./GVinc/userSend.jsp" %>
- <%}else if(act.equals("save")){%>
- <%@ include file="./GVinc/userSave.jsp" %>
- <%}else if(act.equals("take")){%>
- <%@ include file="./GVinc/userTake.jsp" %>
- <%}%>
- <%@ include file="./GVinc/gvOnlineArea.jsp" %>
- <%=Gfoot()%>
- </body>
- </html>