login.php 645B

1234567891011121314151617181920212223242526272829
  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. {
  15. set("title", "Erreur");
  16. set("error", true);
  17. } else
  18. {
  19. set("title", "Accueil");
  20. set("error", false);
  21. }
  22. return html("login.html.php", "layout.html.php");
  23. }