download2.handlebars 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv=X-UA-Compatible content="IE=edge" />
  5. <meta content="text/html;charset=utf-8" http-equiv=Content-Type />
  6. <meta name=viewport content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" />
  7. <meta name=apple-mobile-web-app-capable content=yes />
  8. <meta name=format-detection content="telephone=no" />
  9. <meta name="robots" content="noindex,nofollow">
  10. <link type=text/css href="/styles/style.css" media="screen" rel="stylesheet" title="CSS" />
  11. {{{customCSSTags}}}
  12. <link rel="apple-touch-icon" href="/favicon-303x303.png" />
  13. {{{customJSTags}}}
  14. <title>{{{title1}}} - Download</title>
  15. <style>
  16. body {
  17. background-color: cadetblue;
  18. background: linear-gradient(to bottom right, #369, #036);
  19. height:100%;
  20. overflow:hidden;
  21. }
  22. a:link { color: #c8c8c8; }
  23. a:visited { color: #c8c8c8; }
  24. a:hover { color: #c8c8c8; }
  25. a:active { color: #c8c8c8; }
  26. </style>
  27. </head>
  28. <body>
  29. <img style="position:absolute;left:0;bottom:0;z-index:-1;height:60%;opacity:0.1" src="../../images/login/back.png" />
  30. <table id="centralTable" class="container" style="height:100%;z-index:1">
  31. <tr>
  32. <td style="width:100%;text-align:center">
  33. <div id="message" style="display:none;color:#c8c8c8;font-size:20px"></div>
  34. <table id="filetable" style="margin: 0 auto;color:#c8c8c8">
  35. <tr>
  36. <td>
  37. <a id=fileimagelink>
  38. <img id=fileimage src="../../images/login/file48.png" title="File" width="48" height="48" style="margin-left:3px;margin-right:3px;border-radius:3px;box-shadow:2px 2px 5px black;cursor:pointer;background-color:#FFF;margin-right:8px" />
  39. </a>
  40. </td>
  41. <td style="text-align:left">
  42. <div id="flink" style="font-size:22px">
  43. <a id="filelink"></a>
  44. </div>
  45. <div id="filesize" style="font-size:16px"></div>
  46. </td>
  47. </tr>
  48. </table>
  49. </td>
  50. </tr>
  51. <tr style="height:20px">
  52. <td>
  53. <div>
  54. <div id="flink" style="margin-left:4px">{{{footer}}}</div>
  55. <div id="flink" style="float:right;margin-right:4px">{{{rootCertLink}}}&nbsp;<a href=../../terms>Terms &amp; Privacy</a></div>
  56. </div>
  57. </td>
  58. </tr>
  59. </table>
  60. <script>
  61. var random = '{{{randomlength}}}' // Random length string for BREACH mitigation
  62. var messageid = parseInt('{{{messageid}}}');
  63. var fileurl = '{{{fileurl}}}';
  64. var filename = '{{{filename}}}';
  65. var filesize = parseInt('{{{filesize}}}');
  66. // Quick UI functions, a bit of a replacement for jQuery
  67. function Q(x) { return document.getElementById(x); } // "Q"
  68. function QS(x) { try { return Q(x).style; } catch (x) { } } // "Q" style
  69. function QE(x, y) { try { Q(x).disabled = !y; } catch (x) { } } // "Q" enable
  70. function QV(x, y) { try { QS(x).display = (y ? '' : 'none'); } catch (x) { } } // "Q" visible
  71. function QA(x, y) { Q(x).innerHTML += y; } // "Q" append
  72. function QH(x, y) { Q(x).innerHTML = y; } // "Q" html
  73. function QC(x) { try { return Q(x).classList; } catch (x) { } } // "Q" class
  74. function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
  75. function EscapeHtml(x) { if (typeof x == 'string') return x.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;'); if (typeof x == 'boolean') return x; if (typeof x == 'number') return x; }
  76. QV('filetable', messageid == 1);
  77. QV('message', messageid == 2);
  78. if (messageid == 1) {
  79. QH('filelink', EscapeHtml(filename));
  80. Q('filelink').href = fileurl;
  81. Q('fileimagelink').href = fileurl;
  82. if (filesize == 1) { QH('filesize', format("1 byte")); } else { QH('filesize', format("{0} bytes", filesize)); }
  83. } else if (messageid == 2) {
  84. QH('message', "Invalid file link");
  85. }
  86. </script>
  87. </body>
  88. </html>