function index() { $mailClass = new Model_Mail(); $mailbox = $mailClass->getMailboxFromId($_GET["folder"]); $this->view->setTitle("Почта: " . $mailbox); if (isset($_GET["folder"])) { $mailClass->getSortsByFolderId($_GET["folder"]); $mails = $mailClass->getMailsSort(); } $this->view->mail_index(array("mails" => $mails, "mailbox" => $mailbox)); }
public function index() { $this->view->setTitle("Почта"); $this->view->setLeftContent($this->view->render("left_mail", array("folders" => $this->folders, "enableCheck" => $this->enableCheck))); $mailClass = new Model_Mail(); $obj = false; if (isset($_GET["folder"])) { $mailClass->getSortsByFolderId($_GET["folder"]); $mails = $mailClass->getMailsSort(); } else { if (isset($_GET["oid"])) { $obj = true; $mails = $mailClass->getObjMails($_GET["oid"]); $this->view->setMainContent("<p class='title'>Просмотр почтовой переписки: " . $mailClass->getContact() . "</p>"); } else { $mails = $mailClass->getMails(); } } $this->view->mail_index(array("mails" => $mails, "obj" => $obj)); $this->view->showPage(); }