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

数据库编程

开发平台:

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. User_GetParm
  14. If Request.Form("Action") = "Save" then
  15. Dim DelID,Str_Tmp,Str_Tmp1
  16. DelID = request.Form("CorpCardID")
  17. if DelID = "" then 
  18. strShowErr = "<li>你必须选择一项再删除</li>"
  19. Call ReturnError(strShowErr,"")
  20. End if
  21. User_Conn.execute("Delete From  FS_ME_CorpCard where CorpCardID in ("&DelID&")")
  22. strShowErr = "<li>删除名片成功</li>"
  23. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  24. Response.end
  25. End if
  26. if Request.QueryString("Action") = "Pass" then
  27. dim RsaddsObj,RsaddPassObj
  28. Set RsaddsObj = server.CreateObject(G_FS_RS)
  29. RsaddsObj.open "select CorpCardID,UserNumber,F_UserNumber From FS_ME_CorpCard where CorpCardID="&Clng(NoSqlHack(Request.QueryString("Id"))),User_Conn,1,3
  30. Set RsaddPassObj = server.CreateObject(G_FS_RS)
  31. RsaddPassObj.open "select * From FS_ME_CorpCard where 1=0",User_Conn,1,3
  32. RsaddPassObj.addnew
  33. RsaddPassObj("UserNumber") = Fs_User.UserNumber
  34. RsaddPassObj("F_UserNumber") = RsaddsObj("UserNumber")
  35. RsaddPassObj("Addtime") = now
  36. RsaddPassObj("islock") = 0
  37. RsaddPassObj("Content") = ""
  38. RsaddPassObj.update
  39. RsaddPassObj.close
  40. set RsaddPassObj  = nothing
  41. User_Conn.execute("Update  FS_ME_CorpCard set islock=0  where CorpCardID="&Clng(NoSqlHack(Request.QueryString("Id"))))
  42. RsaddsObj.close
  43. set RsaddsObj = nothing
  44. strShowErr = "<li>已经和对方交换名片</li>"
  45. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  46. Response.end
  47. End if
  48. %>
  49. <html xmlns="http://www.w3.org/1999/xhtml">
  50. <title>名片管理-网站内容管理系统</title>
  51. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  52. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  53. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  54. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  55. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  56. <head>
  57. <body>
  58. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  59.   <tr>
  60.     <td>
  61.       <!--#include file="top.asp" -->
  62.     </td>
  63.   </tr>
  64. </table>
  65. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  66.   
  67.     <tr class="back"> 
  68.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  69.     </tr>
  70.     <tr class="back"> 
  71.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  72.           <!--#include file="menu.asp" -->
  73.         </div></td>
  74.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  75.           <tr class="hback"> 
  76.             
  77.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  78.             <a href="main.asp">会员首页</a> &gt;&gt; 名片管理 </td>
  79.           </tr>
  80.         </table>
  81.         
  82.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  83.         <form name="form1" method="post" action="">
  84.           <tr class="hback"> 
  85.             <td colspan="4" class="hback"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  86.                 <tr> 
  87.                   <td width="44%"> 共搜索到<strong> 
  88.                     <%
  89. Dim RsCardObj,RsCardSQL
  90. Dim strpage,strSQLs
  91. strpage=request("page")
  92. if len(strpage)=0 Or strpage<1 or trim(strpage)=""  Then strpage="1"
  93. Set RsCardObj = Server.CreateObject(G_FS_RS)
  94. RsCardSQL = "Select CorpCardID,UserNumber,F_UserNumber,AddTime,Content,isLock From FS_ME_CorpCard  where F_UserNumber='"&Fs_User.UserNumber&"' "& strSQLs &" and islock = 1 Order by CorpCardID desc"
  95. RsCardObj.Open RsCardSQL,User_Conn,1,3
  96. Response.Write "<Font color=red>" & RsCardObj.RecordCount&"</font>"
  97. %>
  98.                     </strong> 个 名片</td>
  99.                   <td width="56%"><div align="center"><%if p_isPassCard = 1 Then Response.Write("<a href=Corp_Card_unpass.asp><b>查看欲和我交换名片的用户</b></a>")%></div></td>
  100.                 </tr>
  101.               </table></td>
  102.           </tr >
  103.           <tr class="hback"> 
  104.             <td class="xingmu">用户编号</td>
  105.             <td class="xingmu">添加时间</td>
  106.             <td class="xingmu"><div align="center">备注名片浏览</div></td>
  107.             <td class="xingmu"><div align="center">操作</div></td>
  108.           </tr>
  109.           <%
  110. Dim select_count,select_pagecount,i
  111. if RsCardObj.eof then
  112.    RsCardObj.close
  113.    set RsCardObj=nothing
  114.    Response.Write"<TR><TD colspan=""4""  class=""hback"">没有记录。</TD></TR>"
  115. else
  116. RsCardObj.pagesize = 15
  117. RsCardObj.absolutepage=cint(strpage)
  118. select_count=RsCardObj.recordcount
  119. select_pagecount=RsCardObj.pagecount
  120. for i=1 to RsCardObj.pagesize
  121. if RsCardObj.eof Then exit For 
  122. Dim Returvaluestr
  123. Returvaluestr = Fs_User.GetFriendName(RsCardObj("UserNumber"))
  124. if RsCardObj("F_UserNumber") = "0" then
  125.   exit For 
  126. Else
  127. Dim RsGetCardUObj
  128. Set RsGetCardUObj = Server.CreateObject(G_FS_RS)
  129. RsGetCardUObj.open "select  qq,msn,UserNumber From FS_ME_Users where UserNumber='"& RsCardObj("UserNumber") &"'",User_Conn,1,1
  130. if RsGetCardUObj.eof then exit For 
  131. Dim RsGetCardObj
  132. Set RsGetCardObj = Server.CreateObject(G_FS_RS)
  133. RsGetCardObj.open "select C_logo,C_Name,C_ConactName,C_Vocation,C_Tel,C_Fax,C_WebSite,C_Province,C_City,C_address,C_PostCode,UserNumber From FS_ME_CorpUser where UserNumber='"& RsCardObj("UserNumber") &"'",User_Conn,1,1
  134. if RsGetCardObj.eof then exit For 
  135. %>
  136.           <tr class="hback"> 
  137.             <td width="41%" class="hback">· 
  138.               <% = Returvaluestr%>
  139.               &nbsp;(
  140.               <% = RsGetCardObj("C_Name")%>
  141.               ) </td>
  142.             <td width="23%" class="hback"><div align="left"><a href="ShowUser.asp?UserNumber=<% = RsCardObj("F_UserNumber")%>"> 
  143.                 <% = RsCardObj("addtime")%>
  144.                 </a></div></td>
  145.             <td width="20%" class="hback"  id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(Cid<%=RsCardObj("CorpCardID")%>);"  language=javascript><div align="center">查看对方名片</div></td>
  146.             <td width="16%" class="hback"><div align="center"><a href="Corp_Card_Unpass.asp?id=<%=RsCardObj("CorpCardID")%>&Action=Pass"  onClick="{if(confirm('确认同他交换名片吗?')){this.document.inbox.submit();return true;}return false;}">同意交换</a>&nbsp;|&nbsp; 
  147.                 <input name="CorpCardID" type="checkbox" id="CorpCardID" value="<% = RsCardObj("CorpCardID")%>">
  148.               </div></td>
  149.           </tr>
  150.           <tr class="hback" style="display:none" id="Cid<%=RsCardObj("CorpCardID")%>"> 
  151.             <td height="46" colspan="4" class="hback"><table width="100%" border="0" cellspacing="1" cellpadding="5" class="table">
  152.                 <tr> 
  153.                   <td width="45%" class="hback_1">&nbsp;</td>
  154.                   <td width="55%" class="hback_1"> <table width="100%" border="0" cellspacing="1" cellpadding="2" class="table">
  155.                       <tr> 
  156.                         <td width="35%" rowspan="7" class="hback"> <div align="center"><a href="ShowUser.asp?UserNumber=<% = RsGetCardObj("UserNumber")%>" target="_blank"> 
  157.                             <%if Trim(RsGetCardObj("C_logo")) <>"" then%>
  158.                             <img src="<% = RsGetCardObj("C_logo")%>" alt="查看详细资料" border="0"></img> 
  159.                             <%Else%>
  160.                             <img src="images/nologo.gif" alt="查看详细资料" border="0"></img> 
  161.                             <%End if%>
  162.                             </a> </div></td>
  163.                         <td width="65%" class="hback"><span class="bigtitle"><b> 
  164.                           <% = RsGetCardObj("C_Name")%>
  165.                           </b></span></td>
  166.                       </tr>
  167.                       <tr> 
  168.                         <td class="hback"><strong> 
  169.                           <% = RsGetCardObj("C_ConactName")%>
  170.                           </strong>( <% = RsGetCardObj("C_Vocation")%>
  171.                           )</td>
  172.                       </tr>
  173.                       <tr> 
  174.                         <td class="hback"> 电话: 
  175.                           <% = RsGetCardObj("C_Tel")%> </td>
  176.                       </tr>
  177.                       <tr> 
  178.                         <td class="hback">传真 : 
  179.                           <% = RsGetCardObj("C_Fax")%> </td>
  180.                       </tr>
  181.                       <tr> 
  182.                         <td class="hback">主页: <a href="<% = RsGetCardObj("C_WebSite")%>"> 
  183.                           <% = RsGetCardObj("C_WebSite")%>
  184.                           </a> </td>
  185.                       </tr>
  186.                       <tr> 
  187.                         <td class="hback">地址: 
  188.                           <% = RsGetCardObj("C_Province")%> <% = RsGetCardObj("C_City")%> <% = RsGetCardObj("C_Address")%>
  189.                             <% = RsGetCardObj("C_PostCode")%> </td>
  190.                       </tr>
  191.                       <tr> 
  192.                         <td class="hback">QQ: 
  193.                           <% = RsGetCardUObj("QQ")%> </td>
  194.                       </tr>
  195.                       <tr> 
  196.                         <td width="35%" class="hback"> <div align="center"> 
  197.                             <%
  198. if  Len(Trim(RsGetCardUObj("QQ")))>4 then
  199. Dim sOICQ
  200.     sOICQ ="<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="& RsGetCardUObj("QQ") &"&Site=FoosunCMS&Menu=yes><img border=""0"" SRC=http://wpa.qq.com/pa?p=1:"& RsGetCardUObj("QQ") &":16 alt=""点击这里给"& RsGetCardUObj("QQ") &"发消息""></a>"
  201. Response.Write sOICQ
  202. Else
  203. Response.Write("没有QQ")
  204. End if
  205. %>
  206.                           </div></td>
  207.                         <td class="hback">msn: 
  208.                           <% = RsGetCardUObj("msn")%> </td>
  209.                       </tr>
  210.                     </table></td>
  211.                 </tr>
  212.               </table></td>
  213.           </tr>
  214.           <%
  215. End if
  216.   RsCardObj.MoveNext
  217.   Next
  218.   %>
  219.           <tr class="hback"> 
  220.             <td colspan="4" class="hback_1"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  221.                 <tr> 
  222.                   <td width="80%"> <span class="top_navi"> 
  223.                     <% 
  224. Response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>&nbsp;" & select_count &"</b>条记录,本页是第<b>"& strpage &"</b>页。"
  225. if int(strpage)>1 then
  226. Response.Write"&nbsp;<a href=?page=1>第一页</a>&nbsp;&nbsp;"
  227. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)-1)&">上一页</a>&nbsp;&nbsp;"
  228. End if
  229. If int(strpage)<select_pagecount then
  230. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)+1)&">下一页</a>&nbsp;"
  231. Response.Write"&nbsp;<a href=?page="& select_pagecount &">最后一页</a>&nbsp;&nbsp;"
  232. End if
  233. Response.Write"<br>"
  234. RsCardObj.close
  235. Set RsCardObj=nothing
  236. End if
  237. %>
  238.                     </SPAN></td>
  239.                 </tr>
  240.               </table></td>
  241.           </tr>
  242.           <tr class="hback"> 
  243.             <td colspan="4" class="hback"><div align="right"> 
  244.                 <input name="Action" type="hidden" id="Action" value="Save">
  245.                 <input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(this.form)">
  246.                 选中所有名片 
  247.                 <input type="submit" name="Submit" value="删除所选择的项目"  onClick="{if(confirm('确定清除您所选择的记录吗??')){this.document.form1.submit();return true;}return false;}">
  248.               </div></td>
  249.           </tr>
  250.         </form>
  251.       </table>
  252.        </td>
  253.     </tr>
  254.     <tr class="back"> 
  255.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  256.           <!--#include file="Copyright.asp" -->
  257.         </div></td>
  258.     </tr>
  259.  
  260. </table>
  261. </body>
  262. </html>
  263. <%
  264. set RsGetCardObj = nothing
  265. set RsGetCardUObj = nothing
  266. Set Fs_User = Nothing
  267. %>
  268. <script language="JavaScript" type="text/JavaScript">
  269. function CheckAll(form)  
  270.   {  
  271.   for (var i=0;i<form.elements.length;i++)  
  272.     {  
  273.     var e = form.elements[i];  
  274.     if (e.name != 'chkall')  
  275.        e.checked = form.chkall.checked;  
  276.     }  
  277.   }
  278. </script>
  279. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->