24 include_once(
'Modules/Session/classes/class.ilFSStorageSession.php');
60 $this->file_id = $a_file_id;
66 $this->file_id = $a_id;
79 $this->event_id = $a_event_id;
84 $this->file_name = $a_name;
88 return $this->file_name;
96 return $this->file_type;
100 $this->file_size = $a_size;
104 return $this->file_size;
108 $this->tmp_name = $a_name;
112 return $this->tmp_name;
116 $this->error_code = $a_code;
120 return $this->error_code;
125 return $this->fss_storage->getAbsolutePath().
"/".$this->
getFileId();
132 case UPLOAD_ERR_INI_SIZE:
133 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_ini_size'));
135 case UPLOAD_ERR_FORM_SIZE:
136 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_form_size'));
139 case UPLOAD_ERR_PARTIAL:
140 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_only_partial'));
143 case UPLOAD_ERR_NO_TMP_DIR:
144 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_no_tmp_dir'));
147 #case UPLOAD_ERR_CANT_WRITE: 148 # $this->ilErr->appendMessage($this->lng->txt('file_upload_no_write')); 152 case UPLOAD_ERR_NO_FILE:
168 $file->setSessionId($a_target_event_id);
172 $file->create(
false);
188 $next_id = $ilDB->nextId(
'event_file');
189 $query =
"INSERT INTO event_file (file_id,event_id,file_name,file_size,file_type) ".
191 $ilDB->quote($next_id ,
'integer').
", ".
194 $ilDB->quote($this->
getFileSize() ,
'integer').
", ".
202 $this->fss_storage->createDirectory();
209 $this->fss_storage->getAbsolutePath().
'/'.$this->
getFileId());
221 $query =
"DELETE FROM event_file ".
222 "WHERE file_id = ".$ilDB->quote($this->
getFileId() ,
'integer').
" ";
235 $query =
"DELETE FROM event_file ".
236 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
"";
239 #$this->fss_storage->delete(); 247 $query =
"SELECT * FROM event_file ".
248 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
"";
268 $query =
"SELECT * FROM event_file WHERE file_id = ".$ilDB->quote($this->file_id ,
'integer').
"";
setSessionId($a_event_id)
setTemporaryName($a_name)
cloneFiles($a_target_event_id)
Clone files.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
_deleteByEvent($a_event_id)
Create styles array
The data for the language used.
__construct($a_file_id=null)
Constructor.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static _readFilesByEvent($a_event_id)