- <%@ page language="java" contentType="text/html;charset=UTF-8" %>
- <%@ include file="GVinc/gvImport.jsp" %><jsp:useBean id="cmf" scope="page" class="com.gamvan.club.user.ClubMyFriends"/>
- <%
- if(gvUserID<=0){
- out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
- out.close();
- }
- if(request.getMethod().equals("POST")){
- cmf.setUserIp(request.getRemoteAddr());
- cmf.setUserMeID(gvUserID);
- cmf.setUserMe(gvUserName);
- cmf.setPostMsg(request.getParameter("postMsg"));
- cmf.setUserMessage(request.getParameter("userMessage"));
- cmf.friendsInsert(request.getParameter("userNames"));
- out.print(prtCenter(cmf.getMessage(),"myFriends.jsp",1));
- out.close();
- if(true)return;
- }
- int userID = ParamUtils.getIntParameter(request,"userID");
- String userName = ParamUtils.getStringParameter(request,"userName");
- /*
- * 整合至apache 发现如果不进行一次转码无法正确查询中文
- * 可能和apache默认编码有关,但是我在httpd.conf关闭了apache的默认编码依然不行
- * 所以只好手工作一次ISO8859-1到UTF8的编码了
- * 如果是直接用TOMCAT运行此程序则需要注销下面这句 keys=com.gamvan.tools.Gb.toUTF8(keys);
- */
- userName=com.gamvan.tools.Gb.toUTF8(userName);
- if(userName.equals("")){
- if(userID>0){
- cuc.setUserID(userID);
- cui = cuc.userInfo();
- userName = cui.getUserName();
- }
- }
- %>
- <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>
- </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="GVscript/GVshowMenu.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>
- <script language="JavaScript">
- <!--
- var div=0;
- function showInfo(){
- if(div==0){
- document.getElementById("div1").style.display = "";
- div = 1;
- }else{
- document.getElementById("div1").style.display = "none";
- div=0;
- }
- }
- -->
- </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">我的工具箱</a>>>好朋友")%>
-
- [<a href="./myFriendAdd.jsp">添加好友</a>] [<a href="./myFriends.jsp">朋友列表</a>]
- </td></tr></table>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <form name="Gforms" id="Gforms" method="post" action="" onSubmit="javascript:postMsg();">
- <tr class="tab3">
- <td width="160" height="10"><strong>朋友ID</strong></td>
- <td><input name="userNames" type="text" id="userNames" value="<%=userName%>" size="50" />
- <br />
- 多个朋友请用半角逗号( , )隔开。 </td>
- </tr>
- <tr class="tab3">
- <td height="11"><strong>是否用通知朋友</strong></td>
- <td>
- <input name="postMsg" type="radio" value="0" checked="checked" onclick="javascript:showInfo();"/>不用短消息通知
-
- <input name="postMsg" type="radio" value="1" onclick="javascript:showInfo();"/>用社区短消息通知朋友
- <table align="center" id="div1" style="DISPLAY: none" cellpadding="1" cellspacing="1" width="99%">
- <tr><td>
- <textarea name="userMessage" cols="80" rows="6">
- 我在 <%=now%> 把你加为了我的好友。
- 如果你也像我喜欢你一样的喜欢我,那就到个人工具箱把我也加为好友吧。
- </textarea>
- </td></tr>
- </table>
- </td>
- </tr>
- <tr class="tab3">
- <td height="22"> </td>
- <td>
- <input name="gvSubmit" type="submit" class="btn" id="gvSubmit" value="确定提交" />
- <input type="hidden" name="gvBack" value=""/>
- </td>
- </tr>
- </form>
- </table>
- <%=Gfoot()%>
- </body>
- </html>