24 include_once(
'Modules/Session/classes/class.ilFSStorageSession.php');
56 $this->file_id = $a_file_id;
62 $this->file_id = $a_id;
75 $this->event_id = $a_event_id;
80 $this->file_name = $a_name;
88 $this->file_type = $a_type;
92 return $this->file_type;
96 $this->file_size = $a_size;
100 return $this->file_size;
104 $this->tmp_name = $a_name;
108 return $this->tmp_name;
112 $this->error_code = $a_code;
116 return $this->error_code;
121 return $this->fss_storage->getAbsolutePath().
"/".$this->
getFileId();
128 case UPLOAD_ERR_INI_SIZE:
129 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_ini_size'));
131 case UPLOAD_ERR_FORM_SIZE:
132 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_form_size'));
135 case UPLOAD_ERR_PARTIAL:
136 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_only_partial'));
139 case UPLOAD_ERR_NO_TMP_DIR:
140 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_no_tmp_dir'));
143 #case UPLOAD_ERR_CANT_WRITE:
144 # $this->ilErr->appendMessage($this->lng->txt('file_upload_no_write'));
148 case UPLOAD_ERR_NO_FILE:
164 $file->setSessionId($a_target_event_id);
168 $file->create(
false);
184 $next_id = $ilDB->nextId(
'event_file');
185 $query =
"INSERT INTO event_file (file_id,event_id,file_name,file_size,file_type) ".
187 $ilDB->quote($next_id ,
'integer').
", ".
190 $ilDB->quote($this->
getFileSize() ,
'integer').
", ".
198 $this->fss_storage->createDirectory();
205 $this->fss_storage->getAbsolutePath().
'/'.$this->
getFileId());
217 $query =
"DELETE FROM event_file ".
218 "WHERE file_id = ".$ilDB->quote($this->
getFileId() ,
'integer').
" ";
231 $query =
"DELETE FROM event_file ".
232 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
"";
235 #$this->fss_storage->delete();
243 $query =
"SELECT * FROM event_file ".
244 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
"";
264 $query =
"SELECT * FROM event_file WHERE file_id = ".$ilDB->quote($this->file_id ,
'integer').
"";