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")
63 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"searchResults");
64 $this->ctrl->redirectByClass(
"ilmailformgui");
67 if (
$_GET[
"type"] ==
"attach")
71 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailAttachment");
72 $this->ctrl->redirectByClass(
"ilmailformgui");
75 if (
$_GET[
"type"] ==
"new")
80 $_SESSION[
'rcp_to'] = implode(
',', $recipients);
88 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailUser");
89 $this->ctrl->redirectByClass(
"ilmailformgui");
92 if (
$_GET[
"type"] ==
"reply")
95 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"replyMail");
96 $this->ctrl->redirectByClass(
"ilmailformgui");
99 if (
$_GET[
"type"] ==
"read")
102 $this->ctrl->setParameterByClass(
"ilmailfoldergui",
"cmd",
"showMail");
103 $this->ctrl->redirectByClass(
"ilmailfoldergui");
106 if (
$_GET[
"type"] ==
"deliverFile")
110 $this->ctrl->setParameterByClass(
"ilmailfoldergui",
"cmd",
"deliverFile");
111 $this->ctrl->redirectByClass(
"ilmailfoldergui");
114 if (
$_GET[
"type"] ==
"message_sent")
117 $this->ctrl->redirectByClass(
"ilmailfoldergui");
120 if (
$_GET[
"type"] ==
"role")
122 if (is_array(
$_POST[
'roles']))
126 else if (
$_GET[
"role"])
133 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"mailRole");
134 $this->ctrl->redirectByClass(
"ilmailformgui");
137 if (
$_GET[
"view"] ==
"my_courses")
140 $this->ctrl->setParameterByClass(
"ilmailformgui",
"cmd",
"searchCoursesTo");
141 $this->ctrl->redirectByClass(
"ilmailformgui");
144 if (isset(
$_GET[
"viewmode"]))
147 $this->ctrl->setCmd(
"setViewMode");
150 $this->forwardClass = $this->ctrl->getNextClass($this);
155 $this->ctrl->getCmd() !=
"showExplorer")
160 include_once
"Services/jQuery/classes/class.iljQueryUtil.php";
164 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
167 switch($this->forwardClass)
169 case 'ilmailformgui':
170 include_once
'Services/Mail/classes/class.ilMailFormGUI.php';
175 case 'ilmailaddressbookgui':
176 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
181 case 'ilmailoptionsgui':
182 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
187 case 'ilmailfoldergui':
188 include_once
'Services/Mail/classes/class.ilMailFolderGUI.php';
193 if (!(
$cmd = $this->ctrl->getCmd()))
195 $cmd =
"setViewMode";
207 if (
$_GET[
"target"] ==
"")
209 $_GET[
"target"] =
"ilmailfoldergui";
212 if(
$_GET[
'type'] ==
'redirect_to_read')
214 $this->ctrl->setParameterByClass(
'ilMailFolderGUI',
'mail_id', (
int)
$_GET[
'mail_id']);
215 $this->ctrl->redirectByClass(
'ilMailFolderGUI',
'showMail');
217 else if (
$_GET[
"type"] ==
"add_subfolder")
219 $this->ctrl->redirectByClass(
$_GET[
"target"],
"addSubFolder");
221 else if (
$_GET[
"type"] ==
"enter_folderdata")
223 $this->ctrl->redirectByClass(
$_GET[
"target"],
"enterFolderData");
225 else if (
$_GET[
"type"] ==
"confirmdelete_folderdata")
227 $this->ctrl->redirectByClass(
$_GET[
"target"],
"confirmDeleteFolder");
231 $this->ctrl->redirectByClass(
$_GET[
"target"]);
237 global $ilMainMenu, $ilTabs, $ilHelp;
239 $ilHelp->setScreenIdComponent(
"mail");
241 $ilMainMenu->setActive(
"mail");
244 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
245 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
251 $ilTabs->addTarget(
'fold', $this->ctrl->getLinkTargetByClass(
'ilmailfoldergui'));
252 $this->ctrl->setParameterByClass(
'ilmailformgui',
'type',
'new');
253 $ilTabs->addTarget(
'compose', $this->ctrl->getLinkTargetByClass(
'ilmailformgui'));
254 $this->ctrl->clearParametersByClass(
'ilmailformgui');
255 $ilTabs->addTarget(
'mail_addressbook', $this->ctrl->getLinkTargetByClass(
'ilmailaddressbookgui'));
256 $ilTabs->addTarget(
'options', $this->ctrl->getLinkTargetByClass(
'ilmailoptionsgui'));
258 switch($this->forwardClass)
260 case 'ilmailformgui':
261 $ilTabs->setTabActive(
'compose');
264 case 'ilmailaddressbookgui':
265 $ilTabs->setTabActive(
'mail_addressbook');
268 case 'ilmailoptionsgui':
269 $ilTabs->setTabActive(
'options');
272 case 'ilmailfoldergui':
274 $ilTabs->setTabActive(
'fold');
278 if(isset(
$_GET[
'message_sent'])) $ilTabs->setTabActive(
'fold');
282 $tree_state =
'tree';
286 $tree_state =
'flat';
291 $this->ctrl->setParameter($this,
'mail_id', (
int)
$_GET[
'mail_id']);
292 $this->ctrl->setParameter($this,
'type',
'redirect_to_read');
295 $this->ctrl->setParameter($this,
'viewmode', $tree_state);
296 $this->tpl->setTreeFlatIcon($this->ctrl->getLinkTarget($this), $tree_state);
298 $this->ctrl->clearParameters($this);
299 $this->tpl->setCurrentBlock(
"tree_icons");
300 $this->tpl->parseCurrentBlock();
309 return in_array(strtolower(
$cmd), array(
'showmail')) && isset(
$_GET[
'mail_id']) && (int)
$_GET[
'mail_id'];
316 require_once
"Services/Mail/classes/class.ilMailExplorer.php";
318 if (!
$exp->handleCommand())
320 $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)
Class Mail this class handles base functions for mail handling.
static infoPanel($a_keep=true)
static initjQuery($a_tpl=null)
Init jQuery.