Document.class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php // $Id: Document.class.php 4733 2005-05-02 08:54:49Z 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. define('DOCUMENT','file');
  22. define('FOLDER','folder');
  23. /**
  24. * An document
  25. * @author Bart Mollet <bart.mollet@hogent.be>
  26. * @package dokeos.backup
  27. */
  28. class Document extends Resource
  29. {
  30. var $path;
  31. var $comment;
  32. var $file_type;
  33. var $size;
  34. var $title;
  35. /**
  36. * Create a new Document
  37. * @param int $id
  38. * @param string $path
  39. * @param string $comment
  40. * @param string $title
  41. * @param string $file_type (DOCUMENT or FOLDER);
  42. * @param int $size
  43. */
  44. function Document($id,$path,$comment,$title,$file_type,$size)
  45. {
  46. parent::Resource($id,RESOURCE_DOCUMENT);
  47. $this->path = 'document'.$path;
  48. $this->comment = $comment;
  49. $this->title = $title;
  50. $this->file_type = $file_type;
  51. $this->size = $size;
  52. }
  53. /**
  54. * Show this document
  55. */
  56. function show()
  57. {
  58. parent::show();
  59. echo substr($this->path,8);
  60. }
  61. }
  62. ?>