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.
 
 
 
 
 

40 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("openid")
  7. c_rtn = ""
  8. csql = "APP_MEMBER_LINKER_GET_LIST '" & c_openid & "'"
  9. ' response.write csql
  10. set rs=conn.execute(csql)
  11. if not rs.eof then
  12. nnum1 = rs("errcode")
  13. c_rtn = "{""code"":""" & nnum1 & ""","
  14. c_rtn = c_rtn & """info"":""" & rs("errinfo") & """"
  15. nnum2 = rs("linker_count")
  16. if nnum2 - 0 > 0 then
  17. c_rtn = c_rtn & ",""customer"":["
  18. c_rtn1 = ""
  19. do until rs.eof
  20. c_rtn1 = c_rtn1 & "{"
  21. c_rtn1 = c_rtn1 & """customer_id"":""" & rs("id") & ""","
  22. c_rtn1 = c_rtn1 & """customer_name"":""" & rs("customer_name") & ""","
  23. c_rtn1 = c_rtn1 & """customer_mobile"":""" & rs("customer_mobile") & ""","
  24. c_rtn1 = c_rtn1 & """customer_idtype"":""" & rs("customer_id_type") & ""","
  25. c_rtn1 = c_rtn1 & """customer_idno"":""" & rs("customer_id_no") & """},"
  26. rs.movenext
  27. loop
  28. if right(c_rtn1,1)="," then c_rtn1 = left(c_rtn1,len(c_rtn1)-1)
  29. c_rtn = c_rtn & c_rtn1
  30. c_rtn = c_rtn & " ]" & vbcrlf
  31. end if
  32. c_rtn = c_rtn & "}" & vbcrlf
  33. end if
  34. rs.close
  35. response.write c_rtn
  36. %>