login.php 548B

123456789101112131415161718192021222324
  1. <?php
  2. require_once(dirname(__DIR__)."/controllers/data.php");
  3. require_once(dirname(__DIR__)."/models/data.class.php");
  4. require_once(dirname(__DIR__)."/../DbIds.php");
  5. function login()
  6. {
  7. set("title", "Login");
  8. return html("login.html.php", "layout.html.php");
  9. }
  10. function check_login()
  11. {
  12. $identifiers = getAdminIdentifiers();
  13. if($_POST["login"] != $identifiers[0] || $_POST["password"] != $identifiers[1])
  14. return login();
  15. set("title", "Home");
  16. return html("home.html.php", "layout.html.php");
  17. }