Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

72 рядки
2.4KB

  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. If IsNull(order("TokenUsedAt")) And order("TokenExpiresAt") >= Now() Then
  37. isValid = True
  38. OrdersRepository().MarkTokenUsed order("OrderID")
  39. End If
  40. End If
  41. End If
  42. If isValid Then
  43. csrfToken = HTMLSecurity().GetAntiCSRFToken("Order.Continue")
  44. ' Look up the municipality from the same jurisdiction list the number was
  45. ' already validated against at /request-order - "" means no match (cache empty
  46. ' or code not found), and the view falls back to a manually-entered field.
  47. municipalityName = GetJurisdictionName(order("JurisdictionNumber"))
  48. End If
  49. %>
  50. <!--#include file="../views/Order/continue.asp" -->
  51. <%
  52. End Sub
  53. End Class
  54. Dim OrderController_Class__Singleton
  55. Function OrderController()
  56. If IsEmpty(OrderController_Class__Singleton) Then
  57. Set OrderController_Class__Singleton = New OrderController_Class
  58. End If
  59. Set OrderController = OrderController_Class__Singleton
  60. End Function
  61. %>

Powered by TurnKey Linux.