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 $query =
"INSERT INTO event_file ".
185 "SET event_id = ".$ilDB->quote($this->
getSessionId()).
", ".
186 "file_name = ".$ilDB->quote($this->
getFileName()).
", ".
187 "file_size = ".$ilDB->quote($this->
getFileSize()).
", ".
188 "file_type = ".$ilDB->quote($this->
getFileType()).
" ";
190 $res = $this->db->query($query);
191 $this->
setFileId($this->db->getLastInsertId());
194 $this->fss_storage->createDirectory();
201 $this->fss_storage->getAbsolutePath().
'/'.$this->
getFileId());
213 $query =
"DELETE FROM event_file ".
214 "WHERE file_id = ".$this->getFileId().
" ";
215 $this->db->query($query);
227 $query =
"DELETE FROM event_file ".
228 "WHERE event_id = ".$ilDB->quote($a_event_id).
"";
229 $res = $ilDB->query($query);
231 #$this->fss_storage->delete();
239 $query =
"SELECT * FROM event_file ".
240 "WHERE event_id = ".$ilDB->quote($a_event_id).
"";
242 $res = $ilDB->query($query);
260 $query =
"SELECT * FROM event_file WHERE file_id = ".$ilDB->quote($this->file_id).
"";
261 $res = $this->db->query($query);