您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

78 行
2.7KB

  1. <%
  2. Class OrderController_Class
  3. Private m_useLayout
  4. Private m_title
  5. Private Sub Class_Initialize()
  6. m_useLayout = True
  7. m_title = "Your Order"
  8. End Sub
  9. Public Property Get useLayout
  10. useLayout = m_useLayout
  11. End Property
  12. Public Property Let useLayout(v)
  13. m_useLayout = v
  14. End Property
  15. Public Property Get Title
  16. Title = m_title
  17. End Property
  18. Public Property Let Title(v)
  19. m_title = v
  20. End Property
  21. '-------------------------------------------------------------------------------------------------------------------
  22. ' GET: verify the token from the emailed link and continue the order.
  23. ' The order form itself is a placeholder for now - this only confirms the token is valid.
  24. '-------------------------------------------------------------------------------------------------------------------
  25. Public Sub Continue()
  26. Dim token, order, isValid, csrfToken, municipalityName, turnstileSiteKey
  27. token = Trim(Request.QueryString("token"))
  28. isValid = False
  29. csrfToken = ""
  30. municipalityName = ""
  31. turnstileSiteKey = GetAppSetting("TurnstileSiteKey")
  32. Set order = Nothing
  33. If Len(token) > 0 Then
  34. Set order = OrdersRepository().FindByToken(token)
  35. If Not (order Is Nothing) Then
  36. ' Only checks validity here - the token is marked used when the order is
  37. ' actually submitted (OrderApiController.SubmitOrderDetails), not on this GET.
  38. ' Marking it used here would burn a one-time link the moment it's merely
  39. ' opened/previewed (e.g. by mail security link-scanners), before the
  40. ' customer ever sees the form.
  41. If IsNull(order("TokenUsedAt")) And order("TokenExpiresAt") >= Now() Then
  42. isValid = True
  43. End If
  44. End If
  45. End If
  46. If isValid Then
  47. csrfToken = HTMLSecurity().GetAntiCSRFToken("Order.Continue")
  48. ' Look up the municipality from the same jurisdiction list the number was
  49. ' already validated against at /request-order - "" means no match (cache empty
  50. ' or code not found), and the view falls back to a manually-entered field.
  51. municipalityName = GetJurisdictionName(order("JurisdictionNumber"))
  52. End If
  53. %>
  54. <!--#include file="../views/Order/continue.asp" -->
  55. <%
  56. End Sub
  57. End Class
  58. Dim OrderController_Class__Singleton
  59. Function OrderController()
  60. If IsEmpty(OrderController_Class__Singleton) Then
  61. Set OrderController_Class__Singleton = New OrderController_Class
  62. End If
  63. Set OrderController = OrderController_Class__Singleton
  64. End Function
  65. %>

Powered by TurnKey Linux.