24 include_once(
'Modules/Session/classes/class.ilFSStorageSession.php');
64 $this->file_id = $a_file_id;
70 $this->file_id = $a_id;
83 $this->event_id = $a_event_id;
88 $this->file_name = $a_name;
92 return $this->file_name;
100 return $this->file_type;
104 $this->file_size = $a_size;
108 return $this->file_size;
112 $this->tmp_name = $a_name;
116 return $this->tmp_name;
120 $this->error_code = $a_code;
124 return $this->error_code;
129 return $this->fss_storage->getAbsolutePath() .
"/" . $this->
getFileId();
135 case UPLOAD_ERR_INI_SIZE:
136 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_ini_size'));
138 case UPLOAD_ERR_FORM_SIZE:
139 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_form_size'));
142 case UPLOAD_ERR_PARTIAL:
143 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_only_partial'));
146 case UPLOAD_ERR_NO_TMP_DIR:
147 $this->ilErr->appendMessage($this->lng->txt(
'file_upload_no_tmp_dir'));
150 #case UPLOAD_ERR_CANT_WRITE: 151 # $this->ilErr->appendMessage($this->lng->txt('file_upload_no_write')); 155 case UPLOAD_ERR_NO_FILE:
171 $file->setSessionId($a_target_event_id);
175 $file->create(
false);
186 $ilDB = $DIC[
'ilDB'];
192 $next_id =
$ilDB->nextId(
'event_file');
193 $query =
"INSERT INTO event_file (file_id,event_id,file_name,file_size,file_type) " .
195 $ilDB->quote($next_id,
'integer') .
", " .
206 $this->fss_storage->createDirectory();
210 ilUtil::moveUploadedFile(
213 $this->fss_storage->getAbsolutePath() .
'/' . $this->
getFileId()
220 public function delete()
224 $ilDB = $DIC[
'ilDB'];
227 $query =
"DELETE FROM event_file " .
228 "WHERE file_id = " .
$ilDB->quote($this->
getFileId(),
'integer') .
" ";
240 $ilDB = $DIC[
'ilDB'];
243 $query =
"DELETE FROM event_file " .
244 "WHERE event_id = " .
$ilDB->quote($a_event_id,
'integer') .
"";
247 #$this->fss_storage->delete(); 255 $ilDB = $DIC[
'ilDB'];
257 $query =
"SELECT * FROM event_file " .
258 "WHERE event_id = " .
$ilDB->quote($a_event_id,
'integer') .
"";
271 $ilDB = $DIC[
'ilDB'];
273 if (!$this->file_id) {
278 $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.
foreach($_POST as $key=> $value) $res
_deleteByEvent($a_event_id)
__construct($a_file_id=null)
Constructor.
static _readFilesByEvent($a_event_id)