4 require_once
"Services/Mail/classes/class.ilMail.php";
5 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
43 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
47 $this->ctrl->saveParameter($this,
"mobj_id");
48 $this->lng->loadLanguageModule(
"mail");
50 $this->umail =
new ilMail($ilUser->getId());
53 if (!$rbacsystem->checkAccess(
'internal_mail', $this->umail->getMailObjectReferenceId()))
55 $ilErr->raiseError($this->lng->txt(
"permission_denied"), $ilErr->WARNING);
61 if (
$_GET[
"type"] ==
"search_res")
65 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"searchResults");
66 $this->ctrl->redirectByClass(
"ilmailformgui");
69 if (
$_GET[
"type"] ==
"attach")
73 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailAttachment");
74 $this->ctrl->redirectByClass(
"ilmailformgui");
77 if (
$_GET[
"type"] ==
"new")
82 $_SESSION[
'rcp_to'] = implode(
',', $recipients);
90 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailUser");
91 $this->ctrl->redirectByClass(
"ilmailformgui");
94 if (
$_GET[
"type"] ==
"reply")
97 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"replyMail");
98 $this->ctrl->redirectByClass(
"ilmailformgui");
101 if (
$_GET[
"type"] ==
"read")
104 $this->ctrl->setParameterByClass(
"ilmailfoldergui",
"cmd",
"showMail");
105 $this->ctrl->redirectByClass(
"ilmailfoldergui");
108 if (
$_GET[
"type"] ==
"deliverFile")
112 $this->ctrl->setParameterByClass(
"ilmailfoldergui",
"cmd",
"deliverFile");
113 $this->ctrl->redirectByClass(
"ilmailfoldergui");
116 if (
$_GET[
"type"] ==
"message_sent")
119 $this->ctrl->redirectByClass(
"ilmailfoldergui");
122 if (
$_GET[
"type"] ==
"role")
124 if (is_array(
$_POST[
'roles']))
128 else if (
$_GET[
"role"])
135 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailRole");
136 $this->ctrl->redirectByClass(
"ilmailformgui");
139 if (
$_GET[
"view"] ==
"my_courses")
142 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"searchCoursesTo");
143 $this->ctrl->redirectByClass(
"ilmailformgui");
146 if (isset(
$_GET[
"viewmode"]))
149 $this->ctrl->setCmd(
"setViewMode");
152 $this->forwardClass = $this->ctrl->getNextClass($this);
157 $this->ctrl->getCmd() !=
"showExplorer")
162 switch($this->forwardClass)
164 case 'ilmailformgui':
165 include_once
'Services/Mail/classes/class.ilMailFormGUI.php';
171 require_once
'Services/Contact/classes/class.ilContactGUI.php';
172 $this->tpl->setTitle($this->lng->txt(
'mail_addressbook'));
176 case 'ilmailoptionsgui':
177 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
182 case 'ilmailfoldergui':
183 include_once
'Services/Mail/classes/class.ilMailFolderGUI.php';
188 if (!(
$cmd = $this->ctrl->getCmd()))
190 $cmd =
"setViewMode";
202 if (
$_GET[
"target"] ==
"")
204 $_GET[
"target"] =
"ilmailfoldergui";
207 if(
$_GET[
'type'] ==
'redirect_to_read')
209 $this->ctrl->setParameterByClass(
'ilMailFolderGUI',
'mail_id', (
int)
$_GET[
'mail_id']);
210 $this->ctrl->redirectByClass(
'ilMailFolderGUI',
'showMail');
212 else if (
$_GET[
"type"] ==
"add_subfolder")
214 $this->ctrl->redirectByClass(
$_GET[
"target"],
"addSubFolder");
216 else if (
$_GET[
"type"] ==
"enter_folderdata")
218 $this->ctrl->redirectByClass(
$_GET[
"target"],
"enterFolderData");
220 else if (
$_GET[
"type"] ==
"confirmdelete_folderdata")
222 $this->ctrl->redirectByClass(
$_GET[
"target"],
"confirmDeleteFolder");
226 $this->ctrl->redirectByClass(
$_GET[
"target"]);
232 global $ilMainMenu, $ilTabs, $ilHelp;
234 $ilHelp->setScreenIdComponent(
"mail");
236 $ilMainMenu->setActive(
"mail");
238 $this->tpl->getStandardTemplate();
245 $ilTabs->addTarget(
'fold', $this->ctrl->getLinkTargetByClass(
'ilmailfoldergui'));
246 $this->ctrl->setParameterByClass(
'ilmailformgui',
'type',
'new');
247 $ilTabs->addTarget(
'compose', $this->ctrl->getLinkTargetByClass(
'ilmailformgui'));
248 $this->ctrl->clearParametersByClass(
'ilmailformgui');
249 $ilTabs->addTarget(
'mail_addressbook', $this->ctrl->getLinkTargetByClass(
'ilcontactgui'));
250 $ilTabs->addTarget(
'options', $this->ctrl->getLinkTargetByClass(
'ilmailoptionsgui'));
252 switch($this->forwardClass)
254 case 'ilmailformgui':
255 $ilTabs->setTabActive(
'compose');
259 $ilTabs->setTabActive(
'mail_addressbook');
262 case 'ilmailoptionsgui':
263 $ilTabs->setTabActive(
'options');
266 case 'ilmailfoldergui':
268 $ilTabs->setTabActive(
'fold');
272 if(isset(
$_GET[
'message_sent'])) $ilTabs->setTabActive(
'fold');
276 $tree_state =
'tree';
280 $tree_state =
'flat';
285 $this->ctrl->setParameter($this,
'mail_id', (
int)
$_GET[
'mail_id']);
286 $this->ctrl->setParameter($this,
'type',
'redirect_to_read');
289 $this->ctrl->setParameter($this,
'viewmode', $tree_state);
290 $this->tpl->setTreeFlatIcon($this->ctrl->getLinkTarget($this), $tree_state);
292 $this->ctrl->clearParameters($this);
293 $this->tpl->setCurrentBlock(
"tree_icons");
294 $this->tpl->parseCurrentBlock();
303 return in_array(strtolower(
$cmd),
array(
'showmail')) && isset(
$_GET[
'mail_id']) && (int)
$_GET[
'mail_id'];
310 require_once
"Services/Mail/classes/class.ilMailExplorer.php";
312 if (!
$exp->handleCommand())
314 $this->tpl->setLeftNavContent(
$exp->getHTML());
isMailDetailCommand($cmd)
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
const VIEWMODE_SESSION_KEY
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class Mail Explorer class for explorer view for mailboxes.
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 infoPanel($a_keep=true)
Create styles array
The data for the language used.