Forum.class.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Forum backup script
  5. * @package chamilo.backup
  6. */
  7. /**
  8. * Code
  9. */
  10. require_once 'Resource.class.php';
  11. /**
  12. * A forum
  13. * @author Bart Mollet <bart.mollet@hogent.be>
  14. * @package chamilo.backup
  15. */
  16. class Forum extends Resource
  17. {
  18. /**
  19. * The title
  20. */
  21. var $title;
  22. /**
  23. * The description
  24. */
  25. var $description;
  26. /**
  27. * Category-id
  28. */
  29. var $category_id;
  30. /**
  31. * Last post
  32. */
  33. var $last_post;
  34. /**
  35. * Number of threads
  36. */
  37. var $topics;
  38. /**
  39. * Number of posts
  40. */
  41. var $posts;
  42. /**
  43. * Allow anonimous
  44. */
  45. var $allow_anonymous;
  46. /**
  47. * Allow edit
  48. */
  49. var $allow_edit;
  50. /**
  51. * Approval direct post
  52. */
  53. var $approval_direct_post;
  54. /**
  55. * Allow attachments
  56. */
  57. var $allow_attachements;
  58. /**
  59. * Allow new threads
  60. */
  61. var $allow_new_topics;
  62. /**
  63. * Default view
  64. */
  65. var $default_view;
  66. /**
  67. * Group forum
  68. */
  69. var $of_group;
  70. /**
  71. * Public/private group forum
  72. */
  73. var $group_public_private;
  74. /**
  75. * Order
  76. */
  77. var $order;
  78. /**
  79. * Locked or not
  80. */
  81. var $locked;
  82. /**
  83. * Session id
  84. */
  85. var $session_id;
  86. /**
  87. * Image
  88. */
  89. var $image;
  90. /**
  91. * Create a new Forum
  92. */
  93. function Forum($id, $title, $description, $category_id, $last_post, $topics, $posts, $allow_anonymous, $allow_edit, $approval_direct_post, $allow_attachements, $allow_new_topics, $default_view, $of_group, $group_public_private, $order, $locked, $session_id, $image)
  94. {
  95. parent::Resource($id,RESOURCE_FORUM);
  96. $this->title = $title;
  97. $this->description = $description;
  98. $this->category_id = $category_id;
  99. $this->last_post = $last_post;
  100. $this->topics = $topics;
  101. $this->posts = $posts;
  102. $this->allow_anonymous = $allow_anonymous;
  103. $this->allow_edit = $allow_edit;
  104. $this->approval_direct_post = $approval_direct_post;
  105. $this->allow_attachements = $allow_attachements;
  106. $this->allow_new_topics = $allow_new_topics;
  107. $this->default_view = $default_view;
  108. $this->of_group = $of_group;
  109. $this->group_public_private = $group_public_private;
  110. $this->order = $order;
  111. $this->locked = $locked;
  112. $this->session_id = $session_id;
  113. $this->image = $image;
  114. }
  115. /**
  116. * Show this resource
  117. */
  118. function show()
  119. {
  120. parent::show();
  121. echo $this->title;
  122. }
  123. }