123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- require_once 'Resource.class.php';
- define('DOCUMENT','file');
- define('FOLDER','folder');
- class Document extends Resource
- {
- var $path;
- var $comment;
- var $file_type;
- var $size;
- var $title;
-
- function Document($id,$path,$comment,$title,$file_type,$size)
- {
- parent::Resource($id,RESOURCE_DOCUMENT);
- $this->path = 'document'.$path;
- $this->comment = $comment;
- $this->title = $title;
- $this->file_type = $file_type;
- $this->size = $size;
- }
-
- function show()
- {
- parent::show();
- echo preg_replace('@^document@', '', $this->path);
- if (!empty($this->title) && (api_get_setting('use_document_title') == 'true'))
- {
- if (strpos($this->path, $this->title) === false)
- {
- echo " - ".$this->title;
- }
- }
- }
- }
|