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