ForumPost.class.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php // $Id: ForumPost.class.php 3305 2005-02-03 12:44:01Z bmol $
  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-post
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class ForumPost extends Resource
  26. {
  27. /**
  28. * The title
  29. */
  30. var $title;
  31. /**
  32. * The text
  33. */
  34. var $text;
  35. /**
  36. * The time
  37. */
  38. var $post_time;
  39. /**
  40. * Poster-ip
  41. */
  42. var $poster_ip;
  43. /**
  44. * Poster firstname
  45. */
  46. var $firstname;
  47. /**
  48. * Poster lastname
  49. */
  50. var $lastname;
  51. /**
  52. * Topic notify
  53. */
  54. var $topic_notify;
  55. /**
  56. * Parent post
  57. */
  58. var $parent_post_id;
  59. /**
  60. * Topic id
  61. */
  62. var $topic_id;
  63. /**
  64. * Create a new ForumPost
  65. */
  66. function ForumPost($id,$title,$text,$post_time,$poster_ip,$firstname,$lastname,$topic_notify,$parent_post_id,$topic_id)
  67. {
  68. parent::Resource($id,RESOURCE_FORUMPOST);
  69. $this->title = $title;
  70. $this->text = $text;
  71. $this->post_time = $post_time;
  72. $this->poster_ip = $poster_ip;
  73. $this->firstname = $firstname;
  74. $this->lastname = $lastname;
  75. $this->topic_notify = $topic_notify;
  76. $this->parent_post_id = $parent_post_id;
  77. $this->topic_id = $topic_id;
  78. }
  79. /**
  80. * Show this resource
  81. */
  82. function show()
  83. {
  84. parent::show();
  85. echo $this->title.' ('.$this->firstname.' '.$this->lastname.', '.$this->post_time.')';
  86. }
  87. }
  88. ?>