Announcement.class.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php // $Id: Announcement.class.php 11326 2007-03-02 10:34:18Z 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. * An announcement
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. * @package dokeos.backup
  25. */
  26. class Announcement extends Resource
  27. {
  28. /**
  29. * The title of the announcement
  30. */
  31. var $title;
  32. /**
  33. * The content of the announcement
  34. */
  35. var $content;
  36. /**
  37. * The date on which this announcement was made
  38. */
  39. var $date;
  40. /**
  41. * The display order of this announcement
  42. */
  43. var $display_order;
  44. /**
  45. * Has the e-mail been sent?
  46. */
  47. var $email_sent;
  48. /**
  49. * Create a new announcement
  50. * @param int $id
  51. * @param string $title
  52. * @param string $content
  53. * @param string $date
  54. * @param int display_order
  55. */
  56. function Announcement($id,$title,$content,$date,$display_order,$email_sent)
  57. {
  58. parent::Resource($id,RESOURCE_ANNOUNCEMENT);
  59. $this->content = $content;
  60. $this->title = $title;
  61. $this->date = $date;
  62. $this->display_order = $display_order;
  63. $this->email_sent = $email_sent;
  64. }
  65. /**
  66. * Show this announcement
  67. */
  68. function show()
  69. {
  70. parent::show();
  71. echo $this->date.': '.$this->title;
  72. }
  73. }
  74. ?>