Friend.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:10k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <%
  8. Response.Buffer = True
  9. Response.Expires = -1
  10. Response.ExpiresAbsolute = Now() - 1
  11. Response.Expires = 0
  12. Response.CacheControl = "no-cache"
  13. if Request("Action") = "del" then
  14. Dim strFriendID
  15. strFriendID = NoSqlHack(Request.QueryString("FriendID"))
  16. If strFriendID = ""  or isNumeric(strFriendID)=false then
  17. strShowErr = "<li>错误的参数</li>"
  18. Call ReturnError(strShowErr,"")
  19. Else
  20. User_Conn.execute("Delete From FS_ME_Friends where FriendID="&strFriendID)
  21. strShowErr = "<li>删除成功!</li>"
  22. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  23. Response.end
  24. End if
  25. End if
  26. %>
  27. <html xmlns="http://www.w3.org/1999/xhtml">
  28. <title>我的朋友-网站内容管理系统</title>
  29. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  30. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  31. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  32. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  33. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  34. <head>
  35. <body>
  36. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  37.   <tr>
  38.     <td>
  39.       <!--#include file="top.asp" -->
  40.     </td>
  41.   </tr>
  42. </table>
  43. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  44.   
  45.     <tr class="back"> 
  46.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  47.     </tr>
  48.     <tr class="back"> 
  49.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  50.           <!--#include file="menu.asp" -->
  51.         </div></td>
  52.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  53.           <tr class="hback"> 
  54.             
  55.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  56.             <a href="main.asp">会员首页</a> &gt;&gt;
  57. <%
  58. if Request("type") = 0 then
  59. Response.Write("我的好友")
  60. Elseif Request("type") = 1 then
  61. Response.Write("我的陌生人")
  62. Elseif Request("type") = 2 then
  63. Response.Write("我的黑名单")
  64. Else
  65. Response.Write("错误参数")
  66. End if
  67. %>
  68. </td>
  69.           </tr>
  70.         </table>
  71.         
  72.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  73.         <tr class="hback"> 
  74.           <td colspan="4" class="hback"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  75.               <tr> 
  76.                 <td width="44%"> 共搜索到<strong> 
  77.                   <%
  78. Dim RsUserFriendObj,RsUserFriendSQL
  79. Dim strpage,strSQLs
  80. strpage=request("page")
  81. if len(strpage)=0 Or strpage<1 or trim(strpage)=""  Then strpage="1"
  82. Set RsUserFriendObj = Server.CreateObject(G_FS_RS)
  83. If cint(Request("type"))=0 or  trim(Request("type"))="" then
  84.   strSQLs = " and FriendType=0 " 
  85. Elseif cint(Request("type"))=1 then
  86.   strSQLs = " and FriendType=1 " 
  87. Elseif cint(Request("type"))=2 then
  88.   strSQLs = " and FriendType=2 " 
  89. Else
  90.   strSQLs = " and FriendType=0 " 
  91. End if
  92. RsUserFriendSQL = "Select FriendID,UserNumber,FriendType,F_UserNumber,AddTime,Updatetime,RealName,Content,Email,Tel,Mobile,QQ,MSN From FS_ME_Friends  where UserNumber='"&Fs_User.UserNumber&"' "& strSQLs &" Order by FriendID desc"
  93. RsUserFriendObj.Open RsUserFriendSQL,User_Conn,1,3
  94. Response.Write "<Font color=red>" & RsUserFriendObj.RecordCount&"</font>"
  95. %>
  96.                   </strong> 个
  97.   <%
  98. if Request("type") = 0 then
  99. Response.Write("好友")
  100. Elseif Request("type") = 1 then
  101. Response.Write("陌生人")
  102. Elseif Request("type") = 2 then
  103. Response.Write("黑名单")
  104. Else
  105. Response.Write("错误参数")
  106. End if
  107. %></td>
  108.                 <form action="Friend.asp"  method="post" name="myform" id="myform">
  109.                   <td width="56%"><div align="center">
  110.   <%if request.QueryString("type") = 1 then%>
  111.   <a href="Friend_add.asp?type=1"><strong>添加陌生人</strong></a>
  112.   <%Elseif request.QueryString("type") = 2 then%>
  113.   <a href="Friend_add.asp?type=2"><strong>添加黑名单</strong></a>
  114.   <%Else%>
  115.   <a href="Friend_add.asp?type=2"><strong>添加好友</strong></a>
  116.   <%End if%></div></td>
  117.                 </form>
  118.               </tr>
  119.             </table></td>
  120.         </tr >
  121. <tr class="hback">
  122.           <td class="xingmu">用户编号</td>
  123.           <td class="xingmu"><strong>用户名</strong></td>
  124.           <td class="xingmu">操作</td>
  125.           <td class="xingmu"><div align="center">备注</div></td>
  126.         </tr>
  127. <%
  128. Dim select_count,select_pagecount,i
  129. if RsUserFriendObj.eof then
  130.    RsUserFriendObj.close
  131.    set RsUserFriendObj=nothing
  132.    Response.Write"<TR><TD colspan=""4""  class=""hback"">没有记录。</TD></TR>"
  133. else
  134. RsUserFriendObj.pagesize = 15
  135. RsUserFriendObj.absolutepage=cint(strpage)
  136. select_count=RsUserFriendObj.recordcount
  137. select_pagecount=RsUserFriendObj.pagecount
  138. for i=1 to RsUserFriendObj.pagesize
  139. if RsUserFriendObj.eof Then exit For 
  140. Dim Returvaluestr
  141. Returvaluestr = Fs_User.GetFriendName(RsUserFriendObj("F_UserNumber"))
  142. if RsUserFriendObj("F_UserNumber") = "0" then
  143.   exit For 
  144. Else
  145. %>
  146.         
  147.         <tr class="hback"> 
  148.           <td width="18%" class="hback"><a href="ShowUser.asp?UserNumber=<% = RsUserFriendObj("F_UserNumber")%>"> 
  149.             <% = RsUserFriendObj("F_UserNumber")%>
  150.             </a></td>
  151.           <td width="35%" class="hback"><div align="left"><a href="ShowUser.asp?UserNumber=<% = RsUserFriendObj("F_UserNumber")%>">
  152. <% = Returvaluestr%>
  153.               </a></div></td>
  154.           <td width="33%" class="hback"> <div align="left"> <a href="message_write.asp?ToUserNumber=<% = RsUserFriendObj("F_UserNumber")%>">发信</a>|<a href="book_write.asp?ToUserNumber=<% = RsUserFriendObj("F_UserNumber")%>&M_Type=0">留言</a>|<a href="Friend_add.asp?FriendID=<% = RsUserFriendObj("FriendID")%>">修改</a>|<a href="Friend.asp?Action=del&FriendID=<% = RsUserFriendObj("FriendID")%>"  onClick="{if(confirm('确定要删除所选定的项目吗?')){this.document.inbox.submit();return true;}return false;}">删除</a></div></td>
  155.           <td width="14%" class="hback"  id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(sid<%=RsUserFriendObj("FriendID")%>);"  language=javascript><div align="center">查看备注</div></td>
  156.         </tr>
  157.         <tr class="hback" style="display:none" id="sid<%=RsUserFriendObj("FriendID")%>"> 
  158.           <td height="46" colspan="4" class="hback"><table width="100%" border="0" cellspacing="1" cellpadding="5" class="table">
  159.               <tr> 
  160.                 <td width="23%" class="hback_1">姓名: <% = RsUserFriendObj("RealName")%></td>
  161.                 <td width="22%" class="hback_1">电话: <% = RsUserFriendObj("Tel")%> </td>
  162.                 <td width="23%" class="hback_1">手机: <% = RsUserFriendObj("Mobile")%> </td>
  163.                 <td width="32%" class="hback_1">Email: <a href="mailto:<% = RsUserFriendObj("Email")%>"><% = RsUserFriendObj("Email")%></a> </td>
  164.               </tr>
  165.               <tr> 
  166.                 <td class="hback_1">MSN: <% = RsUserFriendObj("MSN")%> </td>
  167.                 <td class="hback_1">QQ: <%
  168. if  Len(Trim(RsUserFriendObj("QQ")))>4 then
  169. Dim sOICQ
  170.     sOICQ ="<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="& RsUserFriendObj("QQ") &"&Site=FoosunCMS&Menu=yes><img border=""0"" SRC=http://wpa.qq.com/pa?p=1:"& RsUserFriendObj("QQ") &":16 alt=""点击这里给"& RsUserFriendObj("QQ") &"发消息""></a>"
  171. Response.Write sOICQ
  172. Else
  173. Response.Write("没有")
  174. End if
  175. %> </td>
  176.                 <td colspan="2" class="hback_1">说明: <% = RsUserFriendObj("Content")%> </td>
  177.               </tr>
  178.             </table></td>
  179.         </tr>
  180.         <%
  181. End if
  182.   RsUserFriendObj.MoveNext
  183.   Next
  184.   %>
  185.         <tr class="hback"> 
  186.           <td colspan="4" class="xingmu"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  187.               <tr> 
  188.                 <td width="80%"> <span class="top_navi"> 
  189.                   <%  Response.Write("每页:"& RsUserFriendObj.pagesize &"个,")
  190. Response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>&nbsp;" & select_count &"</b>条记录,本页是第<b>"& strpage &"</b>页。"
  191. if int(strpage)>1 then
  192. Response.Write"&nbsp;<a href=?page=1&type="&Request("type")&">第一页</a>&nbsp;&nbsp;"
  193. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)-1)&"&type="&Request("type")&">上一页</a>&nbsp;&nbsp;"
  194. End if
  195. If int(strpage)<select_pagecount then
  196. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)+1)&"&type="&Request("type")&">下一页</a>&nbsp;"
  197. Response.Write"&nbsp;<a href=?page="& select_pagecount &"&type="&Request("type")&">最后一页</a>&nbsp;&nbsp;"
  198. End if
  199. Response.Write"<br>"
  200. RsUserFriendObj.close
  201. Set RsUserFriendObj=nothing
  202. End if
  203. %>
  204.                   </SPAN></td>
  205.               </tr>
  206.             </table></td>
  207.         </tr>
  208.       </table> </td>
  209.     </tr>
  210.     <tr class="back"> 
  211.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  212.           <!--#include file="Copyright.asp" -->
  213.         </div></td>
  214.     </tr>
  215.  
  216. </table>
  217. </body>
  218. </html>
  219. <%
  220. Set Fs_User = Nothing
  221. %>
  222. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->