ForumTopic.class.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php // $Id: ForumTopic.class.php 11365 2007-03-03 10:49:33Z yannoo $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. Copyright (c) Bart Mollet (bart.mollet@hogent.be)
  9. For a full list of contributors, see "credits.txt".
  10. The full license can be read in "license.txt".
  11. This program is free software; you can redistribute it and/or
  12. modify it under the terms of the GNU General Public License
  13. as published by the Free Software Foundation; either version 2
  14. of the License, or (at your option) any later version.
  15. See the GNU General Public License for more details.
  16. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  17. Mail: info@dokeos.com
  18. ==============================================================================
  19. */
  20. require_once('Resource.class.php');
  21. /**
  22. * A forum-topic/thread
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class ForumTopic extends Resource
  26. {
  27. /**
  28. * The title
  29. */
  30. var $title;
  31. /**
  32. * The time
  33. */
  34. var $time;
  35. /**
  36. * Poster firstname
  37. */
  38. var $firstname;
  39. /**
  40. * Poster lastname
  41. */
  42. var $lastname;
  43. /**
  44. * Topic notify
  45. */
  46. var $topic_notify;
  47. /**
  48. * Parent forum
  49. */
  50. var $forum_id;
  51. /**
  52. * Last post
  53. */
  54. var $last_post;
  55. /**
  56. * Create a new ForumTopic
  57. */
  58. function ForumTopic($id,$title,$time,$firstname,$lastname,$topic_notify,$forum_id,$last_post)
  59. {
  60. parent::Resource($id,RESOURCE_FORUMTOPIC);
  61. $this->title = $title;
  62. $this->time = $time;
  63. $this->firstname = $firstname;
  64. $this->lastname = $lastname;
  65. $this->topic_notify = $topic_notify;
  66. $this->forum_id = $forum_id;
  67. $this->last_post = $last_post;
  68. }
  69. /**
  70. * Show this resource
  71. */
  72. function show()
  73. {
  74. parent::show();
  75. echo $this->title.' ('.$this->firstname.' '.$this->lastname.', '.$this->topic_time.')';
  76. }
  77. }
  78. ?>