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 include_once
"Services/jQuery/classes/class.iljQueryUtil.php";
166 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
169 switch($this->forwardClass)
171 case 'ilmailformgui':
172 include_once
'Services/Mail/classes/class.ilMailFormGUI.php';
178 require_once
'Services/Contact/classes/class.ilContactGUI.php';
179 $this->tpl->setTitle($this->lng->txt(
'mail_addressbook'));
183 case 'ilmailoptionsgui':
184 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
189 case 'ilmailfoldergui':
190 include_once
'Services/Mail/classes/class.ilMailFolderGUI.php';
195 if (!(
$cmd = $this->ctrl->getCmd()))
197 $cmd =
"setViewMode";
209 if (
$_GET[
"target"] ==
"")
211 $_GET[
"target"] =
"ilmailfoldergui";
214 if(
$_GET[
'type'] ==
'redirect_to_read')
216 $this->ctrl->setParameterByClass(
'ilMailFolderGUI',
'mail_id', (
int)
$_GET[
'mail_id']);
217 $this->ctrl->redirectByClass(
'ilMailFolderGUI',
'showMail');
219 else if (
$_GET[
"type"] ==
"add_subfolder")
221 $this->ctrl->redirectByClass(
$_GET[
"target"],
"addSubFolder");
223 else if (
$_GET[
"type"] ==
"enter_folderdata")
225 $this->ctrl->redirectByClass(
$_GET[
"target"],
"enterFolderData");
227 else if (
$_GET[
"type"] ==
"confirmdelete_folderdata")
229 $this->ctrl->redirectByClass(
$_GET[
"target"],
"confirmDeleteFolder");
233 $this->ctrl->redirectByClass(
$_GET[
"target"]);
239 global $ilMainMenu, $ilTabs, $ilHelp;
241 $ilHelp->setScreenIdComponent(
"mail");
243 $ilMainMenu->setActive(
"mail");
246 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
247 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
253 $ilTabs->addTarget(
'fold', $this->ctrl->getLinkTargetByClass(
'ilmailfoldergui'));
254 $this->ctrl->setParameterByClass(
'ilmailformgui',
'type',
'new');
255 $ilTabs->addTarget(
'compose', $this->ctrl->getLinkTargetByClass(
'ilmailformgui'));
256 $this->ctrl->clearParametersByClass(
'ilmailformgui');
257 $ilTabs->addTarget(
'mail_addressbook', $this->ctrl->getLinkTargetByClass(
'ilcontactgui'));
258 $ilTabs->addTarget(
'options', $this->ctrl->getLinkTargetByClass(
'ilmailoptionsgui'));
260 switch($this->forwardClass)
262 case 'ilmailformgui':
263 $ilTabs->setTabActive(
'compose');
267 $ilTabs->setTabActive(
'mail_addressbook');
270 case 'ilmailoptionsgui':
271 $ilTabs->setTabActive(
'options');
274 case 'ilmailfoldergui':
276 $ilTabs->setTabActive(
'fold');
280 if(isset(
$_GET[
'message_sent'])) $ilTabs->setTabActive(
'fold');
284 $tree_state =
'tree';
288 $tree_state =
'flat';
293 $this->ctrl->setParameter($this,
'mail_id', (
int)
$_GET[
'mail_id']);
294 $this->ctrl->setParameter($this,
'type',
'redirect_to_read');
297 $this->ctrl->setParameter($this,
'viewmode', $tree_state);
298 $this->tpl->setTreeFlatIcon($this->ctrl->getLinkTarget($this), $tree_state);
300 $this->ctrl->clearParameters($this);
301 $this->tpl->setCurrentBlock(
"tree_icons");
302 $this->tpl->parseCurrentBlock();
311 return in_array(strtolower(
$cmd), array(
'showmail')) && isset(
$_GET[
'mail_id']) && (int)
$_GET[
'mail_id'];
318 require_once
"Services/Mail/classes/class.ilMailExplorer.php";
320 if (!
$exp->handleCommand())
322 $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.