You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.2 KiB

  1. <%@ language=vbscript codepage="65001" %>
  2. <!--#include file="conn.asp"-->
  3. <!--#include file="function.asp"-->
  4. <%
  5. Response.Charset = "UTF-8"
  6. c_openid = request.cookies("m_openid")
  7. 'if c_openid="" then c_openid="oCVcbv7KuCup-yFON07plMg4IQAU"
  8. c_rtn = ""
  9. csql = "APP_MEMBER_LINKER_GET_LIST '" & c_openid & "'"
  10. ' response.write csql
  11. set rs=conn.execute(csql)
  12. if not rs.eof then
  13. nnum1 = rs("errcode")
  14. c_rtn = "{""code"":""" & nnum1 & ""","
  15. c_rtn = c_rtn & """info"":""" & rs("errinfo") & """"
  16. nnum2 = rs("linker_count")
  17. if nnum2 - 0 > 0 then
  18. c_rtn = c_rtn & ",""customer"":["
  19. c_rtn1 = ""
  20. do until rs.eof
  21. c_rtn1 = c_rtn1 & "{"
  22. c_rtn1 = c_rtn1 & """customer_id"":""" & rs("id") & ""","
  23. c_rtn1 = c_rtn1 & """customer_name"":""" & rs("customer_name") & ""","
  24. c_rtn1 = c_rtn1 & """customer_mobile"":""" & rs("customer_mobile") & ""","
  25. c_rtn1 = c_rtn1 & """customer_idtype"":""" & rs("customer_id_type") & ""","
  26. c_rtn1 = c_rtn1 & """customer_idno"":""" & rs("customer_id_no") & """},"
  27. rs.movenext
  28. loop
  29. if right(c_rtn1,1)="," then c_rtn1 = left(c_rtn1,len(c_rtn1)-1)
  30. c_rtn = c_rtn & c_rtn1
  31. c_rtn = c_rtn & " ]" & vbcrlf
  32. end if
  33. c_rtn = c_rtn & "}" & vbcrlf
  34. end if
  35. rs.close
  36. response.write c_rtn
  37. %>