Landing_Page.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Landing (login) page file.
  4. *
  5. * Provides a class with all the properties and methods to display the page.
  6. *
  7. * @category Page
  8. */
  9. /**
  10. * Require dependent files if not present.
  11. */
  12. require_once(PATH::PAGE . "Page.php");
  13. /**
  14. * Landing (login) page model.
  15. *
  16. * @category Page
  17. */
  18. class Landing_Page extends Page{
  19. /**
  20. * @var string Error message to show when login was unsuccesfull and
  21. * the user is back in the login page
  22. */
  23. public $error_message = "";
  24. /**
  25. * Constructor.
  26. *
  27. * Retrieves the data and initializes the variables.
  28. */
  29. public function __construct(){
  30. $this->view = PATH::VIEW . "landing.php";
  31. $this->title = "Login - SWDB";
  32. $this->description = "Login to SWDB";
  33. $this->canonical = URL::BASE . "landing/";
  34. if (http_response_code() == 401){
  35. $this->error_message = "Invalid credentials";
  36. }
  37. }
  38. }
  39. ?>