Report_Page.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. require_once($path["page"] . "Page.php");
  3. require_once($path["entity"] . "Custom_Filter.php");
  4. /**
  5. * Main reports page.
  6. */
  7. class Report_Page extends Page{
  8. /**
  9. * Custom filters for this page.
  10. */
  11. public $custom_filters_runeupgrade = [];
  12. /**
  13. * Constructor.
  14. *
  15. * Retrieves the data and initializes the variables.
  16. *
  17. * @param SQLite3 $db Connection to the database.
  18. */
  19. public function __construct($db){
  20. global $path;
  21. global $root;
  22. global $UID;
  23. parent::__construct($db);
  24. $this->view = $path["view"] . "report.php";
  25. // Get custom filters
  26. $s = "
  27. SELECT id
  28. FROM filter
  29. WHERE
  30. uid = '$UID' AND
  31. page = 'REPORT_RUNEUPGRADE';
  32. ";
  33. $q = $this->db->query($s);
  34. while ($r = $q->fetchArray(SQLITE3_ASSOC)){
  35. array_push($this->custom_filters_runeupgrade, new Custom_Filter($this->db, $r["id"]));
  36. }
  37. $this->title = "Reports - SWDB";
  38. $this->description = "Usefull reports for summoners";
  39. $this->canonical = $root . "report";$this->title = "Reports - SWDB";
  40. }
  41. }
  42. ?>