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

数据库编程

开发平台:

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. Dim p_F_UserNumber
  9. User_GetParm
  10. p_F_UserNumber = NoSqlHack(Trim(Request.QueryString("UserNumber")))
  11. if Request.Form("Action") = "Save" then
  12. Dim str_f_UserNumber,str_Content
  13. str_f_UserNumber = NoSqlHack(Trim(Request.Form("UserNumber")))
  14. str_Content = NoHtmlHackInput(Request.Form("Content"))
  15. if str_f_UserNumber ="" then
  16. strShowErr = "<li>错误的会员编号</li>"
  17. Call ReturnError(strShowErr,"")
  18. End if
  19. if len(str_Content) >200 then
  20. strShowErr = "<li>备注不能大于200个字符</li>"
  21. Call ReturnError(strShowErr,"")
  22. End if
  23. Dim RsaddObj,RsaddTFObj
  24. Set RsaddTFObj = server.CreateObject(G_FS_RS)
  25. RsaddTFObj.open "select F_UserNumber From FS_ME_CorpCard where F_UserNumber='"& str_f_UserNumber &"'",User_Conn,1,1
  26. if Not RsaddTFObj.eof then
  27. strShowErr = "<li>此名片已经收藏</li><li>您已经提出了名片收藏请求,对方还没和您交换</li>"
  28. Call ReturnError(strShowErr,"")
  29. End if
  30. Set RsaddObj = server.CreateObject(G_FS_RS)
  31. RsaddObj.open "select * From FS_ME_CorpCard where 1=0",User_Conn,1,3
  32. RsaddObj.addnew
  33. RsaddObj("UserNumber") = Fs_User.UserNumber
  34. RsaddObj("F_UserNumber") = str_f_UserNumber
  35. RsaddObj("Content") = str_Content
  36. RsaddObj("AddTime") = now
  37. if p_isPassCard = 0 then
  38. RsaddObj("isLock") = 0
  39. Else
  40. RsaddObj("isLock") = 1
  41. End if
  42. RsaddObj.update
  43. RsaddObj.close
  44. set RsaddObj = nothing
  45. if p_isPassCard = 0 then
  46. strShowErr = "<li>名片收藏成功</li>"
  47. Else
  48. strShowErr = "<li>您已经向对方提出交换名片的请求,等待通过</li>"
  49. End if
  50. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  51. Response.end
  52. Else
  53. if p_F_UserNumber = "" then
  54. strShowErr = "<li>错误的参数</li>"
  55. Call ReturnError(strShowErr,"")
  56. Else
  57. Dim RsCorpCardObj,RsCorpUserObj
  58. Set RsCorpUserObj = server.CreateObject(G_FS_RS)
  59. RsCorpUserObj.open "select islock,UserNumber From FS_ME_Users where UserNumber='"& p_F_UserNumber&"' and islock=0",User_Conn,1,1
  60. if RsCorpUserObj.eof then
  61. strShowErr = "<li>找不到用户信息</li>"
  62. Call ReturnError(strShowErr,"")
  63. End if
  64. Set RsCorpCardObj = server.CreateObject(G_FS_RS)
  65. RsCorpCardObj.open "select  C_Name,UserNumber From FS_ME_CorpUser where UserNumber='"& p_F_UserNumber&"'",User_Conn,1,1
  66. iF RsCorpCardObj.eof then
  67. strShowErr = "<li>找不到企业信息</li>"
  68. Call ReturnError(strShowErr,"")
  69. End if
  70. Dim str_C_Name
  71. str_C_Name = RsCorpCardObj("C_Name")
  72. %>
  73. <html xmlns="http://www.w3.org/1999/xhtml">
  74. <title>添加名片-网站内容管理系统</title>
  75. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  76. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  77. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  78. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  79. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  80. <head>
  81. <body>
  82. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  83.   <tr>
  84.     <td>
  85.       <!--#include file="top.asp" -->
  86.     </td>
  87.   </tr>
  88. </table>
  89. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  90.   
  91.     <tr class="back"> 
  92.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  93.     </tr>
  94.     <tr class="back"> 
  95.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  96.           <!--#include file="menu.asp" -->
  97.         </div></td>
  98.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  99.           <tr class="hback"> 
  100.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  101.             <a href="main.asp">会员首页</a> &gt;&gt; 添加名片</td>
  102.           </tr>
  103.         </table>
  104.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  105.         <form name="UserForm" method="post" action="" onSubmit="return CheckForm();">
  106.           <tr class="hback"> 
  107.             <td width="12%" class="hback_1"><div align="center" class="tx">用户名</div></td>
  108.             <td width="40%" class="hback"><div align="left"> 
  109.                 <input name="UserNumber" type="text" id="UserNumber" value="<% = p_F_UserNumber%>" size="30" ReadOnly>
  110.               </div></td>
  111.             <td width="48%" class="hback"><div align="left"> </div></td>
  112.           </tr><tr class="hback"> 
  113.             <td width="12%" class="hback_1"><div align="center" class="tx">公司名称</div></td>
  114.             <td width="40%" class="hback"><div align="left"> 
  115.                 <input name="UserNumber_c" type="text" id="UserNumber" value="<% = str_C_Name%>" size="40" ReadOnly>
  116.               </div></td>
  117.             <td width="48%" class="hback"><div align="left"> </div></td>
  118.           </tr>
  119.           <tr class="hback"> 
  120.             <td colspan="3" class="xingmu"><div align="left">备注部分</div></td>
  121.           </tr>
  122.           <tr class="hback"> 
  123.             <td class="hback_1"><div align="center">备注</div></td>
  124.             <td class="hback"> <textarea name="Content" cols="40" rows="5" id="Content"><% = str_C_Name%></textarea></td>
  125.             <td class="hback">名片的备注,最大200字符</td>
  126.           </tr>
  127.           <tr class="hback"> 
  128.             <td class="hback_1">&nbsp;</td>
  129.             <td colspan="2" class="hback"> <input type="submit" name="Submit" value="确定收藏名片"> 
  130.               <input name="Action" type="hidden" id="Action" value="Save">
  131.             </td>
  132.           </tr>
  133.         </form>
  134.       </table>
  135.        </td>
  136.     </tr>
  137.     <tr class="back"> 
  138.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  139.           <!--#include file="Copyright.asp" -->
  140.         </div></td>
  141.     </tr>
  142.  
  143. </table>
  144. </body>
  145. </html>
  146. <%
  147. RsCorpUserObj.close
  148. set RsCorpUserObj = nothing
  149. RsCorpCardObj.close
  150. set RsCorpCardObj = nothing
  151. End if
  152. End if
  153. Set Fs_User = Nothing
  154. %>
  155. <script language="JavaScript" type="text/javascript">
  156. function CheckForm()
  157. {
  158. if(document.UserForm.UserName.value=="")
  159. {
  160. alert("请填写用户名!");
  161. document.UserForm.UserName.focus();
  162. return false;
  163. }
  164. if(document.UserForm.RealName.value=="")
  165. {
  166. alert("请填写备注姓名!");
  167. document.UserForm.RealName.focus();
  168. return false;
  169. }
  170. }
  171. </script>
  172. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->