A new, object-oriented, better vesion of μForum
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
645 B

  1. <?php
  2. require_once('./inc/model.class.php');
  3. class NavigationModel extends Model
  4. {
  5. private $linksList = array();
  6. private $title = '';
  7. public function setForumName($fn)
  8. {
  9. $this->addLink('Forum '.$fn, 'index.php');
  10. $this->title = $fn. ' &bull; ';
  11. }
  12. public function addLink($name, $url = '')
  13. {
  14. if ($url == null)
  15. $url = $_SERVER['REQUEST_URI'];
  16. $l = array(
  17. 'name' => $name,
  18. 'url' => $url
  19. );
  20. array_push($this->linksList, $l);
  21. }
  22. public function setSubTitle($t)
  23. {
  24. $this->title .= $t;
  25. }
  26. public function getTitle()
  27. {
  28. return $this->title;
  29. }
  30. public function getNav()
  31. {
  32. return $this->linksList;
  33. }
  34. }
  35. ?>