Event.class.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * Event backup script
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class CalendarEvent extends Resource
  10. {
  11. /**
  12. * The title
  13. */
  14. public $title;
  15. /**
  16. * The content
  17. */
  18. public $content;
  19. /**
  20. * The start date
  21. */
  22. public $start_date;
  23. /**
  24. * The end date
  25. */
  26. public $end_date;
  27. /**
  28. * The attachment path
  29. */
  30. public $attachment_path;
  31. /**
  32. * The attachment filename
  33. */
  34. public $attachment_filename;
  35. /**
  36. * The attachment size
  37. */
  38. public $attachment_size;
  39. /**
  40. * The attachment comment
  41. */
  42. public $attachment_comment;
  43. /**
  44. * Create a new Event
  45. * @param int $id
  46. * @param string $title
  47. * @param string $content
  48. * @param string $date
  49. * @param string $hour
  50. * @param int $duration
  51. */
  52. function __construct($id, $title, $content, $start_date, $end_date, $attachment_path = null, $attachment_filename= null, $attachment_size= null, $attachment_comment= null, $all_day = 0)
  53. {
  54. parent::__construct($id, RESOURCE_EVENT);
  55. $this->title = $title;
  56. $this->content = $content;
  57. $this->start_date = $start_date;
  58. $this->end_date = $end_date;
  59. $this->all_day = $all_day;
  60. $this->attachment_path = $attachment_path;
  61. $this->attachment_filename = $attachment_filename;
  62. $this->attachment_size = $attachment_size;
  63. $this->attachment_comment = $attachment_comment;
  64. }
  65. /**
  66. * Show this Event
  67. */
  68. function show() {
  69. parent::show();
  70. echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
  71. }
  72. }