| 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 | <script type="text/javascript" src="scripts/common-0.0.1{{min}}.js"></script> |
| 14 | {{{customJSTags}}} |
| 15 | <title id="topTitle">{{{title1}}}</title> |
| 16 | <style> |
| 17 | body { |
| 18 | background-color: cadetblue; |
| 19 | background: linear-gradient(to bottom right, #369, #036); |
| 20 | height: 100%; |
| 21 | overflow: hidden; |
| 22 | } |
| 23 | |
| 24 | a:link { color: #c8c8c8; } |
| 25 | a:visited { color: #c8c8c8; } |
| 26 | a:hover { color: #c8c8c8; } |
| 27 | a:active { color: #c8c8c8; } |
| 28 | </style> |
| 29 | </head> |
| 30 | <body> |
| 31 | <img style="position:absolute;left:0;bottom:0;z-index:-1;height:60%;opacity:0.1" src="../../images/login/back.png" /> |
| 32 | <table id="centralTable" class="container" style="height:100%;z-index:1"> |
| 33 | <tr> |
| 34 | <td style="width:100%;text-align:center;color:#c8c8c8;font-size:larger"> |
| 35 | <h1 id="mainTitle"></h1> |
| 36 | <p id="mainMessage"></p> |
| 37 | </td> |
| 38 | </tr> |
| 39 | <tr style="height:20px"> |
| 40 | <td> |
| 41 | <div> |
| 42 | <div id="flink" style="margin-left:4px">{{{footer}}}</div> |
| 43 | <div id="flink" style="float:right;margin-right:4px">{{{rootCertLink}}} <a href=../../terms>Terms & Privacy</a></div> |
| 44 | </div> |
| 45 | </td> |
| 46 | </tr> |
| 47 | </table> |
| 48 | <script> |
| 49 | var random = '{{{randomlength}}}' // Random length string for BREACH mitigation |
| 50 | var titleid = parseInt('{{{titleid}}}'); |
| 51 | var msgid = parseInt('{{{msgid}}}'); |
| 52 | var domainurl = decodeURIComponent('{{{domainurl}}}'); |
| 53 | var arg1 = decodeURIComponent('{{{arg1}}}'); |
| 54 | var arg2 = decodeURIComponent('{{{arg2}}}'); |
| 55 | var urlargs = parseUriArgs(); |
| 56 | |
| 57 | var title = ''; |
| 58 | if (titleid == 1) { title = "Account Verification"; } |
| 59 | if (titleid == 2) { title = "Desktop Sharing"; } |
| 60 | if (titleid == 3) { title = "Server Under Maintenance"; } |
| 61 | if (titleid == 4) { title = "Terminal Sharing"; } |
| 62 | QH('topTitle', Q('topTitle').innerText + ' - ' + title); |
| 63 | QH('mainTitle', title); |
| 64 | |
| 65 | var msg = ''; |
| 66 | switch (msgid) { |
| 67 | case 1: { msg = "ERROR: Invalid domain."; break; } |
| 68 | case 2: { msg = format("ERROR: Invalid username \"{0}\".", arg1); break; } |
| 69 | case 3: { msg = format("ERROR: Invalid e-mail \"{0}\" for user \"{1}\".", arg1, arg2); break; } |
| 70 | case 4: { msg = format("E-mail \"{0}\" for user \"{1}\" already verified.", arg1, arg2); break; } |
| 71 | case 5: { msg = format("E-mail \"{0}\" already in use on a different account. Change the email address and try again.", arg1); break; } |
| 72 | case 6: { msg = format("Verified email {0} for user account {1}.", '<b style=color:white>' + arg1 + '</b>', '<b style=color:white>' + arg2 + '</b>'); break; } |
| 73 | case 7: { msg = format("E-mail \"{0}\" for user \"{1}\" not verified.", arg1, arg2); break; } |
| 74 | case 8: { |
| 75 | msg = '<div>' + format("Password for account {0} has been reset to:", '<b style=color:white>' + arg1 + '</b>') + '</div><div style=padding:14px;font-size:18px><b style=color:white>' + arg2 + '</b></div>'; |
| 76 | msg += "Login and go to the \"My Account\" tab to update your password."; |
| 77 | break; |
| 78 | } |
| 79 | case 9: { msg = "ERROR: Invalid account check."; break; } |
| 80 | case 10: { msg = "ERROR: Invalid account check, verification url is only valid for 30 minutes."; break; } |
| 81 | case 11: { msg = "Sharing link not valid yet."; break; } |
| 82 | case 12: { msg = "Sharing link is expired."; break; } |
| 83 | case 13: { |
| 84 | var loginUrl = '?loginscreen=1' + (urlargs.key ? '&key=' + urlargs.key : ''); |
| 85 | msg = "If you are an administrator, [login here].".replace('[', '<a href=' + loginUrl + '>').replace(']', '</a>'); |
| 86 | break; |
| 87 | } |
| 88 | case 14: { msg = '<a href=' + window.location.href + '&confirm=1>' + "Click here to reset your account password." + '</a>'; break; } |
| 89 | } |
| 90 | |
| 91 | // Add login page link |
| 92 | if ((msgid != 11) && (msgid != 12) && (msgid != 13) && (msgid != 14)) { msg += ' <a href="' + domainurl + (urlargs.key ? ('?key=' + urlargs.key) : '') + '">' + "Go to login page" + '</a>.' } |
| 93 | QH('mainMessage', msg); |
| 94 | |
| 95 | 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; }); }; |
| 96 | |
| 97 | // Parse URL arguments, only keep safe values |
| 98 | function parseUriArgs() { |
| 99 | var href = window.document.location.href; |
| 100 | if (href.endsWith('#')) { href = href.substring(0, href.length - 1); } |
| 101 | var name, r = {}, parsedUri = href.split(/[\?&|]/); |
| 102 | parsedUri.splice(0, 1); |
| 103 | for (var j in parsedUri) { |
| 104 | var arg = parsedUri[j], i = arg.indexOf('='); |
| 105 | name = arg.substring(0, i); |
| 106 | r[name] = arg.substring(i + 1); |
| 107 | if (!isSafeString(r[name])) { delete r[name]; } else { var x = parseInt(r[name]); if (x == r[name]) { r[name] = x; } } |
| 108 | } |
| 109 | return r; |
| 110 | } |
| 111 | </script> |
| 112 | </body> |
| 113 | </html> |