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.
 
 
 
 
 

93 lines
2.9 KiB

  1. <%@ language=vbscript codepage="65001" %>
  2. <!--#include file="conn.asp"-->
  3. <!--#include file="function.asp"-->
  4. <%
  5. Response.Charset = "UTF-8"
  6. op = trim(request("op"))
  7. 'm_url = "http://partner.zhizhuchuxing.com/json?user=tmall01&sign=7620D8B54A4218E2EE1FFABFB40867C5"
  8. 'm_url = "http://partner.zhizhuchuxing.com/json?user=shnswx01&sign=5AE42D0AD35EEEF45B79C7A533CC509D"
  9. 'm_url = "http://partner.zizaitrip.net/json?user=shnswx01&sign=5AE42D0AD35EEEF45B79C7A533CC509D"
  10. m_url = "http://partner.zizaitrip.net/json?user=[luser]&sign=[lsign]"
  11. Private Function GetUrl()
  12. Dim ScriptAddress, M_ItemUrl, M_item
  13. ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME")) '取得当前地址
  14. M_ItemUrl = Request.QueryString
  15. cstr1 = trim(ScriptAddress & "?" & M_ItemUrl)
  16. if right(cstr1,1)="&" then cstr1=left(cstr1,len(cstr1)-1)
  17. cstr1 = replace(cstr1,"/core/partner.asp?",m_url & "&",1,-1,1)
  18. cstr1 = replace(cstr1,"%2D","-",1,-1,1)
  19. cstr1 = replace(cstr1,"%7C","|",1,-1,1)
  20. GetUrl = cstr1
  21. End Function
  22. strURL = GetUrl
  23. nnum1 = instr(strURL,"&projcode=")
  24. linksysuser = 0
  25. c_lsuser = "shnswx01"
  26. c_lssign = "5AE42D0AD35EEEF45B79C7A533CC509D"
  27. if nnum1-0>0 then
  28. cstr2 = mid(strURL,nnum1-0+10)
  29. nnum1 = instr(cstr2,"&")
  30. if nnum1-0>0 then cstr2 = left(cstr2,nnum1-1)
  31. csql = "select top 1 link_system_user from circuit where circuitcode='" & cstr2 & "'"
  32. set rs=conn.execute(csql)
  33. if not rs.eof then linksysuser = rs("link_system_user")
  34. rs.close
  35. else
  36. nnum1 = instr(strURL,"&tradeno=")
  37. cstr2 = mid(strURL,nnum1-0+9)
  38. nnum1 = instr(cstr2,"&")
  39. if nnum1-0>0 then cstr2 = left(cstr2,nnum1-1)
  40. csql = "select top 1 b.link_system_user from app_order_main a inner join circuit b on a.prod_code=b.circuitcode where a.main_id=" & cstr2
  41. set rs=conn.execute(csql)
  42. if not rs.eof then linksysuser = rs("link_system_user")
  43. rs.close
  44. end if
  45. if linksysuser-1=0 then
  46. c_lsuser = "nssale01"
  47. c_lssign = "796E85AC11598C9C32D9979C7B82042C"
  48. end if
  49. strURL = replace(strURL,"[luser]",c_lsuser)
  50. strURL = replace(strURL,"[lsign]",c_lssign)
  51. nnum1 = instr(strURL,"op=lock&")
  52. if nnum1 - 0 > 0 then
  53. c_openid = request.cookies("m_openid")
  54. c_memberid = "0"
  55. csql = "APP_GET_MEMBER_ID_ZIZAI '" & c_openid & "'"
  56. set rs=conn.execute(csql)
  57. if not rs.eof then c_memberid=rs("member_id")
  58. rs.close
  59. strURL = strURL & "&memid=" & c_memberid
  60. end if
  61. ' response.redirect strURL
  62. Set objXML = CreateObject("Microsoft.XMLHTTP")
  63. objXML.open "GET",strURL,false
  64. objXML.send
  65. c_rtn = objXML.responseText
  66. Set objXML = nothing
  67. if nnum1 - 0 > 0 then
  68. cstr1 = c_rtn
  69. nnum2 = instr(cstr1,"""code"":""0"",")
  70. if nnum2 > 0 then
  71. nnum3 = instr(cstr1,"""tradeno"":")
  72. if nnum3>0 then
  73. cstr1 = mid(cstr1,nnum3-0+11)
  74. nnum4 = instr(cstr1,",")
  75. cstr1 = left(cstr1,nnum4-2)
  76. csql = "SP_COPY_ORDER_DETAIL_ZIZAI " & cstr1
  77. 'response.write csql
  78. conn.execute csql
  79. end if
  80. end if
  81. end if
  82. response.write c_rtn
  83. %>