rawbt-receipt.html 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="ru">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>RawBT Integration Demo</title>
  6. <meta content="width=device-width, initial-scale=1" name="viewport">
  7. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  8. <style>
  9. html {
  10. background-color: grey;
  11. padding: 32px;
  12. }
  13. body {
  14. max-width: 640px;
  15. margin: 0 auto;
  16. padding: 32px;
  17. background-color: white;
  18. }
  19. button {
  20. background-color: #6e89ff;
  21. color: white;
  22. padding: 16px;
  23. border: none;
  24. }
  25. pre {
  26. background-color: #f0f0f0;
  27. border-left: #6e89ff solid 3px
  28. }
  29. p {
  30. text-align: right;
  31. }
  32. a {
  33. color: #6e89ff;
  34. text-decoration: none;
  35. }
  36. a:before{
  37. content: '\1F855';
  38. margin-right:4px;
  39. }
  40. </style>
  41. <script>
  42. // for php demo call
  43. function ajax_print(url, btn) {
  44. b = $(btn);
  45. b.attr('data-old', b.text());
  46. b.text('wait');
  47. $.get(url, function (data) {
  48. window.location.href = data; // main action
  49. }).fail(function () {
  50. alert("ajax error");
  51. }).always(function () {
  52. b.text(b.attr('data-old'));
  53. })
  54. }
  55. </script>
  56. </head>
  57. <body>
  58. <img src="resources/rawbtlogo.png" alt="black & white picture">
  59. <h1>RawBT Integration Demo</h1>
  60. <pre>
  61. window.location.href = ajax_backend_data;
  62. </pre>
  63. <br/>
  64. <button onclick="ajax_print('rawbt-receipt.php',this)">RECEIPT</button>
  65. <p><a href="https://rawbt.ru/">Visit RawBT site</a></p>
  66. </body>
  67. </html>