5 require_once
'Services/User/classes/class.ilObjUser.php';
6 require_once
'Services/Mail/classes/class.ilMailbox.php';
7 require_once
'Services/Mail/classes/class.ilMail.php';
8 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
9 include_once
'Services/Mail/classes/class.ilMailFolderTableGUI.php';
76 $this->tpl = $DIC->ui()->mainTemplate();
77 $this->ctrl = $DIC->ctrl();
78 $this->lng = $DIC->language();
79 $this->toolbar = $DIC->toolbar();
80 $this->
user = $DIC->user();
81 $this->tabs = $DIC->tabs();
83 $this->umail =
new ilMail($this->
user->getId());
84 $this->mbox =
new ilMailBox($this->
user->getId());
86 if (isset(
$_POST[
'mobj_id']) && (int)
$_POST[
'mobj_id']) {
87 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
90 if (!(
int)
$_GET[
'mobj_id']) {
91 $_GET[
'mobj_id'] = $this->mbox->getInboxFolder();
95 $this->ctrl->saveParameter($this,
'mobj_id');
96 $this->ctrl->setParameter($this,
'mobj_id',
$_GET[
'mobj_id']);
101 if (
$_POST[
"select_cmd"]) {
102 $_GET[
"cmd"] =
'editFolder';
105 $this->current_select_cmd =
$_POST[
'select_cmd'];
106 $this->current_selected_cmd =
$_POST[
'selected_cmd'];
107 } elseif (
$_POST[
"select_cmd2"]) {
109 $_GET[
"cmd"] =
'editFolder';
110 $this->current_select_cmd =
$_POST[
'select_cmd2'];
111 $this->current_selected_cmd =
$_POST[
'selected_cmd2'];
117 if (
$_GET[
'selected_cmd'] ==
"deleteMails" &&
$_GET[
"mail_id"]) {
118 $_GET[
"cmd"] =
"editFolder";
119 $this->current_selected_cmd =
"deleteMails";
126 $cmd = $this->ctrl->getCmd();
127 if ($cmd ==
'changeFolder' &&
128 is_numeric(
$_POST[
'selected_cmd']) &&
130 $this->current_selected_cmd = (int)
$_POST[
'selected_cmd'];
133 $forward_class = $this->ctrl->getNextClass($this);
134 switch ($forward_class) {
136 require_once
'Services/Contact/classes/class.ilContactGUI.php';
140 case 'ilmailoptionsgui':
141 $this->tpl->setTitle($this->lng->txt(
'mail'));
142 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
147 case 'ilpublicuserprofilegui':
148 include_once(
"Services/User/classes/class.ilPublicUserProfileGUI.php");
149 $this->tpl->setTitle($this->lng->txt(
"mail"));
150 $this->ctrl->saveParameter($this,
"mail_id");
152 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
153 $ret = $this->ctrl->forwardCommand($profile_gui);
155 $this->tpl->setContent(
$ret);
161 if (!($cmd = $this->ctrl->getCmd())) {
183 $this->umail->deleteMailsOfFolder(
$_GET[
'mobj_id']);
193 if ($this->umail->countMailsOfFolder((
int)
$_GET[
'mobj_id'])) {
194 $this->askForConfirmation =
true;
204 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
206 $this->tpl->setTitle($this->lng->txt(
"mail"));
208 $this->tpl->setVariable(
"TBL_TITLE", $this->lng->txt(
"profile_of") .
" " .
211 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT", $this->lng->txt(
"public_profile"));
213 include_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
215 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
216 $this->tpl->setContent($this->ctrl->getHTML($profile_gui));
225 $this->toolbar->addSeparator();
228 $this->toolbar->addButton($this->lng->txt(
'mail_add_subfolder'), $this->ctrl->getLinkTarget($this,
'addSubFolder'));
231 $this->toolbar->addButton($this->lng->txt(
'rename'), $this->ctrl->getLinkTarget($this,
'renameSubFolder'));
232 $this->toolbar->addButton($this->lng->txt(
'delete'), $this->ctrl->getLinkTarget($this,
'deleteSubFolder'));
242 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
243 $this->tpl->setTitle($this->lng->txt(
'mail'));
245 $sentFolderId = $this->mbox->getSentFolder();
246 $draftsFolderId = $this->mbox->getDraftsFolder();
248 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
249 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
250 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
252 if ($this->current_selected_cmd ==
'deleteMails' &&
253 !$this->errorDelete &&
254 $this->current_selected_cmd !=
'confirm' &&
256 if (isset($_REQUEST[
'mail_id']) && !is_array($_REQUEST[
'mail_id'])) {
257 $_REQUEST[
'mail_id'] =
array($_REQUEST[
'mail_id']);
260 $confirmation->setHeaderText($this->lng->txt(
'mail_sure_delete'));
261 $this->ctrl->setParameter($this,
'mail_id', implode(
',', (
array) $_REQUEST[
'mail_id']));
262 $confirmation->setFormAction($this->ctrl->getFormAction($this,
'confirmDeleteMails'));
263 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'confirmDeleteMails');
264 $confirmation->setCancel($this->lng->txt(
'cancel'),
'cancelDeleteMails');
265 $this->tpl->setVariable(
'CONFIRMATION', $confirmation->getHTML());
266 $a_show_confirmation =
true;
269 $folders = $this->mbox->getSubFolders();
274 $check_local =
false;
277 $folder_d = $mtree->getNodeData(
$_GET[
'mobj_id']);
278 if ($folder_d[
'm_type'] ==
'user_folder') {
280 } elseif ($folder_d[
'm_type'] ==
'local') {
286 $mailtable->isSentFolder($isSentFolder)
287 ->isDraftFolder($isDraftFolder)
288 ->isTrashFolder($isTrashFolder)
290 $mailtable->setSelectedItems(
$_POST[
'mail_id']);
293 $mailtable->prepareHTML();
296 $this->lng->txt($e->getMessage()) !=
'-' . $e->getMessage() .
'-' ?
297 $this->lng->txt($e->getMessage()) :
302 $table_html = $mailtable->getHtml();
304 $folder_options =
array();
306 foreach ($folders as $folder) {
307 $folder_d = $mtree->getNodeData($folder[
'obj_id']);
309 if ($folder[
'obj_id'] == $_GET[
'mobj_id']) {
310 if ($folder[
'type'] ==
'user_folder') {
312 } elseif ($folder[
'type'] ==
'local') {
318 if ($folder[
'type'] ==
'user_folder') {
320 for (
$i = 2;
$i < $folder_d[
'depth'] - 1;
$i++) {
324 if ($folder_d[
'depth'] > 1) {
328 $folder_options[$folder[
'obj_id']] = $pre .
' ' . $folder[
'title'];
330 $folder_options[$folder[
'obj_id']] = $this->lng->txt(
'mail_' . $folder[
'title']);
335 if ($a_show_confirmation ==
false && $this->askForConfirmation ==
false) {
337 $this->toolbar->addText($this->lng->txt(
'mail_change_to_folder'));
338 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
340 $si->setOptions($folder_options);
341 $si->setValue($_GET[
'mobj_id']);
342 $this->toolbar->addInputItem(
$si);
344 $this->toolbar->addFormButton($this->lng->txt(
'change'),
'showFolder');
345 $this->toolbar->setFormAction($this->ctrl->getFormAction($this,
'showFolder'));
347 if ($check_local ==
true || $check_uf ==
true) {
353 if ($mailtable->isTrashFolder() &&
354 $mailtable->getNumerOfMails() > 0 &&
355 $this->askForConfirmation) {
357 $confirmation->setHeaderText($this->lng->txt(
'mail_empty_trash_confirmation'));
358 $confirmation->setFormAction($this->ctrl->getFormAction($this,
'performEmptyTrash'));
359 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'performEmptyTrash');
360 $confirmation->setCancel($this->lng->txt(
'cancel'),
'cancelEmptyTrash');
361 $this->tpl->setVariable(
'CONFIRMATION', $confirmation->getHTML());
364 $this->tpl->setVariable(
'MAIL_TABLE', $table_html);
370 if ($a_show_confirm) {
371 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
375 $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"showFolder"));
376 $oConfirmationGUI->setHeaderText($this->lng->txt(
"mail_sure_delete_folder"));
377 $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"),
"showFolder");
378 $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"),
"performDeleteSubfolder");
379 $this->tpl->setVariable(
'CONFIRMATION', $oConfirmationGUI->getHTML());
389 $new_parent = $this->mbox->getParentFolderId((
int)
$_GET[
'mobj_id']);
390 if ($this->mbox->deleteFolder((
int) $_GET[
'mobj_id'])) {
392 $this->ctrl->setParameterByClass(
'ilMailGUI',
'mobj_id', (
int) $new_parent);
393 $this->ctrl->redirectByClass(
'ilMailGUI');
407 if (empty(
$_POST[
'subfolder_title'])) {
414 $this->ctrl->setParameterByClass(
"ilMailGUI",
'mobj_id', $mobj_id);
415 $this->ctrl->redirectByClass(
"ilMailGUI");
425 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
427 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
428 $this->tpl->setTitle($this->lng->txt(
'mail'));
431 $oForm->setFormAction($this->ctrl->getFormAction($this,
'performAddSubFolder'));
432 $oForm->setTitle($this->lng->txt(
'mail_add_folder'));
436 $oTitle->setTitle($this->lng->txt(
'title'));
437 $oTitle->setPostVar(
'subfolder_title');
438 $oForm->addItem($oTitle);
440 $oForm->addCommandButton(
'performAddSubFolder', $this->lng->txt(
'save'));
441 $oForm->addCommandButton(
'showFolder', $this->lng->txt(
'cancel'));
443 $this->tpl->setVariable(
'FORM', $oForm->getHTML());
451 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
453 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
454 $this->tpl->setTitle($this->lng->txt(
'mail'));
457 $oForm->setFormAction($this->ctrl->getFormAction($this,
'performRenameSubFolder'));
458 $oForm->setTitle($this->lng->txt(
'mail_rename_folder'));
462 $oTitle->setTitle($this->lng->txt(
'title'));
463 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
464 $oTitle->setValue($tmp_data[
"title"]);
465 $oTitle->setPostVar(
'subfolder_title');
466 $oForm->addItem($oTitle);
468 $oForm->addCommandButton(
'performRenameSubFolder', $this->lng->txt(
'save'));
469 $oForm->addCommandButton(
'showFolder', $this->lng->txt(
'cancel'));
470 $this->tpl->setVariable(
'FORM', $oForm->getHTML());
482 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
483 if ($tmp_data[
"title"] !=
$_POST[
"subfolder_title"]) {
484 if (
$_POST[
"subfolder_title"] ==
"") {
491 $this->ctrl->redirectByClass(
"ilMailGUI");
503 switch ($this->current_selected_cmd) {
505 if (!(
int)
$_GET[
"mail_id"] || !(
int) $this->current_selected_cmd) {
507 return $this->showMail();
510 if ($this->umail->moveMailsToFolder(
array(
$_GET[
"mail_id"]), $this->current_selected_cmd)) {
512 $this->ctrl->redirectByClass(
"ilMailGUI");
526 switch ($this->current_selected_cmd) {
527 case 'markMailsRead':
528 if (is_array(
$_POST[
"mail_id"])) {
529 $this->umail->markRead(
$_POST[
"mail_id"]);
534 case 'markMailsUnread':
535 if (is_array(
$_POST[
"mail_id"])) {
536 $this->umail->markUnread(
$_POST[
"mail_id"]);
544 if ($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"]) {
545 if (!is_array(
$_POST[
"mail_id"])) {
547 $this->errorDelete =
true;
552 if (!is_array(
$_POST[
"mail_id"])) {
554 } elseif ($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->mbox->getTrashFolder())) {
564 $this->ctrl->setParameterByClass(
"ilmailoptionsgui",
"cmd",
"add");
565 $this->ctrl->redirectByClass(
"ilmailoptionsgui");
570 if (!is_array(
$_POST[
"mail_id"])) {
572 } elseif ($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->current_selected_cmd)) {
588 if ($this->mbox->getTrashFolder() ==
$_GET[
'mobj_id']) {
589 $_POST[
'mail_id'] = $mail_ids = explode(
',',
$_GET[
'mail_id']);
590 if (!is_array($mail_ids)) {
592 } elseif ($this->umail->deleteMails($mail_ids)) {
605 $this->ctrl->redirect($this);
611 public function showMail()
618 $this->tabs->clearTargets();
619 $this->tabs->setBackTarget($this->lng->txt(
'back_to_folder'), $this->ctrl->getFormAction($this,
'showFolder'));
621 $this->umail->markRead(
array((
int)
$_GET[
'mail_id']));
622 $mailData = $this->umail->getMail((
int) $_GET[
'mail_id']);
624 $this->tpl->setTitle($this->lng->txt(
'mail_mails_of'));
626 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
629 $form->setPreventDoubleSubmission(
false);
630 $form->setTableWidth(
'100%');
631 $this->ctrl->setParameter($this,
'mail_id', (
int) $_GET[
'mail_id']);
632 $form->setFormAction($this->ctrl->getFormAction($this,
'showMail'));
633 $this->ctrl->clearParameters($this);
634 $form->setTitle($this->lng->txt(
'mail_mails_of'));
640 include_once
'Services/Accessibility/classes/class.ilAccessKeyGUI.php';
647 if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
648 $this->ctrl->setParameterByClass(
'ilmailformgui',
'mail_id', (
int) $_GET[
'mail_id']);
649 $this->ctrl->setParameterByClass(
'ilmailformgui',
'type',
'reply');
650 $this->ctrl->clearParametersByClass(
'iliasmailformgui');
651 $this->toolbar->addButton($this->lng->txt(
'reply'), $this->ctrl->getLinkTargetByClass(
'ilmailformgui'),
'',
ilAccessKey::REPLY);
652 $this->ctrl->clearParameters($this);
655 $this->ctrl->setParameterByClass(
'ilmailformgui',
'mail_id', (
int) $_GET[
'mail_id']);
656 $this->ctrl->setParameterByClass(
'ilmailformgui',
'type',
'forward');
657 $this->ctrl->clearParametersByClass(
'iliasmailformgui');
658 $this->toolbar->addButton($this->lng->txt(
'forward'), $this->ctrl->getLinkTargetByClass(
'ilmailformgui'),
'',
ilAccessKey::FORWARD_MAIL);
659 $this->ctrl->clearParameters($this);
661 $this->ctrl->setParameter($this,
'mail_id', (
int) $_GET[
'mail_id']);
662 $this->toolbar->addButton($this->lng->txt(
'print'), $this->ctrl->getLinkTarget($this,
'printMail'),
'_blank');
663 $this->ctrl->clearParameters($this);
665 $this->ctrl->setParameter($this,
'mail_id', (
int) $_GET[
'mail_id']);
666 $this->ctrl->setParameter($this,
'selected_cmd',
'deleteMails');
667 $this->toolbar->addButton($this->lng->txt(
'delete'), $this->ctrl->getLinkTarget($this),
'',
ilAccessKey::DELETE);
668 $this->ctrl->clearParameters($this);
670 if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
671 $linked_fullname = $sender->getPublicName();
673 $sender->getPersonalPicturePath(
'xsmall'),
674 $sender->getPublicName(),
681 $add_to_addb_button =
'';
684 $this->ctrl->setParameter($this,
'mail_id', (
int) $_GET[
'mail_id']);
685 $this->ctrl->setParameter($this,
'user', $sender->getId());
686 $linked_fullname =
'<br /><a href="' . $this->ctrl->getLinkTarget($this,
'showUser') .
'" title="' . $linked_fullname .
'">' . $linked_fullname .
'</a>';
687 $this->ctrl->clearParameters($this);
691 $from->setHtml($picture .
' ' . $linked_fullname . $add_to_addb_button);
693 } elseif (!$sender || !$sender->getId()) {
695 $from->setHtml($mailData[
'import_name'] .
' (' . $this->lng->txt(
'user_deleted') .
')');
701 '<br />' . ilMail::_getIliasMailerName()
710 if ($mailData[
'rcp_cc']) {
716 if ($mailData[
'rcp_bcc']) {
719 $form->addItem($bcc);
724 $form->addItem($subject);
728 $form->addItem($date);
734 if ($mailData[
'attachments']) {
739 foreach ($mailData[
'attachments'] as
$file) {
743 $att->
setHtml($radiog->render());
744 $form->addCommandButton(
'deliverFile', $this->lng->txt(
'download'));
745 $form->addItem($att);
748 $isTrashFolder =
false;
749 if ($this->mbox->getTrashFolder() == $_GET[
'mobj_id']) {
750 $isTrashFolder =
true;
753 $current_folder_data = $this->mbox->getFolderData((
int) $_GET[
'mobj_id']);
755 $selectOptions =
array();
756 $actions = $this->mbox->getActions((
int) $_GET[
"mobj_id"]);
758 if (
$key ==
'moveMails') {
759 $folders = $this->mbox->getSubFolders();
760 foreach ($folders as $folder) {
762 ($folder[
"type"] !=
'trash' || !$isTrashFolder) &&
763 $folder[
'obj_id'] != $current_folder_data[
'obj_id']
766 if ($folder[
'type'] !=
'user_folder') {
767 $optionText =
$action .
' ' . $this->lng->txt(
'mail_' . $folder[
'title']) . ($folder[
'type'] ==
'trash' ?
' (' . $this->lng->txt(
'delete') .
')' :
'');
769 $optionText =
$action .
' ' . $folder[
'title'];
772 $selectOptions[$folder[
'obj_id']] = $optionText;
778 if ($current_folder_data[
'type'] ==
'user_folder') {
779 $txt_folder = $current_folder_data[
'title'];
781 $txt_folder = $this->lng->txt(
'mail_' . $current_folder_data[
'title']);
783 $this->toolbar->addSeparator();
784 $this->toolbar->addText(sprintf($this->lng->txt(
'current_folder'), $txt_folder));
786 if (is_array($selectOptions) && count($selectOptions)) {
787 include_once
'Services/Form/classes/class.ilSelectInputGUI.php';
789 $actions->setOptions($selectOptions);
790 $this->ctrl->setParameter($this,
'mail_id', (
int) $_GET[
'mail_id']);
791 $this->toolbar->setFormAction($this->ctrl->getFormAction($this,
'showMail'));
792 $this->toolbar->addInputItem($actions);
793 $this->toolbar->addFormButton($this->lng->txt(
'submit'),
'changeFolder');
797 $prevMail = $this->umail->getPreviousMail((
int) $_GET[
'mail_id']);
798 $nextMail = $this->umail->getNextMail((
int) $_GET[
'mail_id']);
799 if (is_array($prevMail) || is_array($nextMail)) {
800 $this->toolbar->addSeparator();
802 if ($prevMail[
'mail_id']) {
803 $this->ctrl->setParameter($this,
'mail_id', $prevMail[
'mail_id']);
804 $this->toolbar->addButton($this->lng->txt(
'previous'), $this->ctrl->getLinkTarget($this,
'showMail'));
805 $this->ctrl->clearParameters($this);
808 if ($nextMail[
'mail_id']) {
809 $this->ctrl->setParameter($this,
'mail_id', $nextMail[
'mail_id']);
810 $this->toolbar->addButton($this->lng->txt(
'next'), $this->ctrl->getLinkTarget($this,
'showMail'));
811 $this->ctrl->clearParameters($this);
815 $this->tpl->setContent(
$form->getHTML());
822 public function printMail()
824 $tplprint =
new ilTemplate(
'tpl.mail_print.html',
true,
true,
'Services/Mail');
825 $tplprint->setVariable(
'JSPATH', $this->tpl->tplPath);
827 $mailData = $this->umail->getMail((
int)
$_GET[
'mail_id']);
834 $tplprint->setVariable(
'TXT_FROM', $this->lng->txt(
'from'));
835 if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
836 $tplprint->setVariable(
'FROM', $sender->getPublicName());
837 } elseif (!$sender || !$sender->getId()) {
838 $tplprint->setVariable(
'FROM', $mailData[
'import_name'] .
' (' . $this->lng->txt(
'user_deleted') .
')');
840 $tplprint->setVariable(
'FROM', ilMail::_getIliasMailerName());
843 $tplprint->setVariable(
'TXT_TO', $this->lng->txt(
'mail_to'));
844 $tplprint->setVariable(
'TO', $mailData[
'rcp_to']);
846 if ($mailData[
'rcp_cc']) {
847 $tplprint->setCurrentBlock(
'cc');
848 $tplprint->setVariable(
'TXT_CC', $this->lng->txt(
'cc'));
849 $tplprint->setVariable(
'CC', $mailData[
'rcp_cc']);
850 $tplprint->parseCurrentBlock();
853 if ($mailData[
'rcp_bcc']) {
854 $tplprint->setCurrentBlock(
'bcc');
855 $tplprint->setVariable(
'TXT_BCC', $this->lng->txt(
'bc'));
856 $tplprint->setVariable(
'BCC', $mailData[
'rcp_bcc']);
857 $tplprint->parseCurrentBlock();
860 $tplprint->setVariable(
'TXT_SUBJECT', $this->lng->txt(
'subject'));
861 $tplprint->setVariable(
'SUBJECT', htmlspecialchars($mailData[
'm_subject']));
863 $tplprint->setVariable(
'TXT_DATE', $this->lng->txt(
'date'));
866 $tplprint->setVariable(
'TXT_MESSAGE', $this->lng->txt(
'message'));
867 $tplprint->setVariable(
'MAIL_MESSAGE', nl2br(htmlspecialchars($mailData[
'm_message'])));
883 :
$_GET[
"filename"]));
887 require_once
"./Services/Mail/classes/class.ilFileDataMail.php";
893 if (!is_array(
$file = $mfile->getAttachmentPathByMD5Filename(
$filename,
$_GET[
'mail_id']))) {
910 $sentFolderId = $this->mbox->getSentFolder();
911 $draftsFolderId = $this->mbox->getDraftsFolder();
913 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
914 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
915 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
918 $table->isSentFolder($isSentFolder)
919 ->isDraftFolder($isDraftFolder)
920 ->isTrashFolder($isTrashFolder)
923 $table->writeFilterToSession();
933 $sentFolderId = $this->mbox->getSentFolder();
934 $draftsFolderId = $this->mbox->getDraftsFolder();
936 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
937 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
938 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
941 $table->isSentFolder($isSentFolder)
942 ->isDraftFolder($isDraftFolder)
943 ->isTrashFolder($isTrashFolder)
static _lookupLogin($a_user_id)
lookup login
This class represents an option in a radio group.
__construct()
ilMailFolderGUI constructor.
This class handles all operations on files (attachments) in directory ilias_data/mail.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
showFolder($a_show_confirmation=false)
Shows current folder.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static get($a_var)
Get a value.
const VIEWMODE_SESSION_KEY
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
GUI class for public user profile presentation.
catch(Exception $e) $message
addSubfolderCommands($check_uf=false)
askForEmptyTrash()
confirmation message for empty trash action
if(isset($_POST['submit'])) $form
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class handles base functions for mail handling.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
cancelEmptyTrash()
cancel Empty Trash Action and return to folder
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
deleteSubfolder($a_show_confirm=true)
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
static _lookupPref($a_usr_id, $a_keyword)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
performEmptyTrash()
empty Trash and return to folder
if(empty($password)) $table
static htmlencodePlainString($a_str, $a_make_links_clickable, $a_detect_goto_links=false)
Encodes a plain text string into HTML for display in a browser.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
Confirmation screen class.