BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

login.php 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. declare(strict_types=1);
  3. View::show_header('Login');
  4. ?>
  5. <p class="center mouseless">
  6. A platform to share <strong>biological sequence</strong><br />
  7. and <strong>medical imaging</strong> data<?= ($Attempts > 0) ? '' : '<sup>1</sup>' ?>
  8. </p>
  9. <p id="no-cookies" class="hidden error">You appear to have cookies disabled.</p>
  10. <?php
  11. if (!$Banned) { ?>
  12. <form class="auth_form" name="login" id="loginform" method="post" action="login.php">
  13. <?php
  14. if (isset($Err)) { ?>
  15. <p class="error">
  16. <?= $Err ?>
  17. </p>
  18. <?php } ?>
  19. <?php
  20. if ($Attempts > 0) { ?>
  21. <aside class="notice">
  22. <p>
  23. You have
  24. <span class="info"><?= (6 - $Attempts) ?></span>
  25. attempts remaining.
  26. </p>
  27. <p>
  28. <strong>You'll be banned for 6 hours after your login attempts run out!</strong>
  29. </p>
  30. </aside>
  31. <?php } ?>
  32. <table>
  33. <tr>
  34. <td colspan="2">
  35. <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username"
  36. id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}"
  37. autofocus="autofocus" placeholder="Username" size="40" autocomplete="username" />
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>
  42. <input type="password" minlength="15" name="password" id="password" class="inputtext" required="required"
  43. maxlength="307200" pattern=".{15,307200}" placeholder="Password" autocomplete="current-password" />
  44. </td>
  45. <td>
  46. <input type="text" name="twofa" id="twofa" class="inputtext" maxlength="6" pattern="[0-9]{6}"
  47. inputmode="numeric" placeholder="2FA" size="6" title="Leave blank if you have not enabled 2FA"
  48. autocomplete="one-time-code" />
  49. </td>
  50. </tr>
  51. <tr>
  52. <td colspan="2">
  53. <input type="submit" name="login" value="Log In" class="submit" />
  54. </td>
  55. </tr>
  56. </table>
  57. </form>
  58. <?php
  59. } # if !$Banned
  60. else { ?>
  61. <p class="error">
  62. You are banned from logging in for a few hours.
  63. </p>
  64. <?php
  65. }
  66. if ($Attempts > 0) { ?>
  67. <p class="center">
  68. Forgot your password?
  69. <a href="login.php?act=recover" class="tooltip" title="Recover your password">Reset it here!</a>
  70. </p>
  71. <?php
  72. } else {
  73. echo $HTML = <<<HTML
  74. <p class="center mouseless">
  75. 1. …and graphs, scalars, vectors, patterns,
  76. <br />
  77. constraints, models, and more
  78. </p>
  79. HTML;
  80. }
  81. View::show_footer();