An easy point of sale system with automatic inventory tracking. https://netsyms.biz/apps/nickelbox/
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 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /*
  3. * This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. */
  7. if (!defined('NICKELBOX')) {
  8. die("Direct access denied.");
  9. }
  10. ?>
  11. <div class="container mt-4">
  12. <div class="row justify-content-center">
  13. <form class="card" action="action.php" method="post">
  14. <input type="hidden" name="action" value="login" />
  15. <div class="card-header">
  16. Log In
  17. </div>
  18. <div class="card-body">
  19. <?php
  20. $alert = "";
  21. if (!empty($_GET['msg'])) {
  22. switch ($_GET['msg']) {
  23. case "badlogin":
  24. $alert = "Bad email or password.";
  25. break;
  26. case "invalidemail":
  27. $alert = "Invalid email address.";
  28. break;
  29. }
  30. }
  31. if ($alert != "") {
  32. ?>
  33. <div class="text-danger mb-2">
  34. <?php echo $alert; ?>
  35. </div>
  36. <?php
  37. }
  38. ?>
  39. <p class="small"><a href="./?page=signup">Don't have an account? Click here</a></p>
  40. <input type="email" name="email" class="form-control mb-2" placeholder="Email address" required />
  41. <input type="password" name="password" class="form-control" placeholder="Password" required />
  42. </div>
  43. <div class="card-footer d-flex">
  44. <a href="./" class="btn btn-default">Back</a>
  45. <button type="submit" class="btn btn-primary ml-auto">Log in</button>
  46. </div>
  47. </form>
  48. </div>
  49. </div>