Announcement.class.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * An announcement
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class Announcement extends Resource
  10. {
  11. /**
  12. * The title of the announcement
  13. */
  14. public $title;
  15. /**
  16. * The content of the announcement
  17. */
  18. public $content;
  19. /**
  20. * The date on which this announcement was made
  21. */
  22. public $date;
  23. /**
  24. * The display order of this announcement
  25. */
  26. public $display_order;
  27. /**
  28. * Has the e-mail been sent?
  29. */
  30. public $email_sent;
  31. public $attachment_path;
  32. public $attachment_filename;
  33. public $attachment_size;
  34. public $attachment_comment;
  35. /**
  36. * Create a new announcement
  37. * @param int $id
  38. * @param string $title
  39. * @param string $content
  40. * @param string $date
  41. * @param int display_order
  42. */
  43. function __construct($id, $title, $content, $date, $display_order, $email_sent, $path, $filename, $size, $comment)
  44. {
  45. parent::__construct($id,RESOURCE_ANNOUNCEMENT);
  46. $this->content = $content;
  47. $this->title = $title;
  48. $this->date = $date;
  49. $this->display_order = $display_order;
  50. $this->email_sent = $email_sent;
  51. $this->attachment_path = $path;
  52. $this->attachment_filename = $filename;
  53. $this->attachment_size = $size;
  54. $this->attachment_comment = $comment;
  55. }
  56. /**
  57. * Show this announcement
  58. */
  59. function show()
  60. {
  61. parent::show();
  62. echo $this->date.': '.$this->title;
  63. }
  64. }