- Author
- Jens Conze
- Version
- $Id$
Definition at line 12 of file class.ilMailAttachmentGUI.php.
◆ cancelSaveAttachments()
ilMailAttachmentGUI::cancelSaveAttachments |
( |
| ) |
|
◆ confirmDeleteAttachments()
ilMailAttachmentGUI::confirmDeleteAttachments |
( |
| ) |
|
Definition at line 147 of file class.ilMailAttachmentGUI.php.
References $_POST, $error, $files, array, ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().
149 if(!isset(
$_POST[
'filename']) || !is_array(
$_POST[
'filename']) || !
$_POST[
'filename'])
152 $this->showAttachments();
157 foreach(
$_POST[
'filename'] as $value)
159 $files[] = urldecode($value);
162 if(strlen((
$error = $this->mfile->unlinkFiles(
$files))))
168 $mailData = $this->umail->getSavedData();
169 if(is_array($mailData[
'attachments']))
172 for($i = 0; $i < count($mailData[
'attachments']); $i++)
174 if(!in_array($mailData[
'attachments'][$i],
$files))
176 $tmp[] = $mailData[
'attachments'][$i];
179 $this->umail->saveAttachments($tmp);
185 $this->showAttachments();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ deleteAttachments()
ilMailAttachmentGUI::deleteAttachments |
( |
| ) |
|
Definition at line 120 of file class.ilMailAttachmentGUI.php.
References $_POST, $filename, ilUtil\sendFailure(), and ilUtil\stripSlashes().
122 if(!isset(
$_POST[
'filename']) || !is_array(
$_POST[
'filename']) || !
$_POST[
'filename'])
125 $this->showAttachments();
129 $this->tpl->setTitle($this->lng->txt(
'mail'));
131 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
133 $confirmation->setFormAction($this->ctrl->getFormAction($this,
'confirmDeleteAttachments'));
134 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'confirmDeleteAttachments');
135 $confirmation->setCancel($this->lng->txt(
'cancel'),
'showAttachments');
136 $confirmation->setHeaderText($this->lng->txt(
'mail_sure_delete_file'));
143 $this->tpl->setContent($confirmation->getHtml());
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
◆ executeCommand()
ilMailAttachmentGUI::executeCommand |
( |
| ) |
|
◆ getToolbarForm()
ilMailAttachmentGUI::getToolbarForm |
( |
| ) |
|
|
protected |
- Returns
- ilPropertyFormGUI
Definition at line 191 of file class.ilMailAttachmentGUI.php.
References $counter, $data, $file, $files, $lng, array, ilUtil\formatSize(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilFormPropertyGUI\setRequired().
193 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
195 $attachment =
new ilFileInputGUI($this->lng->txt(
'upload'),
'userfile');
197 $attachment->setSize(20);
198 $form->addItem($attachment);
◆ $ctrl
ilMailAttachmentGUI::$ctrl |
|
private |
◆ $lng
ilMailAttachmentGUI::$lng |
|
private |
◆ $mfile
ilMailAttachmentGUI::$mfile |
|
private |
◆ $tpl
ilMailAttachmentGUI::$tpl |
|
private |
◆ $umail
ilMailAttachmentGUI::$umail |
|
private |
The documentation for this class was generated from the following file: