Event.class.php 1.6 KB

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