Event.class.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php // $Id: Event.class.php 5243 2005-05-31 08:34:12Z bmol $
  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 event
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class Event extends Resource
  26. {
  27. /**
  28. * The title
  29. */
  30. var $title;
  31. /**
  32. * The content
  33. */
  34. var $content;
  35. /**
  36. * The start date
  37. */
  38. var $start_date;
  39. /**
  40. * The end date
  41. */
  42. var $end_date;
  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 Event($id,$title,$content,$start_date,$end_date)
  53. {
  54. parent::Resource($id,RESOURCE_EVENT);
  55. $this->title = $title;
  56. $this->content = $content;
  57. $this->start_date = $start_date;
  58. $this->end_date = $end_date;
  59. }
  60. /**
  61. * Show this Event
  62. */
  63. function show()
  64. {
  65. parent::show();
  66. echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
  67. }
  68. }
  69. ?>