Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

88 строки
3.1KB

  1. <section style="padding: 32px 0;">
  2. <h1>Orders</h1>
  3. <form method="get" action="" class="row g-2 align-items-center" style="margin-bottom: 16px;">
  4. <div class="col-auto">
  5. <input type="text" name="q" value="<%= H(searchTerm) %>" class="form-control" placeholder="Search by email or jurisdiction #" />
  6. </div>
  7. <div class="col-auto">
  8. <button type="submit" class="button button-secondary">Search</button>
  9. </div>
  10. <% If Len(searchTerm) > 0 Then %>
  11. <div class="col-auto">
  12. <a href="?">Clear</a>
  13. </div>
  14. <% End If %>
  15. </form>
  16. <table class="table table-striped table-bordered">
  17. <thead>
  18. <tr>
  19. <th>Order ID</th>
  20. <th>Email</th>
  21. <th>Jurisdiction #</th>
  22. <th>Created</th>
  23. <th>Token Status</th>
  24. <th>Resend Link</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <% If orders.Count = 0 Then %>
  29. <tr><td colspan="6"><% If Len(searchTerm) > 0 Then %>No orders match your search.<% Else %>No orders found.<% End If %></td></tr>
  30. <% Else
  31. Dim orderKey, order, tokenStatus, continueUrl, mailtoBody, mailtoHref
  32. For Each orderKey In orders.Keys
  33. Set order = orders(orderKey)
  34. If Not IsNull(order("TokenUsedAt")) Then
  35. tokenStatus = "Used"
  36. ElseIf order("TokenExpiresAt") < Now() Then
  37. tokenStatus = "Expired"
  38. Else
  39. tokenStatus = "Active"
  40. End If
  41. continueUrl = "https://pe.kentcommunications.com/order/continue?token=" & MailtoEncode(order("Token"))
  42. mailtoBody = "Continue your order here: " & continueUrl
  43. mailtoHref = "mailto:" & order("Email") & _
  44. "?subject=" & MailtoEncode("Continue your Purple Envelope order") & _
  45. "&body=" & MailtoEncode(mailtoBody)
  46. %>
  47. <tr>
  48. <td><%= H(order("OrderID")) %></td>
  49. <td><%= H(order("Email")) %></td>
  50. <td><%= H(order("JurisdictionNumber")) %></td>
  51. <td><%= H(order("CreatedAt")) %></td>
  52. <td><%= H(tokenStatus) %></td>
  53. <td><a class="button button-secondary" href="<%= H(mailtoHref) %>">Email link</a></td>
  54. </tr>
  55. <%
  56. Next
  57. End If
  58. %>
  59. </tbody>
  60. </table>
  61. <% If pageCount > 1 Then
  62. Dim qsBase, pn
  63. qsBase = "?q=" & Server.URLEncode(searchTerm) & "&page="
  64. %>
  65. <nav aria-label="Orders pagination">
  66. <ul class="pagination">
  67. <li class="page-item<% If pageNum <= 1 Then %> disabled<% End If %>">
  68. <a class="page-link" href="<%= H(qsBase & (pageNum - 1)) %>">Previous</a>
  69. </li>
  70. <% For pn = 1 To pageCount %>
  71. <li class="page-item<% If pn = pageNum Then %> active<% End If %>">
  72. <a class="page-link" href="<%= H(qsBase & pn) %>"><%= pn %></a>
  73. </li>
  74. <% Next %>
  75. <li class="page-item<% If pageNum >= pageCount Then %> disabled<% End If %>">
  76. <a class="page-link" href="<%= H(qsBase & (pageNum + 1)) %>">Next</a>
  77. </li>
  78. </ul>
  79. </nav>
  80. <p><%= recordCount %> order<% If recordCount <> 1 Then %>s<% End If %> found.</p>
  81. <% End If %>
  82. </section>

Powered by TurnKey Linux.