public function executeCommand() { if ($_GET["type"] == "search_res") { $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "searchResults"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "attach") { ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailAttachment"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "new") { $_SESSION['rcp_to'] = $_GET['rcp_to']; $_SESSION['rcp_cc'] = $_GET['rcp_cc']; $_SESSION['rcp_bcc'] = $_GET['rcp_bcc']; ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailUser"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "reply") { $_SESSION['mail_id'] = $_GET['mail_id']; $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "replyMail"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "read") { $_SESSION['mail_id'] = $_GET['mail_id']; $this->ctrl->setParameterByClass("ilmailfoldergui", "cmd", "showMail"); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "deliverFile") { $_SESSION['mail_id'] = $_GET['mail_id']; $_SESSION['filename'] = $_POST["filename"] ? $_POST["filename"] : $_GET["filename"]; $this->ctrl->setParameterByClass("ilmailfoldergui", "cmd", "deliverFile"); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "message_sent") { ilUtil::sendInfo($this->lng->txt('mail_message_send'), true); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "role") { if (is_array($_POST['roles'])) { $_SESSION['mail_roles'] = $_POST['roles']; } else { if ($_GET["role"]) { $_SESSION['mail_roles'] = array($_GET["role"]); } } ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailRole"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["view"] == "my_courses") { $_SESSION['search_crs'] = $_GET['search_crs']; $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "searchCoursesTo"); $this->ctrl->redirectByClass("ilmailformgui"); } if (isset($_GET["viewmode"])) { ilSession::set(self::VIEWMODE_SESSION_KEY, $_GET["viewmode"]); $this->ctrl->setCmd("setViewMode"); } $this->forwardClass = $this->ctrl->getNextClass($this); $this->showHeader(); if ('tree' == ilSession::get(self::VIEWMODE_SESSION_KEY) && $this->ctrl->getCmd() != "showExplorer") { $this->showExplorer(); } include_once "Services/jQuery/classes/class.iljQueryUtil.php"; iljQueryUtil::initjQuery(); switch ($this->forwardClass) { case 'ilmailformgui': include_once 'Services/Mail/classes/class.ilMailFormGUI.php'; $this->ctrl->forwardCommand(new ilMailFormGUI()); break; case 'ilmailaddressbookgui': include_once 'Services/Contact/classes/class.ilMailAddressbookGUI.php'; $this->ctrl->forwardCommand(new ilMailAddressbookGUI()); break; case 'ilmailoptionsgui': include_once 'Services/Mail/classes/class.ilMailOptionsGUI.php'; $this->ctrl->forwardCommand(new ilMailOptionsGUI()); break; case 'ilmailfoldergui': include_once 'Services/Mail/classes/class.ilMailFolderGUI.php'; $this->ctrl->forwardCommand(new ilMailFolderGUI()); break; default: if (!($cmd = $this->ctrl->getCmd())) { $cmd = "setViewMode"; } $this->{$cmd}(); break; } return true; }
public function executeCommand() { global $ilUser; // Check for incomplete profile if ($ilUser->getProfileIncomplete()) { ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI'); } // check whether password of user have to be changed // due to first login or password of user is expired if ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired()) { ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI'); } if ($_GET["type"] == "search_res") { $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "searchResults"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "attach") { ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailAttachment"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "new") { $_SESSION['rcp_to'] = $_GET['rcp_to']; $_SESSION['rcp_cc'] = $_GET['rcp_cc']; $_SESSION['rcp_bcc'] = $_GET['rcp_bcc']; ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailUser"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "reply") { $_SESSION['mail_id'] = $_GET['mail_id']; $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "replyMail"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["type"] == "read") { $_SESSION['mail_id'] = $_GET['mail_id']; $this->ctrl->setParameterByClass("ilmailfoldergui", "cmd", "showMail"); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "deliverFile") { $_SESSION['mail_id'] = $_GET['mail_id']; $_SESSION['filename'] = $_POST["filename"] ? $_POST["filename"] : $_GET["filename"]; $this->ctrl->setParameterByClass("ilmailfoldergui", "cmd", "deliverFile"); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "message_sent") { ilUtil::sendInfo($this->lng->txt('mail_message_send'), true); $this->ctrl->redirectByClass("ilmailfoldergui"); } if ($_GET["type"] == "role") { if (is_array($_POST['roles'])) { $_SESSION['mail_roles'] = $_POST['roles']; } else { if ($_GET["role"]) { $_SESSION['mail_roles'] = array($_GET["role"]); } } ilMailFormCall::storeReferer($_GET); $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "mailRole"); $this->ctrl->redirectByClass("ilmailformgui"); } if ($_GET["view"] == "my_courses") { $_SESSION['search_crs'] = $_GET['search_crs']; $this->ctrl->setParameterByClass("ilmailformgui", "cmd", "searchCoursesTo"); $this->ctrl->redirectByClass("ilmailformgui"); } if (isset($_GET["viewmode"])) { ilSession::set(self::VIEWMODE_SESSION_KEY, $_GET["viewmode"]); $this->ctrl->setCmd("setViewMode"); } $this->forwardClass = $this->ctrl->getNextClass($this); if ($this->ctrl->getCmd() != "showMenu" && $this->ctrl->getCmd() != "refresh") { $this->showHeader(); } include_once "Services/jQuery/classes/class.iljQueryUtil.php"; iljQueryUtil::initjQuery(); switch ($this->forwardClass) { case 'ilmailformgui': include_once 'Services/Mail/classes/class.ilMailFormGUI.php'; $this->ctrl->forwardCommand(new ilMailFormGUI()); break; case 'ilmailaddressbookgui': include_once 'Services/Contact/classes/class.ilMailAddressbookGUI.php'; $this->ctrl->forwardCommand(new ilMailAddressbookGUI()); break; case 'ilmailoptionsgui': include_once 'Services/Mail/classes/class.ilMailOptionsGUI.php'; $this->ctrl->forwardCommand(new ilMailOptionsGUI()); break; case 'ilmailfoldergui': include_once 'Services/Mail/classes/class.ilMailFolderGUI.php'; $this->ctrl->forwardCommand(new ilMailFolderGUI()); break; default: if (!($cmd = $this->ctrl->getCmd())) { $cmd = "setViewMode"; } $this->{$cmd}(); break; } return true; }