Search_Page.php 961 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Search results page file.
  4. *
  5. * Provides a class with all the properties and methods to display the page.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package SWDB
  10. * @todo Implement
  11. */
  12. require_once(PATH::PAGE . "Page.php");
  13. /**
  14. * Main reports page model.
  15. *
  16. * @category Page
  17. */
  18. class Search_Page extends Page{
  19. /**
  20. * Constructor.
  21. *
  22. * Retrieves the data and initializes the variables.
  23. *
  24. */
  25. public function __construct($query){
  26. parent::__construct();
  27. $this->set_public(false);
  28. $this->set_view("search.php");
  29. $this->set_title("Search results");
  30. $this->set_description("Search results: " . htmlentities($query));
  31. $this->set_canonical("search/" . $query);
  32. $this->add_css("search.css");
  33. $this->set_code(200);
  34. $this->set_message("OK");
  35. }
  36. }