Event.class.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. var $title;
  22. /**
  23. * The content
  24. */
  25. var $content;
  26. /**
  27. * The start date
  28. */
  29. var $start_date;
  30. /**
  31. * The end date
  32. */
  33. var $end_date;
  34. /**
  35. * The attachment path
  36. */
  37. var $attachment_path;
  38. /**
  39. * The attachment filename
  40. */
  41. var $attachment_filename;
  42. /**
  43. * The attachment size
  44. */
  45. var $attachment_size;
  46. /**
  47. * The attachment comment
  48. */
  49. var $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, $attachment_filename, $attachment_size, $attachment_comment) {
  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->attachment_path = $attachment_path;
  66. $this->attachment_filename = $attachment_filename;
  67. $this->attachment_size = $attachment_size;
  68. $this->attachment_comment = $attachment_comment;
  69. }
  70. /**
  71. * Show this Event
  72. */
  73. function show()
  74. {
  75. parent::show();
  76. echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
  77. }
  78. }
  79. ?>