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

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

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="GVinc/gvImport.jsp" %><jsp:useBean id="cmf" scope="page" class="com.gamvan.club.user.ClubMyFriends"/>
  3. <%
  4. if(gvUserID<=0){
  5. out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
  6. out.close();
  7. }
  8. if(request.getMethod().equals("POST")){
  9. cmf.setUserIp(request.getRemoteAddr());
  10. cmf.setUserMeID(gvUserID);
  11. cmf.setUserMe(gvUserName);
  12. cmf.setPostMsg(request.getParameter("postMsg"));
  13. cmf.setUserMessage(request.getParameter("userMessage"));
  14. cmf.friendsInsert(request.getParameter("userNames"));
  15. out.print(prtCenter(cmf.getMessage(),"myFriends.jsp",1));
  16. out.close();
  17. if(true)return;
  18. }
  19. int userID = ParamUtils.getIntParameter(request,"userID");
  20. String userName = ParamUtils.getStringParameter(request,"userName");
  21. /*
  22.  * 整合至apache 发现如果不进行一次转码无法正确查询中文
  23.  * 可能和apache默认编码有关,但是我在httpd.conf关闭了apache的默认编码依然不行
  24.  * 所以只好手工作一次ISO8859-1到UTF8的编码了
  25.  * 如果是直接用TOMCAT运行此程序则需要注销下面这句 keys=com.gamvan.tools.Gb.toUTF8(keys);
  26.  */
  27. userName=com.gamvan.tools.Gb.toUTF8(userName);
  28. if(userName.equals("")){
  29. if(userID>0){
  30. cuc.setUserID(userID);
  31. cui = cuc.userInfo();
  32. userName = cui.getUserName();
  33. }
  34. }
  35. %>
  36. <html xmlns="http://www.w3.org/1999/xhtml">
  37. <head>
  38. <title><%=clubTitle%>__添加好友</title>
  39. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  40. <link href="./GVimgs/favicon.ico" rel="Bookmark"> 
  41. <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  42. <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  43. <STYLE type=text/css media=screen>
  44. @import url(./GVinc/main.css);
  45. </STYLE>
  46. </head>
  47. <body><DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 30%; TEXT-ALIGN: center">
  48. <TABLE cellPadding=6 border=0>
  49. <TBODY><TR><TD align=middle>
  50. <IMG  src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
  51. <BR>
  52. <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
  53. <IFRAME id=hiddenframe style="DISPLAY: none" src="about:blank" width=0  height=0></IFRAME>
  54. <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
  55. <script language="javascript" type="text/javascript" src="GVscript/GVshowMenu.js"></script>
  56. <script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js"></script>
  57. <SCRIPT language="javascript">gv_showWait('waitDiv', 1); </SCRIPT>
  58. <script language="javascript" type="text/javascript">
  59. prtie2('<%=clubTitle%>__好朋友');
  60. </script>
  61. <script language="JavaScript">
  62. <!--
  63. var div=0;
  64. function showInfo(){
  65. if(div==0){
  66. document.getElementById("div1").style.display = "";
  67. div = 1;
  68. }else{
  69. document.getElementById("div1").style.display = "none";
  70. div=0;
  71. }
  72. }
  73. -->
  74. </script>
  75. <%@ include file="./GVinc/userMenu.jsp" %>
  76. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
  77. <tr class="tab1"><td>
  78. <%=com.gamvan.club.ClubHtmlConst.gamvan_menu("<a href="userBox.jsp">我的工具箱</a>&gt;&gt;好朋友")%>
  79. &nbsp;&nbsp;
  80. [<a href="./myFriendAdd.jsp">添加好友</a>]&nbsp;&nbsp;[<a href="./myFriends.jsp">朋友列表</a>]
  81. </td></tr></table>
  82. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
  83. <form name="Gforms" id="Gforms" method="post" action="" onSubmit="javascript:postMsg();">
  84. <tr class="tab3">
  85.   <td width="160" height="10"><strong>朋友ID</strong></td>
  86.     <td><input name="userNames" type="text" id="userNames" value="<%=userName%>" size="50" />
  87.       <br />
  88. 多个朋友请用半角逗号( , )隔开。 </td>
  89.     </tr>
  90. <tr class="tab3">
  91.   <td height="11"><strong>是否用通知朋友</strong></td>
  92. <td>
  93. <input name="postMsg" type="radio" value="0" checked="checked"  onclick="javascript:showInfo();"/>不用短消息通知
  94. &nbsp;&nbsp;
  95. <input name="postMsg" type="radio" value="1"  onclick="javascript:showInfo();"/>用社区短消息通知朋友
  96. <table align="center" id="div1" style="DISPLAY: none" cellpadding="1" cellspacing="1"  width="99%">
  97. <tr><td>
  98. <textarea name="userMessage" cols="80" rows="6">
  99. 我在 <%=now%> 把你加为了我的好友。
  100. 如果你也像我喜欢你一样的喜欢我,那就到个人工具箱把我也加为好友吧。
  101. </textarea>
  102. </td></tr>
  103. </table>
  104. </td>
  105. </tr>
  106.   <tr class="tab3">
  107.   <td height="22">&nbsp;</td>
  108.     <td>
  109. <input name="gvSubmit" type="submit" class="btn" id="gvSubmit" value="确定提交" />
  110. <input type="hidden" name="gvBack" value=""/>
  111. </td>
  112.     </tr>
  113. </form>
  114. </table>
  115. <%=Gfoot()%>
  116. </body>
  117. </html>