4 require_once
'Services/Mail/classes/class.ilMail.php';
41 $this->lng = $DIC->language();
42 $this->rbacsystem = $DIC->rbac()->system();
43 $this->
ilias = $DIC[
'ilias'];
44 $this->
user = $DIC->user();
50 public function getPDMailHTML($a_mail_id, $a_mobj_id)
52 $this->lng->loadLanguageModule(
'mail');
58 if (!$this->rbacsystem->checkAccess(
'internal_mail', $umail->getMailObjectReferenceId())) {
59 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->
ilias->error_obj->WARNING);
62 $umail->markRead(
array($a_mail_id));
63 $mail_data = $umail->getMail($a_mail_id);
65 $tpl =
new ilTemplate(
'tpl.pd_mail.html',
true,
true,
'Services/Mail');
67 if ($mail_data[
'attachments']) {
68 foreach ($mail_data[
'attachments'] as
$file) {
69 $tpl->setCurrentBlock(
'a_row');
72 'ilias.php?baseClass=ilMailGUI&type=deliverFile&mail_id=' .
$_GET[
'mail_id'] .
73 '&filename=' . md5($file)
75 $tpl->setVariable(
'FILE_NAME', $file);
76 $tpl->setVariable(
'TXT_DOWNLOAD', $this->lng->txt(
'download'));
77 $tpl->parseCurrentBlock();
79 $tpl->setCurrentBlock(
'attachment');
80 $tpl->setVariable(
'TXT_ATTACHMENT', $this->lng->txt(
'attachments'));
81 $tpl->parseCurrentBlock();
84 $tpl->setVariable(
'TXT_FROM', $this->lng->txt(
'from'));
90 if ($sender && $sender->getId() != ANONYMOUS_USER_ID) {
91 $tpl->setCurrentBlock(
'pers_image');
92 $tpl->setVariable(
'IMG_SENDER', $sender->getPersonalPicturePath(
'xsmall'));
93 $tpl->setVariable(
'ALT_SENDER', htmlspecialchars($sender->getPublicName()));
94 $tpl->parseCurrentBlock();
96 $tpl->setVariable(
'PUBLIC_NAME', $sender->getPublicName());
98 $tpl->setVariable(
'PUBLIC_NAME', $mail_data[
'import_name'] .
' (' . $this->lng->txt(
'user_deleted') .
')');
100 $tpl->setCurrentBlock(
'pers_image');
102 $tpl->setVariable(
'ALT_SENDER', htmlspecialchars(ilMail::_getIliasMailerName()));
103 $tpl->parseCurrentBlock();
104 $tpl->setVariable(
'PUBLIC_NAME', ilMail::_getIliasMailerName());
107 $tpl->setVariable(
'TXT_TO', $this->lng->txt(
'mail_to'));
108 $tpl->setVariable(
'TO', $umail->formatNamesForOutput($mail_data[
'rcp_to']));
110 if ($mail_data[
'rcp_cc']) {
111 $tpl->setCurrentBlock(
'cc');
112 $tpl->setVariable(
'TXT_CC', $this->lng->txt(
'cc'));
113 $tpl->setVariable(
'CC', $umail->formatNamesForOutput($mail_data[
'rcp_cc']));
114 $tpl->parseCurrentBlock();
117 $tpl->setVariable(
'TXT_SUBJECT', $this->lng->txt(
'subject'));
118 $tpl->setVariable(
'SUBJECT', htmlspecialchars($mail_data[
'm_subject']));
120 $tpl->setVariable(
'TXT_DATE', $this->lng->txt(
'date'));
123 $tpl->setVariable(
'TXT_MESSAGE', $this->lng->txt(
'message'));
static securePlainString($a_str)
Remove unsecure characters from a plain text string.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
Mail User Interface class.
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.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
__construct()
ilPDMailGUI constructor.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file