Photo_Page.php 832 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. require_once($path["page"] . "Page.php");
  3. require_once($path["entity"] . "Photo.php");
  4. /**
  5. * Photo page model.
  6. */
  7. class Photo_Page extends Page{
  8. /**
  9. * Selected {@see Photo}.
  10. */
  11. public $photo;
  12. /**
  13. * Constructor.
  14. *
  15. * Retrieves the data and initializes the variables.
  16. *
  17. * @param db Connection to the database.
  18. * @param lang Lowercase, two-letter language code.
  19. */
  20. public function __construct($db, $lang, $id){
  21. global $path;
  22. global $base_url;
  23. global $data;
  24. parent::__construct($db, $lang);
  25. $this->template = $path["template"] . "photo.php";
  26. $this->photo = new Photo($this->db, $this->lang, $id);
  27. }
  28. }
  29. ?>