searchResult.asp 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!--#include file="Conn.asp"-->
  2. <%Checklogin()%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>管理区域</title>
  8. <link rel="stylesheet" href="css/common.css" type="text/css" />
  9. <link rel="stylesheet" href="css/alert.css" type="text/css" />
  10. <script language="javascript" src="system/js/jquery-1.7.2.min.js"></script>
  11. <script type="text/javascript" src="js/js.js"></script>
  12. </head>
  13. <% keywordsNative=Request.Form("keywords")
  14. keywords=replace(Request.Form("keywords"),"+","")
  15. keywords=replace(keywords," ","")
  16. keywords=replace(keywords,"-","")
  17. keywords=replace(keywords,")","")
  18. keywords=replace(keywords,"(","")
  19. keywords=TextEnCode(keywords)
  20. If keywords="" or len(keywords)<4 Then
  21. Response.write "<script>alert('请至少输入4位数字或文字进行查找');window.location.href='/home.php';</script>"
  22. End If
  23. searchStr="Select cs_code,cs_name,cs_country,cs_tel,cs_email,cs_whatsapp,cs_wechat,cs_linkedin,cs_facebook,cs_addtime,cs_from,cs_belong,cs_deal,cs_alibaba from customer where (cs_telformat like '%"&keywords&"%' or cs_email like '%"&keywords&"%' or cs_whatsappformat like '%"&keywords&"%' or cs_wechat like '%"&keywords&"%' or cs_alibaba like '%"&keywords&"%' or cs_linkedin like '%"&keywords&"%' or cs_facebook like '%"&keywords&"%' or cs_email like '%"&keywordsNative&"%' or cs_wechat like '%"&keywordsNative&"%' or cs_alibaba like '%"&keywordsNative&"%' or cs_linkedin like '%"&keywordsNative&"%' or cs_facebook like '%"&keywordsNative&"%')"
  24. %>
  25. <body class="clear">
  26. <!--#include file="panel.asp"-->
  27. <div id="man_zone">
  28. <div class="searchForm resultSearch">
  29. <form method="post" action="searchResult.asp" accept-charset="UTF-8">
  30. <input class="keywords" name="keywords" id="keyword" placeholder="请输入电话/邮箱/微信/WhatsApp.." value="<%=keywordsNative%>" >
  31. <input class="searchSubmit" type="submit" value="客户检索">
  32. </form>
  33. </div>
  34. <table width="100%" class="resultForm">
  35. <tr class="tableHead">
  36. <td align="center" >序号</td>
  37. <td align="center">客户编号</td>
  38. <td align="center">联系人</td>
  39. <td align="center">国家</td>
  40. <td align="center">来源</td>
  41. <td align="center">跟进阶段</td>
  42. <td align="center">录入日期</td>
  43. <td align="center">所属业务员</td>
  44. </tr>
  45. <%
  46. Set Rs=Server.CreateObject("ADODB.RecordSet")
  47. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  48. Rs.Open searchStr,conn,1,3
  49. If Not Rs.bof and Not Rs.eof Then
  50. For i=1 to Rs.recordCount
  51. If Rs.bof or Rs.eof Then Exit For
  52. %>
  53. <tr>
  54. <td align="center" rowspan="2"><%=i%></td>
  55. <td align="center"><%=Rs("cs_code")%></td>
  56. <td align="center"><%=Rs("cs_name")%></td>
  57. <td align="center">
  58. <%Rs1.Open "Select countryName from country where id="&Rs("cs_country"),conn,1,1
  59. If Not Rs1.Bof and Not Rs1.Eof Then
  60. Response.write Rs1("countryName")
  61. Else
  62. Response.write "未选择"
  63. End If
  64. Rs1.close
  65. %>
  66. </td>
  67. <td align="center">
  68. <%Rs1.Open "Select ch_name from qudao where id="&Rs("cs_from"),conn,1,1
  69. If Not Rs1.Bof and Not Rs1.Eof Then
  70. Response.write Rs1("ch_name")
  71. Else
  72. Response.write "未选择"
  73. End If
  74. Rs1.close
  75. %>
  76. </td>
  77. <td align="center">
  78. <%If Rs("cs_deal")=3 Then Response.write "<span class=""highline"">成交</span>" Else Response.write "未成交"%>
  79. </td>
  80. <td align="center"><%=Rs("cs_addtime")%></td>
  81. <td align="center" rowspan="2">
  82. <%Rs1.Open "Select em_user from employee where id="&Rs("cs_belong"),conn,1,1
  83. If Not Rs1.Bof and Not Rs1.Eof Then
  84. Response.write Rs1("em_user")
  85. Else
  86. Response.write "系统出错"
  87. End If
  88. Rs1.close
  89. %>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td colspan="6" class="contacts">
  94. <div class="tel"><%=Rs("cs_tel")%></div>
  95. <div class="mail"><%=Rs("cs_email")%></div>
  96. <div class="whatsapp"><%=Rs("cs_whatsapp")%></div>
  97. <div class="wechat"><%=Rs("cs_wechat")%></div>
  98. <div class="linkedin"><%=Rs("cs_linkedin")%></div>
  99. <div class="facebook"><%=Rs("cs_facebook")%></div>
  100. <div class="alibaba"><%=Rs("cs_alibaba")%></div>
  101. </td>
  102. </tr>
  103. <%
  104. Rs.moveNext
  105. Next
  106. Else
  107. %>
  108. <tr>
  109. <td colspan="8" align="center">暂无相关记录,可录入该客户,<a href="/customerAdd.asp" class="highline">点击录入客户数据</a></td>
  110. </tr>
  111. <%
  112. End If
  113. Rs.close
  114. %>
  115. </table>
  116. </div>
  117. <%
  118. Set Rs=Nothing
  119. Conn.close
  120. Set Conn=Nothing
  121. %>
  122. </body>
  123. </html>